Root structure
Frontend directory
Thesrc/frontend/ directory contains the React + TypeScript application:
Backend directory
TheBMS_POS_API/ directory contains the .NET Core API:
API controllers
The API includes controllers for:- Authentication - PIN-based login and manager validation
- Employees - User management and PIN resets
- Products - Catalog, barcode scanning, and stock alerts
- Sales - Transaction processing and reporting
- Returns - Return processing and approval workflows
- Inventory - Batch tracking and stock adjustments
- Settings - System, tax, and admin configuration
- Audit - User activity logging
- Health - API health checks
Configuration files
Key configuration files in the root:.env- Environment variables for database connection (not committed to version control).env.example- Template showing required environment variablespackage.json- Frontend dependencies and npm scriptsBMS_POS_API.csproj- Backend dependencies and .NET project configuration
Development scripts
Thescripts/ directory contains:
dev.sh- Single command to start all services (API, Vite, Electron)
Multi-display support
The Electron layer supports multi-display configurations throughsrc/electron/main.js:
- Primary display (
npm run display0) - Secondary display (
npm run display1) - Tertiary display (
npm run display2) - Touch-enabled display (
npm run dev-touch)
Logging
All API requests are logged to structured JSON files:Architecture benefits
- Separation of concerns - Frontend, backend, and database layers are clearly separated
- Type safety - TypeScript on frontend, C# on backend
- Hot reload - Fast development with Vite
- Structured logging - JSON logs for analysis
- Real-time database - Supabase subscriptions enabled
- Offline-ready - Electron works without internet (API must be local)
- Cross-platform - Windows, macOS, Linux support