How manikantha-asam/vishnufoods works
Project Type and Purpose
• This is a full-stack web application called “College Canteen Food Preorder System.”
• Frontend: static HTML/CSS pages (home.html, loginpage.html, myorders.html, orders.html, vishnufoods.html) and client-side JavaScript (vishnufoods.js).
• Backend: Node.js + Express.js server that serves pages and may proxy or coordinate requests.
• Data & Auth: Firebase Authentication and Firebase Firestore (key.json holds Firebase config).
File Structure
• Top-level files:
• README.md, LICENSE – documentation
• home.html, loginpage.html, myorders.html, orders.html, vishnufoods.html – UI entry points
• vishnufoods.js – client-side logic to interact with Firebase
• key.json – Firebase project credentials/configuration
• No separate “src” folder shown, but Express routes and middleware should be inferred (likely in an unlisted server file).
README for Additional Insights
• Features: user registration/login, preorder, order management, real-time updates.
• Tech stack: Node.js, Express, Firebase Auth, Firebase Firestore, HTML/CSS.
• Runtime: npm start → Express server on port 3000.
a. Main Components
• Client Browser (Mobile/Desktop)
• Express.js Server (Node.js)
• Firebase Authentication Service
• Firebase Firestore Database
• Static Assets (HTML/CSS/JS)
b. Relationships & Interactions
1. User→Browser loads HTML pages from Express static routes.
2. Browser (vishnufoods.js) uses Firebase SDK to authenticate (sign-up/sign-in) with Firebase Auth.
3. Authenticated Browser reads/writes order data to Firestore.
4. Admin interface (orders.html) fetches all orders from Firestore; updates status.
c. Architectural Patterns
• Client-server separation: static front end vs. backend server.
• BFF (Backend-for-Frontend): Express serves pages and could enforce security rules.
• Real-time data via Firestore listeners.
d. Key Technologies
• Express.js for serving assets and routing.
• Firebase Auth SDK for authentication flows.
• Firebase Firestore SDK for data persistence and real-time updates.