A lightweight full-stack food ordering demo (React + Vite frontend, Node/Express backend).
Status: Development
Foodie (QuickServe) is a sample food ordering application that includes a React + Vite frontend and an Express backend. It demonstrates user authentication, browsing dishes, adding items to a cart, and placing orders. The backend uses MongoDB for persistence and integrates with Firebase Admin for auth verification.
- Full-stack reference showing a modern React + Vite frontend paired with a Node/Express API.
- Implements common e-commerce flows: authentication, cart management, and order processing.
- Lightweight and easy to run locally for experimentation or as a starting template.
- Frontend: React, Vite, Tailwind CSS
- Backend: Node.js, Express, Mongoose (MongoDB)
- Auth / notifications: Firebase (web SDK and Firebase Admin)
backend/— Express API, Mongoose models, routesfrontend/— Vite + React app and UI components
Prerequisites
- Node.js (v16+ recommended)
- A running MongoDB instance (MongoDB Atlas or local)
- Firebase project (for auth) — service account JSON for server and web config for frontend
Quick start (run backend and frontend in separate terminals)
Backend
- Install dependencies
cd backend
npm install- Create a
.envfile inbackend/with the following variables (example):
MONGO_URI=mongodb+srv://<user>:<pass>@cluster0.mongodb.net/yourdb
JWT_SECRET=your_jwt_secret_here
# Paste the Firebase service account JSON as a single-line string (escape quotes or use single quotes)
FIREBASE_ADMIN_SDK_JSON='{ "type": "service_account", "project_id": "...", "private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n", "client_email": "..." }'
- Start the backend
# development (requires nodemon installed)
npx nodemon server.js
# or
node server.jsThe API runs on port 5000 by default. Check the root endpoint at http://localhost:5000/.
Frontend
- Install dependencies
cd frontend
npm install- Create an environment file for Vite (e.g.
.env.local) with your Firebase web config values:
VITE_APP_FIREBASE_API_KEY=...
VITE_APP_FIREBASE_AUTH_DOMAIN=...
VITE_APP_FIREBASE_PROJECT_ID=...
VITE_APP_FIREBASE_STORAGE_BUCKET=...
VITE_APP_FIREBASE_MESSAGING_SENDER_ID=...
VITE_APP_FIREBASE_APP_ID=...
VITE_APP_FIREBASE_MEASUREMENT_ID=...
VITE_API_BASE_URL=http://localhost:5000
- Start the frontend
npm run devOpen http://localhost:5173 in your browser.
- backend/server.js — Express server and route mounting
- backend/config/db.js — MongoDB connection (uses
MONGO_URI) - backend/config/firebaseAdmin.js — Firebase Admin initialization (uses
FIREBASE_ADMIN_SDK_JSON) - frontend/src/firebase.js — Frontend Firebase config (expects
VITE_env vars)
The backend exposes routes under /api:
GET /api/dishes— list dishesPOST /api/auth— authentication routesPOST /api/cart— cart operationsPOST /api/orders— create order
For details, see the route files in backend/routes/.
- Open an issue in this repository for bugs or questions.
- Inspect server logs (backend terminal) and browser console for runtime errors.
Contributions are welcome. Please open issues for proposed changes and submit pull requests. For larger changes, open an issue first so we can align on direction. If you maintain a CONTRIBUTING.md, please follow those guidelines.
See repository owners and contributors on GitHub. If you need to reach a maintainer directly, open an issue describing your question or problem.
If you'd like, I can also add a minimal CONTRIBUTING.md and example .env templates. Want me to add those now?