How kurniadi2271/toko-kelontong works
Asri is a supermarket point-of-sale and management system: cashiers sign in, look up products, complete sales, and review their own transactions; administrators manage inventory, users, settings, dashboards, and reports. The static frontend communicates with an Express API backed by PostgreSQL. The checkout service is a key internal layer: it validates and prices items, updates stock, records transaction details, and commits the sale atomically. Some frontend-to-API feature wiring and unsampled settings implementations are not shown, so those links are omitted or marked unverified.
Main entry points: main.js Frontend shell · routes API routes · db.js PostgreSQL · transactionService.js Checkout & history
Components 21
Storefront
- Frontend shell
asri-frontend/js/main.js - Sign-in
asri-frontend/js/pages/auth.js - Point of sale
asri-frontend/js/pages/kasir.js - Product catalog
asri-frontend/js/pages/masterBarang.js - Stock management
asri-frontend/js/pages/stokBarang.js - Dashboard
asri-frontend/js/pages/dashboard.js - Sales reports
asri-frontend/js/pages/laporan.js - Account management
asri-frontend/js/pages/akun.js - Settings UI
asri-frontend/js/pages/settings.js
API access
- API client
asri-frontend/js/api.js - Express app
asri-backend/src/app.js - API routes
asri-backend/src/routes
Store operations
- Authentication
asri-backend/src/services/authService.js - Products & categories
asri-backend/src/services/productService.js - Stock movements
asri-backend/src/services/stockMovementService.js - Checkout & history
asri-backend/src/services/transactionService.js - Dashboard & reports
asri-backend/src/services/dashboardService.js - User administration
asri-backend/src/services/userService.js - Settings service
asri-backend/src/services/settingsService.js
Persistence
- PostgreSQL
asri-backend/src/config/db.js
Other components
- Cashier / admin
Connections 27
- Cashier / admin → Frontend shell: uses
README.md - Frontend shell → Sign-in: renders
- Frontend shell → Point of sale: renders
- Frontend shell → Product catalog: renders
- Frontend shell → Stock management: renders
- Frontend shell → Dashboard: renders
- Frontend shell → Sales reports: renders
- Frontend shell → Account management: renders
- Frontend shell → Settings UI: renders
- API client → Express app: HTTP requests
README.md - Express app → API routes: mounts
asri-backend/src/app.js - API routes → Authentication: dispatches
asri-backend/src/routes/auth.routes.js - API routes → Products & categories: dispatches
asri-backend/src/routes/product.routes.js - API routes → Checkout & history: dispatches
asri-backend/src/routes/transaction.routes.js - API routes → Dashboard & reports: dispatches
asri-backend/src/routes/dashboard.routes.js - API routes → User administration: dispatches
asri-backend/src/routes/user.routes.js - API routes → Settings service: dispatches
asri-backend/src/routes/settings.routes.js - Products & categories → Stock movements: records movements
asri-backend/src/services/productService.js - Checkout & history → Stock movements: records sale
asri-backend/src/services/transactionService.js - Dashboard & reports → Checkout & history: lists cashier sales
asri-backend/src/controllers/dashboardController.js - Authentication → PostgreSQL: queries users
asri-backend/src/services/authService.js - Products & categories → PostgreSQL: queries products
asri-backend/src/services/productService.js - Stock movements → PostgreSQL: records movements
asri-backend/src/services/stockMovementService.js - Checkout & history → PostgreSQL: commits sales
asri-backend/src/services/transactionService.js - Dashboard & reports → PostgreSQL: queries metrics
asri-backend/src/services/dashboardService.js - User administration → PostgreSQL: queries users
asri-backend/src/services/userService.js - Settings service → PostgreSQL: queries settings