How sayandutta07/bachatbasket works
Bachatbasket is a quick-commerce comparison and basket-optimization application. Its API serves product prices and platform details, checks delivery serviceability, compares single-store and split-store basket totals, and supports user profiles and saved orders. The documented workflow is sparse, so the map follows the sampled Express routes and their actual calls: the server dispatches requests, the basket route invokes the optimizer, and routes and optimizer access SQLite. The server also serves the frontend files. Frontend behavior is not sampled; reverse-geocoding’s external service is explicit in source.
Main entry points: server.js Express server · db.js Platform and product data · serviceability.js Serviceability · index.html Web interface
Components 13
API routing
- Express server
server.js
Comparison and location
- Product comparison
routes/products.js - Platform details
routes/platforms.js - Basket endpoint
routes/basket.js - Basket optimizer
optimizer.js - Serviceability
routes/serviceability.js
Accounts and orders
- User profiles
routes/auth.js - Order history
routes/orders.js
Persistent data
- Platform and product data
db.js - SQLite database
bachatbasket.db
Other components
- Shopper
- Web interface
index.html - Nominatim
Connections 19
- Shopper → Web interface: uses
- Web interface → Express server: API requests
- Express server → Product comparison: routes requests
server.js - Express server → Platform details: routes requests
server.js - Express server → Basket endpoint: routes requests
server.js - Express server → Serviceability: routes requests
server.js - Express server → User profiles: routes requests
server.js - Express server → Order history: routes requests
server.js - Express server → Web interface: serves files
server.js - Basket endpoint → Basket optimizer: calls
routes/basket.js - Product comparison → Platform and product data: reads and writes
routes/products.js - Platform details → Platform and product data: reads and writes
routes/platforms.js - Basket optimizer → Platform and product data: reads
optimizer.js - Serviceability → Platform and product data: reads
routes/serviceability.js - User profiles → Platform and product data: reads and writes
routes/auth.js - Order history → Platform and product data: reads and writes
routes/orders.js - Express server → Platform and product data: initializes
server.js - Platform and product data → SQLite database: opens
db.js - Serviceability → Nominatim: reverse geocodes
routes/serviceability.js