How angx7/stockcito works
Abasto is a local CLI for turning pasted text or WhatsApp-exported TXT into inventory entries, warehouse exits, and pending purchase requests, then reviewing stock and generating reports. The main workflow parses messages into typed items, optionally filters noisy missing-item messages with OpenAI, and records the results through inventory and catalog services. README-documented capabilities also include low-stock purchase suggestions and operational dashboards. Some service implementations were not excerpted, so those links are included only where the README or source index supports them.
Main entry points: app.py CLI commands · inventory_service.py Inventory service · whatsapp_parser.py WhatsApp export parser · catalog_service.py Product catalog
Components 22
CLI workflows
- CLI commands
app.py
Message parsing
- WhatsApp export parser
abasto/parsers/whatsapp_parser.py - Entry parser
abasto/parsers/inventory_parser.py - Exit parser
abasto/parsers/exits_parser.py - Missing parser
abasto/parsers/missing_parser.py - Quantity parser
abasto/parsers/base.py - Parsed item schema
abasto/parsers/schemas.py - Text normalization
abasto/parsers/text.py
Inventory operations
- AI missing filter
abasto/services/openai_service.py - Inventory service
abasto/services/inventory_service.py - Product catalog
abasto/services/catalog_service.py - Reconciliation
abasto/services/reconciliation_service.py - Dashboard reporting
abasto/services/report_service.py
Data and reporting
- SQLite session and schema
abasto/database/db.py - Products and aliases
abasto/models/product.py - Product aliases
abasto/models/alias.py - Stock movements
abasto/models/movement.py - Purchase requests
abasto/models/purchase_request.py - Suppliers
abasto/models/supplier.py - Categories
abasto/models/category.py
Other components
- Restaurant operator
- OpenAI API
Connections 37
- Restaurant operator → CLI commands: runs commands
README.md - CLI commands → WhatsApp export parser: parses imports
app.py - CLI commands → AI missing filter: filters missing text
app.py - CLI commands → Inventory service: records parsed items
app.py - CLI commands → Dashboard reporting: builds dashboard
app.py - CLI commands → AI missing filter: requests AI report
app.py - CLI commands → Inventory service: requests stock views
app.py - WhatsApp export parser → Entry parser: dispatches entries
abasto/parsers/whatsapp_parser.py - WhatsApp export parser → Exit parser: dispatches exits
abasto/parsers/whatsapp_parser.py - WhatsApp export parser → Missing parser: dispatches missing
abasto/parsers/whatsapp_parser.py - Entry parser → Quantity parser: parses quantities
abasto/parsers/inventory_parser.py - Exit parser → Quantity parser: parses quantities
abasto/parsers/exits_parser.py - Missing parser → Quantity parser: parses candidates
abasto/parsers/missing_parser.py - Missing parser → Text normalization: cleans names
abasto/parsers/missing_parser.py - Quantity parser → Text normalization: normalizes values
abasto/parsers/base.py - Entry parser → Parsed item schema: returns parsed items
abasto/parsers/inventory_parser.py - Exit parser → Parsed item schema: returns parsed items
abasto/parsers/exits_parser.py - Missing parser → Parsed item schema: returns parsed items
abasto/parsers/missing_parser.py - WhatsApp export parser → Parsed item schema: returns parsed items
abasto/parsers/whatsapp_parser.py - AI missing filter → Parsed item schema: returns parsed items
abasto/services/openai_service.py - AI missing filter → OpenAI API: calls Responses API
abasto/services/openai_service.py - Inventory service → Product catalog: resolves products
abasto/services/inventory_service.py - Inventory service → Stock movements: records movements
abasto/services/inventory_service.py - Inventory service → Purchase requests: records requests
abasto/services/inventory_service.py - Product catalog → Products and aliases: matches products
abasto/services/catalog_service.py - Product catalog → Product aliases: reads and adds aliases
abasto/services/catalog_service.py - Product catalog → Suppliers: creates suppliers
abasto/services/catalog_service.py - Product catalog → Categories: creates categories
abasto/services/catalog_service.py - Reconciliation → Inventory service: uses inventory
abasto/services/reconciliation_service.py - Dashboard reporting → Inventory service: reads inventory
abasto/services/report_service.py - Dashboard reporting → Purchase requests: reads requests
- CLI commands → Inventory service: suggests low stock
README.md - CLI commands → Dashboard reporting: shows dashboard
README.md - CLI commands → AI missing filter: generates AI report
app.py - SQLite session and schema → Products and aliases: maps models
abasto/database/db.py - SQLite session and schema → Stock movements: maps models
abasto/database/db.py - SQLite session and schema → Purchase requests: maps models
abasto/database/db.py