How sh1va-sync/nalli-bokka works
This is a storefront and store-operations application: customers browse products, maintain a cart, pay, and track orders, while store staff manage inventory and fulfill or refund orders. The frontend exposes customer and store workspaces; its API layer connects those workflows to an Express backend. Backend stages include request routing and authentication, product and store management, payment/order processing, and persistence. The README is empty, so feature coverage comes from the source index and excerpts; some subsystem wiring is not sampled and is shown as unverified where appropriate.
Main entry points: paymentController.js Payment processing · orderController.js Order fulfillment · storeRoutes.js Store routes · storeController.js Store management
Components 25
Frontend workflows
- App routing
frontend/src/App.jsx - Customer checkout
frontend/src/features/customer/pages/CheckoutPage.jsx - Store dashboard
frontend/src/features/storeAdmin/pages/StoreDashboardPage.jsx - API client
frontend/src/features/api/api.js - Client state
frontend/src/app/store.js - Session state
frontend/src/features/auth/authSlice.js - Store session
frontend/src/features/storeAdmin/storeAuthSlice.js
API and access
- HTTP application
backend/src/app.js - API routes
backend/src/routes/index.js - Store routes
backend/src/routes/storeRoutes.js - Authentication
backend/src/middleware/authenticate.js - Request validation
backend/src/middleware/validate.js
Store and catalog
- Store management
backend/src/controllers/storeController.js - Products
backend/src/models/Product.js - Stores
backend/src/models/Store.js
Checkout and fulfillment
- Payment processing
backend/src/controllers/paymentController.js - Order fulfillment
backend/src/controllers/orderController.js - Pricing rules
backend/src/utils/pricing.js
Persistence and integrations
- Orders
backend/src/models/Order.js - Transactions
backend/src/models/Transaction.js - Audit logging
backend/src/services/audit.js - Razorpay
- MongoDB
backend/src/config/database.js
Other components
- Customer
- Store staff
Connections 27
- Customer → App routing: browses
frontend/src/App.jsx - Store staff → App routing: opens workspace
frontend/src/App.jsx - App routing → Customer checkout: routes to
frontend/src/App.jsx - App routing → Store dashboard: routes to
frontend/src/App.jsx - Customer checkout → API client: requests checkout
frontend/src/features/customer/pages/CheckoutPage.jsx - Store dashboard → API client: requests operations
frontend/src/features/storeAdmin/pages/StoreDashboardPage.jsx - API client → HTTP application: calls API
- HTTP application → API routes: mounts routes
backend/src/app.js - API routes → Store routes: registers store routes
- Store routes → Authentication: guards requests
backend/src/routes/storeRoutes.js - Store routes → Request validation: validates inputs
backend/src/routes/storeRoutes.js - Store routes → Store management: dispatches operations
backend/src/routes/storeRoutes.js - Store management → Products: reads and writes
backend/src/controllers/storeController.js - Store management → Stores: reads and writes
backend/src/controllers/storeController.js - Customer checkout → Client state: uses app state
- Client state → Session state: combines reducers
frontend/src/app/store.js - Client state → Store session: combines reducers
frontend/src/app/store.js - Payment processing → Pricing rules: prices selections
backend/src/controllers/paymentController.js - Payment processing → Razorpay: creates payment
- Payment processing → Orders: creates or updates
backend/src/controllers/paymentController.js - Payment processing → Transactions: records payment
backend/src/controllers/paymentController.js - Order fulfillment → Orders: updates fulfillment
backend/src/controllers/orderController.js - Order fulfillment → Transactions: checks refunds
backend/src/controllers/orderController.js - Order fulfillment → Audit logging: records changes
backend/src/controllers/orderController.js - Store management → Audit logging: records store actions
backend/src/controllers/storeController.js - Audit logging → MongoDB: persists events
backend/src/services/audit.js - Order fulfillment → Razorpay: refunds payments