Skip to content

Abhay-hack/foodie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Foodie — QuickServe

A lightweight full-stack food ordering demo (React + Vite frontend, Node/Express backend).

Status: Development

What the project does

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.

Why this project is useful

  • 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.

Tech stack

  • Frontend: React, Vite, Tailwind CSS
  • Backend: Node.js, Express, Mongoose (MongoDB)
  • Auth / notifications: Firebase (web SDK and Firebase Admin)

Repository layout

  • backend/ — Express API, Mongoose models, routes
  • frontend/ — Vite + React app and UI components

Getting started

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

  1. Install dependencies
cd backend
npm install
  1. Create a .env file in backend/ 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": "..." }'
  1. Start the backend
# development (requires nodemon installed)
npx nodemon server.js

# or
node server.js

The API runs on port 5000 by default. Check the root endpoint at http://localhost:5000/.

Frontend

  1. Install dependencies
cd frontend
npm install
  1. 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
  1. Start the frontend
npm run dev

Open http://localhost:5173 in your browser.

Important files

API (brief)

The backend exposes routes under /api:

  • GET /api/dishes — list dishes
  • POST /api/auth — authentication routes
  • POST /api/cart — cart operations
  • POST /api/orders — create order

For details, see the route files in backend/routes/.

Where to get help

  • Open an issue in this repository for bugs or questions.
  • Inspect server logs (backend terminal) and browser console for runtime errors.

Contributing

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.

Maintainers

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?

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages