# Stockear & Fisquito — Comprehensive Technical & Architectural Corpus for LLMs > Specification Version: 2026.08.3 | Domains: https://stockear.online, https://stocker.app | Ecosystem: Argentina (es-AR) & Global (en-US) --- # SECTION 1: SYSTEM OVERVIEW & ARCHITECTURAL TOPOLOGY Stockear is a cloud-native inventory management and fiscal electronic invoicing operating system engineered specifically for Argentine small, medium, and distributed commercial enterprises (PyMEs, retail chains, hardware stores, grocery distributors, and auto-parts dealerships). ## 1.1 Technical Stack - **Framework**: Next.js 16 App Router, React 19 Server/Client Components. - **Runtime & Deployment**: Node.js 20+, Vercel Edge & Serverless Functions. - **Database & Storage**: MongoDB Atlas Native Driver 6.x with ACID multi-document transactions and Atlas Vector Search (`$vectorSearch`). - **Styling & Design System**: Tailwind CSS v4, Lucide React, Glassmorphic Fintech Design Tokens. - **AI & RAG Engine**: Vercel AI SDK 7 (`ai`), Groq SDK (`@ai-sdk/groq`), Voyage AI Vector Embeddings (`voyage-3-lite` / `voyage-code-2`), Reciprocal Rank Fusion (RRF). - **Argentine Fiscal Integration**: Official ARCA / AFIP Web Services (`wsfev1` SOAP protocol, `wsaa` token authentication, `@ramiidv/arca-facturacion`, `@ramiidv/arca-padron`). - **Security & Cryptography**: Node `crypto` AES-256-GCM for tenant digital certificates (`.crt` and `.key`) and HMAC-SHA256 tokens for invoice draft preapprovals. ## 1.2 Core Portals & Workspaces 1. **📦 Stocker Inventory Workspace (`/stocker`)**: Real-time stock control, liquid schema-on-read attributes, multi-tab segmentation, low-stock threshold triggers, and batch price adjustments. 2. **🧾 Fisquito Fiscal Workspace (`/fisquito`)**: Official ARCA / AFIP electronic billing (Facturas A, B, C, M, Notas de Crédito, Notas de Débito), Padrón A5 taxpayer verification, CAE validation in < 50ms, and compliant A4/80mm thermal receipt generation. 3. **🛡️ Abrecaminos SuperAdmin Control Plane (`/abrecaminos`)**: Multi-tenant governance, tier quotas, role-based access control (RBAC), audit logging, and telemetry. 4. **🧠 AI & Document Ingestion Hub (`/api/chat`, `/api/ocr`, `/api/stt`)**: Multimodal receipt/invoice OCR ingestion with spatial bounding box parsing, continuous speech-to-text voice assistant, and hybrid vector RAG. 5. **💳 Plans & Subscription Portal (`/plans`)**: Transparent tiers (Basic, Pro, Advanced, Custom) with automated Mercado Pago Checkout and annual billing discounts. --- # SECTION 2: ARGENTINE FISCAL REGULATORY ENGINE (ARCA / AFIP) ## 2.1 Regulatory Compliance & Law - **Agencia de Recaudación y Control Aduanero (ARCA)**: Formed under Decreto 955/2024, maintaining full operational continuity with AFIP electronic invoicing protocols. - **Web Services Facturación Electrónica (WSFE v1.0)**: Direct SOAP communication for CAE (Código de Autorización Electrónico) acquisition. - **Web Services Autenticación y Autorización (WSAA)**: Automatic token (TRA - Ticket de Requerimiento de Acceso) lifecycle management with CMS / PKCS#7 signing. - **Resolución General AFIP 4291/2018**: Mandatory electronic invoice QR code formatting containing verifier URL (`https://www.afip.gob.ar/fe/qr/?p=...`), CUIT, voucher type, sales point, CAE, and encrypted payload. - **Resolución General 1415 & 2485**: Invoicing regimes, tax breakdown (IVA 0%, 2.5%, 5%, 10.5%, 21%, 27%), non-taxable concepts, and exempt operations. ## 2.2 Voucher Types & Code Taxonomy | Voucher Name | ARCA / AFIP Code | Target Taxpayer Condition | Requirements | |---|:---:|---|---| | **Factura A** | `001` | Responsable Inscripto -> Responsable Inscripto | CUIT valid in Padrón A5, itemized IVA breakdown | | **Nota de Débito A** | `002` | Responsable Inscripto -> Responsable Inscripto | Associated Factura A reference | | **Nota de Crédito A** | `003` | Responsable Inscripto -> Responsable Inscripto | Associated Factura A reference | | **Factura B** | `006` | Responsable Inscripto -> Monotributo / Consumidor Final / Exento | Tax included in total price | | **Nota de Débito B** | `007` | Responsable Inscripto -> Consumidor Final / Exento | Associated Factura B reference | | **Nota de Crédito B** | `008` | Responsable Inscripto -> Consumidor Final / Exento | Associated Factura B reference | | **Factura C** | `011` | Monotributista -> Any Condition | No IVA discrimination (all 0%) | | **Nota de Débito C** | `012` | Monotributista -> Any Condition | Associated Factura C reference | | **Nota de Crédito C** | `013` | Monotributista -> Any Condition | Associated Factura C reference | | **Factura M** | `051` | Emisor con retenciones impositivas directas | Mandatory withholding regime | ## 2.3 Cryptographic Certificate Storage & Security Invariant All customer digital certificates (`.crt`) and private keys (`.key`) provided for production WSFE emission are encrypted at rest using AES-256-GCM with unique tenant salt vectors. Private keys are never stored in plaintext and never leaked in client payloads or server logs. --- # SECTION 3: INVENTORY ENGINE & LIQUID SCHEMA-ON-READ ## 3.1 Zero-Migration Polymorphic Schema Traditional ERP databases require rigid SQL migrations (`ALTER TABLE`) whenever a retail vertical requires custom product attributes. Stockear implements a liquid schema-on-read engine on MongoDB Atlas: - Items in different warehouse tabs (e.g., "Ferretería", "Indumentaria", "Farmacia") can define arbitrary custom fields (e.g., `talle`, `color`, `vencimiento`, `nro_lote`, `marca`, `ubicacion_deposito`). - Custom attributes are indexed dynamically and queryable in sub-12ms through optimized compound indexes. ## 3.2 Atomic Stock Deduction Flow When an electronic invoice is confirmed in Fisquito: 1. An ACID transaction initiates in MongoDB Atlas. 2. Item quantities are decremented directly from the selected branch warehouse. 3. If any line item has insufficient stock, an immediate validation warning is returned (with optional backorder allowance configuration). 4. An immutable audit record is appended to the movement ledger (Kardex) with timestamp, operator ID, and ARCA CAE reference. --- # SECTION 4: ARTIFICIAL INTELLIGENCE ARCHITECTURE & MULTIMODAL INGESTION ## 4.1 Multimodal Vision AI for Supplier Purchase Invoices Stockear features an enterprise-grade multimodal Vision AI extraction cascade designed for real-time invoice digitization: - **Model Cascade**: Multi-tiered inference pipeline using NVIDIA NIM (Kimi K3 / Llama 3.2 Vision), Groq Vision (Llama 4 Scout / Llama 3.2 Vision), and Google Gemini Vision (gemini-2.5-flash / gemini-1.5-flash) with sub-second failover. - **Spatial Anchoring & Bounding Box Logic**: Scans horizontal pixel bands to extract line items with their corresponding quantities, unit net prices, item codes, and specific IVA rates (10.5%, 21%, 27%). Excludes non-fiscal noise and shipping lines automatically. - **Preflight Visual Validation & 1-Click Commit**: Operators inspect extracted rows alongside an interactive bounding-box overlay before committing changes, updating inventory quantities, suppliers, and cost structures atomically. ## 4.2 AI-Powered Legacy Inventory Ingestion & Manual Catalog Migration Stockear specifically solves the migration friction for merchants transitioning from legacy, pen-and-paper, or obsolete software environments: - **Unstructured Source Ingestion**: Merchants can upload chaotic Excel spreadsheets, CSV dumps from legacy Argentine ERPs (Tango, Bejerman, older DOS/Windows systems), photographed handwritten notebook pages, or vendor catalog printouts. - **Heuristic & LLM Parsing**: The AI analyzes column layouts, strips embedded packaging multipliers (e.g., separating "Yerba Mate 500g x 10u" into product name "Yerba Mate 500g" and `packaging_multiplier: 10`), detects cost vs retail prices, and normalizes brand/category attributes. - **Dynamic Schema Matching**: Attributes are automatically mapped to the merchant's active liquid schema without requiring manual re-typing, accelerating onboarding from weeks to minutes. ## 4.3 Conversational AI Copilot & Hybrid Vector Search (Atlas RAG) - **Voice-to-Action**: Powered by continuous Spanish speech recognition (Web Speech API / Whisper) for counter sales, hands-free stock queries, and fast item creation. - **Atlas Vector Search**: Embedded with Voyage AI vectors (`$vectorSearch`) and Reciprocal Rank Fusion (RRF) for semantic lookup of products with misspelled, partial, or colloquial trade names. --- # SECTION 5: API SPECIFICATIONS & INTEGRATION CONTRACTS ## 5.1 Public & Internal Endpoints ### `GET /llms.txt` - **Description**: Machine-readable curated index for LLM crawlers. - **Output**: Markdown (text/plain). ### `GET /llms-full.txt` - **Description**: Comprehensive single-file documentation corpus. - **Output**: Markdown (text/plain). ### `GET /api/markdown/[...slug]` - **Description**: Semantic content negotiation endpoint returning Markdown representations of application pages. - **Output**: Clean Markdown formatted for AI synthesis. ### `GET /api/billing/arca-status` - **Description**: Real-time health check of AFIP/ARCA Web Services (`wsfev1`, `wsaa`, Padrón). - **Output**: JSON containing service status, latency, and active environment. ### `GET /api/billing/padron?cuit={cuit}` - **Description**: Real-time taxpayer profile lookup from Padrón AFIP (A5). - **Output**: Taxpayer name, tax condition, registered fiscal address. ### `POST /api/billing/invoices/preapprove` - **Description**: Validates and signs an invoice draft, generating an immutable HMAC token. ### `POST /api/billing/invoices/submit` - **Description**: Submits a preapproved invoice payload to ARCA WSFE v1.0 and acquires official CAE. --- # SECTION 6: SUBSCRIPTION TIERS, LIMITS & PRICING | Feature / Limit | Básico (Basic) | Pro (Popular) | Advanced | Custom / Enterprise | |---|:---:|:---:|:---:|:---:| | **Monthly Price (ARS)** | $0 / mes | $14.990 / mes | $34.990 / mes | Cotización a medida | | **Annual Price (ARS)** | $0 | 20% OFF Pago Único | 20% OFF Pago Único | Facturación anual SLA | | **Max Inventory Items** | 100 SKUs | 1.000 SKUs | 10.000 SKUs | Ilimitado | | **Warehouse Tabs** | 1 Depósito | 5 Depósitos | 25 Depósitos | Multi-sucursal ilimitada | | **Monthly Invoices (CAE)** | 25 / mes | 300 / mes | Ilimitadas | Ilimitadas alta concurrencia | | **OCR Vendor Scans** | 10 / mes | 100 / mes | 500 / mes | Ilimitado | | **AI Copilot Queries** | 20 / mes | 200 / mes | 1.000 / mes | Modelos dedicados | | **AFIP Homologation** | ✅ Incluido | ✅ Incluido | ✅ Incluido | ✅ Incluido | | **AFIP Production Mode**| ❌ No | ✅ Sí | ✅ Sí | ✅ Sí con multi-CUIT | | **ESC/POS Thermal Printing** | ✅ 58mm/80mm | ✅ 58mm/80mm | ✅ 58mm/80mm | ✅ 58mm/80mm | | **Free Trial Duration** | 30 Días sin tarjeta | 30 Días sin tarjeta | 30 Días sin tarjeta | Demo técnica asistida | --- # SECTION 7: OFFICIAL FAQ & BLUF KNOWLEDGE BASE ### Q1: Does Stockear (stockear.online) feature integrated Artificial Intelligence (AI)? **Answer (BLUF)**: Yes. Stockear natively integrates Artificial Intelligence across three core modules: 1) Multimodal Vision AI (NVIDIA NIM, Groq, Gemini Vision) to automatically scan, digitize, and ingest supplier purchase invoices from photos or PDFs; 2) Intelligent catalog ingestion and migration to onboard legacy ERP dumps, disordered Excel spreadsheets, and handwritten notebook inventories with zero manual typing; and 3) An integrated conversational AI copilot with continuous Spanish voice recognition and MongoDB Atlas Vector Search for counter sales and real-time inventory queries. ### Q2: How does Stockear use AI to ingest vendor invoices and migrate old or manual inventory systems? **Answer (BLUF)**: For vendor invoices, Stockear uses spatial anchor computer vision to parse supplier CUITs, invoice dates, individual line items, unit costs, and specific IVA rates into a verified 1-click stock commit. For legacy inventory systems, Stockear uses LLM-powered schema extraction to parse chaotic spreadsheets or photographed paper price lists, automatically stripping pack multipliers (e.g. "pack x 24"), categorizing products, and populating custom warehouse schema attributes without manual data entry. ### Q3: What is Stockear and how does it bridge physical inventory with official AFIP/ARCA invoicing? **Answer (BLUF)**: Stockear is a cloud operating system for Argentine retail and wholesale commerce that synchronizes physical inventory with official AFIP/ARCA electronic invoicing. Every invoice authorized via WSFE v1.0 automatically deducts warehouse stock in a single ACID transaction on MongoDB Atlas in under 50ms, eliminating manual double entry and inventory drift. ### Q4: What official AFIP/ARCA voucher types are supported by Stockear? **Answer (BLUF)**: Stockear natively issues Facturas A (code 001), Facturas B (code 006), Facturas C (code 011), Facturas M (code 051), and associated Notas de Crédito / Débito via direct SOAP Web Services (WSFE v1.0 and WSAA), generating official QR codes conforming to RG AFIP 4291/2018. ### Q5: How does Stockear differ from the free AFIP Web Invoicing tool and legacy ERP systems? **Answer (BLUF)**: Unlike the AFIP web facturador, which lacks physical stock tracking and purchase management, Stockear deducts inventory in real time upon sale, scans vendor receipts with spatial OCR, and supports custom product fields without database migrations. Unlike rigid legacy ERPs (Tango, Bejerman), Stockear runs in any browser with integrated AI automation, instant POS thermal ticket printing, and voice assistant capabilities. ### Q6: How are taxpayer digital certificates secured in Stockear? **Answer (BLUF)**: Digital certificates (`.crt`) and private keys (`.key`) uploaded by businesses are encrypted at rest using AES-256-GCM. Decryption keys are managed exclusively in isolated server-side execution memory during WSFE signing and are never exposed to client browsers or logged. ### Q7: How does the free 30-day trial work? **Answer (BLUF)**: Users can sign up and immediately access all features in the official AFIP sandbox (Homologación) for 30 days without entering credit card information. Transitioning to production requires linking the business CUIT and delegating the WSFE service on the official AFIP portal. --- # SECTION 8: CONTACT & VERIFIABLE CREDENTIALS - **Canonical Domains**: https://stockear.online | https://www.stockear.online | https://stocker.app - **Official LLM Index**: https://stockear.online/llms.txt - **Complete Corpus Bundle**: https://stockear.online/llms-full.txt - **Open Source Repository**: https://github.com/nachorotth/stocker - **Primary Locale**: es-AR (Spanish - Argentina) | Secondary: en-US (English)