How lalitmohit/chiller works
Vansh Aqua is a bilingual water-delivery site with public product and contact information, subscription and event ordering, and an admin order-management area. Customers submit order details and optional payment proof; admins authenticate to review and update orders. The backend persists orders and sends notifications, with optional Cloudinary image storage. Edges reflect shown code and SOURCE INDEX references; some frontend request paths and backend contact-mail behavior are supported only by the index, so unsampled details are not expanded.
Main entry points: App.jsx Route shell · server.js HTTP server · orders.js Order endpoints · client.js API client
Components 29
Customer website
- Route shell
frontend/src/App.jsx - Home page
frontend/src/pages/Home.jsx - Products page
frontend/src/pages/Products.jsx - About page
frontend/src/pages/About.jsx - Contact page
frontend/src/pages/Contact.jsx - Order form
frontend/src/pages/Order.jsx - Navigation
frontend/src/components/Header.jsx - Language switcher
frontend/src/components/LanguageSwitcher.jsx - Translations
frontend/src/i18n.js - API client
frontend/src/api/client.js
Admin experience
- Admin login
frontend/src/pages/admin/Login.jsx - Auth state
frontend/src/context/AuthContext.jsx - Route guard
frontend/src/components/ProtectedRoute.jsx - Order dashboard
frontend/src/pages/admin/Dashboard.jsx
Backend API
- HTTP server
backend/server.js - Login endpoint
backend/src/routes/auth.js - Order endpoints
backend/src/routes/orders.js - Contact endpoint
backend/src/routes/contact.js - Admin verification
backend/src/middleware/auth.js
Persistence and services
- Order records
backend/src/models/Order.js - Admin records
backend/src/models/Admin.js - Mongo connection
backend/src/config/db.js - Image uploader
backend/src/config/cloudinary.js - Mail notifications
backend/src/config/mailer.js
Other components
- Customer
- Administrator
- MongoDB
- Cloudinary
- Email service
Connections 33
- Customer → Route shell: visits
frontend/src/App.jsx - Route shell → Home page: routes to
frontend/src/App.jsx - Route shell → Products page: routes to
frontend/src/App.jsx - Route shell → About page: routes to
frontend/src/App.jsx - Route shell → Contact page: routes to
frontend/src/App.jsx - Route shell → Order form: routes to
frontend/src/App.jsx - Route shell → Navigation: renders
frontend/src/App.jsx - Navigation → Language switcher: renders
frontend/src/components/Header.jsx - Route shell → Translations: uses translations
frontend/src/main.jsx - Order form → API client: submits order
frontend/src/pages/Order.jsx - Contact page → API client: sends contact
frontend/src/pages/Contact.jsx - Administrator → Admin login: signs in
frontend/src/pages/admin/Login.jsx - Admin login → API client: requests login
frontend/src/pages/admin/Login.jsx - Admin login → Auth state: stores session
frontend/src/pages/admin/Login.jsx - Route shell → Route guard: guards admin route
frontend/src/App.jsx - Route guard → Auth state: checks session
frontend/src/components/ProtectedRoute.jsx - Route shell → Order dashboard: routes after guard
frontend/src/App.jsx - Order dashboard → API client: loads and updates
frontend/src/pages/admin/Dashboard.jsx - Order dashboard → Auth state: logs out
frontend/src/pages/admin/Dashboard.jsx - API client → HTTP server: sends API requests
frontend/src/api/client.js - HTTP server → Mongo connection: connects before requests
backend/server.js - HTTP server → Order endpoints: mounts orders
backend/server.js - HTTP server → Login endpoint: mounts auth
backend/server.js - HTTP server → Contact endpoint: mounts contact
backend/server.js - Mongo connection → MongoDB: connects
backend/src/config/db.js - Login endpoint → Admin records: looks up admin
backend/src/routes/auth.js - Order endpoints → Order records: creates and queries
backend/src/routes/orders.js - Order endpoints → Admin verification: protects admin routes
backend/src/routes/orders.js - Order endpoints → Image uploader: uploads proof
backend/src/routes/orders.js - Image uploader → Cloudinary: configures uploader
- Order endpoints → Mail notifications: sends notification
backend/src/routes/orders.js - Mail notifications → Email service: sends mail
- Contact endpoint → Mail notifications: handles contact mail