How aisolutions-hash/erp-system works
Kalika Enterprises ERP manages manufacturing and B2B trading from source-report ingestion through procurement, stock, production, orders, dispatch, and reporting. The principal user workflow is to sign in, use the React pages to manage business records through FastAPI, and read results persisted in PostgreSQL. README documentation describes the GCS Excel migration and core business flows; sampled code confirms frontend authentication, API routing, and shared stock accounting. Some router-to-service wiring is not sampled, so those links are limited to documented flows.
Main entry points: routers Domain routers · stock_service.py Stock accounting · main.py FastAPI application · migration.py Excel migration
Components 21
User interface
- React application
frontend/src/App.jsx - Login state
frontend/src/context/AuthContext.jsx - ERP pages
frontend/src/pages - API client
frontend/src/lib/api.js
API and identity
- FastAPI application
backend/app/main.py - Authentication routes
backend/app/routers/auth.py - Domain routers
backend/app/routers - Database sessions
backend/app/database.py
Business operations
- Purchases and materials
backend/app/routers - Inventory and stock flow
backend/app/routers - Stock accounting
backend/app/services/stock_service.py - Production and BOM
backend/app/routers - Orders and dispatch
backend/app/routers - Planning and fulfilment
backend/app/routers - Dashboard and reports
backend/app/routers
Data ingestion
- GCS download service
backend/app/services/gcs.py - Excel migration
backend/app/services/migration.py
Other components
- ERP user
- ERP database
- Google Cloud Storage
- SMTP service
Connections 25
- ERP user → React application: uses
- React application → Login state: hosts
- Login state → API client: requests login
- ERP pages → API client: requests data
- API client → FastAPI application: calls API
- FastAPI application → Authentication routes: dispatches
- FastAPI application → Domain routers: dispatches
- Authentication routes → Database sessions: uses sessions
- Domain routers → Database sessions: uses sessions
- Database sessions → ERP database: reads and writes
- Domain routers → Purchases and materials: routes procurement
- Domain routers → Inventory and stock flow: routes stock
- Domain routers → Production and BOM: routes production
- Domain routers → Orders and dispatch: routes orders
- Domain routers → Planning and fulfilment: routes planning
- Domain routers → Dashboard and reports: routes reports
- Purchases and materials → Stock accounting: records receipts
- Production and BOM → Stock accounting: records output
- Orders and dispatch → Stock accounting: records dispatch
- Inventory and stock flow → Stock accounting: records movements
- ERP user → Excel migration: initiates import
- Excel migration → GCS download service: downloads report
- GCS download service → Google Cloud Storage: reads workbook
- Excel migration → ERP database: loads records
- Orders and dispatch → SMTP service: optional email