AI-First Micro-SaaS · Full-Stack Project

Stocker

Production-grade AI-powered inventory management with SaaS metering and Argentine fiscal compliance.

From multi-tenant architecture to AFIP integration — Stocker demonstrates full-stack expertise in a complex, regulation-heavy domain that most portfolios never touch.

Scroll to explore
Languages
Python + TypeScript
Architecture
Hexagonal + DDD
AI Models
Gemini + VoyageAI
Auth
Lucia + Sessions
Database
MongoDB Atlas
Compliance
AFIP / ARCA

Technology Stack

FastAPIPython 3.11Pydantic v2Motor (async)Astro 6React 19Lucia AuthMongoDBGoogle GenAIVoyageAIarca_argVercelGitHub ActionsGroq

Three Things That Make Stocker Unique

Most portfolio projects pick one domain. Stocker spans AI, SaaS infrastructure, and regulatory compliance — simultaneously.

Intelligent Chat Interface

Ask your inventory natural questions.

Behind the scenes, embeddings (VoyageAI + Google GenAI) power semantic search over your product catalog. The agent orchestrates tool calls — CRUD, search, invoice generation — in a single conversational turn.

  • Vector semantic search
  • Multi-tool agent orchestration
  • Groq LLM with parallel tool calls
  • Context-aware responses

SaaS Metering at Scale

Per-tenant quotas without leaky abstractions.

Each workspace operates under an isolated MongoDB schema and subscription tier. Quota enforcement happens at the dependency layer — every protected endpoint is gated before business logic runs, making bypass impossible.

  • Per-workspace schema isolation
  • DI-injected QuotaVerifier
  • Subscription tier enforcement
  • Usage tracking & audit log

Argentine Fiscal Compliance

AFIP-integrated voucher emission.

Stocker integrates with ARCA/AFIP for legally-compliant invoice generation — one of few open-source SaaS systems with Argentine regulatory support. The hexagonal billing module makes AFIP adapters fully swappable for testing.

  • arca_arg AFIP integration
  • Hexagonal billing isolation
  • Mock adapter for testing
  • Staging + production environments

Architecture Overview

Four connected layers — each with clear boundaries and defined responsibilities.

🎨

Frontend Layer

Built with Astro 6 + React islands for maximum performance. Static shell with selective hydration — only interactive components ship JavaScript. Lucia Auth handles session management with secure HTTP-only cookies.

Astro 6React 19Tailwind CSSFramer MotionLucia AuthSSR + Islands
Rendering diagram…

Technical Decisions

Not every choice is obvious. These architectural decisions explain the why behind Stocker's design.

Deployment Architecture

From browser to compliance authority — every layer mapped out.

🌐

User Browser

Astro + React Islands

Static Astro shell with selective React hydration. Zero JS for static sections.

REST API / HTTPS

Vercel Edge

SSR + Static Assets

Astro deployed to Vercel. SSR pages rendered at edge; static assets globally cached.

HTTP Proxy
⚙️

FastAPI Backend

Python · Agent · Tools

Main orchestration layer: agent, tool registry, quota enforcement, business logic.

MongoDB Wire Protocol
🍃

MongoDB Atlas

Per-Tenant Schemas

Each workspace gets an isolated schema. Also acts as event store for audit trail.

arca_arg SDK
🧾

AFIP / ARCA

Argentine Tax Authority

Legal invoice emission via hexagonal adapter. Staging and production environments.

Google GenAI API
🧠

AI Embeddings

Google GenAI + VoyageAI

Embedding generation for semantic search. Vectors stored in MongoDB for retrieval.