How herman1908/pos_rw works
Alfamart POS is a browser-based retail checkout and inventory system backed by an Express API and MySQL. A cashier uses the frontend to browse products, build a cart, and submit payment; the backend validates and records the transaction, then updates stock. The same API supports product and category management, restocking, transaction history, and sales reports. The README documents these capabilities; sampled backend excerpts show route handlers querying through the shared database pool, but do not establish detailed frontend wiring or all transaction internals.
Main entry points: server.js Express API · db.js MySQL Pool · index.html POS Interface
Components 14
Cashier Interface
- POS Interface
frontend/index.html - Product Management
frontend/index.html - History & Reports
frontend/index.html
API Workflows
- Express API
backend/server.js - Checkout & Sales
backend/server.js - Product Catalog
backend/server.js - Categories
backend/server.js - Restocking
backend/server.js - Transaction History
backend/server.js - Sales Reports
backend/server.js - Stock Logs
backend/server.js
Data Persistence
- MySQL Pool
backend/db.js - MySQL Database
Other components
- Cashier
Connections 21
- Cashier → POS Interface: uses
- Cashier → Product Management: manages
- Cashier → History & Reports: reviews
- POS Interface → Express API: requests checkout
- Product Management → Express API: requests changes
- History & Reports → Express API: requests records
- Express API → Checkout & Sales: dispatches
- Express API → Product Catalog: dispatches
- Express API → Categories: dispatches
- Express API → Restocking: dispatches
- Express API → Transaction History: dispatches
- Express API → Sales Reports: dispatches
- Express API → Stock Logs: dispatches
- Checkout & Sales → MySQL Pool: queries
- Product Catalog → MySQL Pool: queries
- Categories → MySQL Pool: queries
- Restocking → MySQL Pool: queries
- Transaction History → MySQL Pool: queries
- Sales Reports → MySQL Pool: queries
- Stock Logs → MySQL Pool: queries
- MySQL Pool → MySQL Database: reads and writes