Skip to content

RedeyeXDX/food-ordering-app-backend

Repository files navigation

🍽️ Food Ordering App - Backend

This is the backend service for a food ordering concept app. It allows users to place orders, authenticate, and track their order progression using Firebase Realtime Database, MySQL, and Express.js.


📦 Features

  • 🛒 Place orders from the UI and store them in the database
  • 🔐 JWT Authentication to protect private routes
  • 📝 User registration and login
  • 📈 View order progression per user
  • ⏳ Auto logout after token expiration (JWT expiry handling)

🛠️ Built With

  • JavaScript
  • Express.js
  • JWT (JSON Web Token)
  • Sequelize (ORM)
  • MySQL
  • Firebase Storage
  • ReactJS (Frontend — see Frontend Repo)

🔧 API & Services Used

  • Firebase Realtime Database
  • Firebase Storage

📁 Project Structure

project-root/
├── backend/
│ ├── db/
│ │ └── models/ # Sequelize models
│ ├── seeders/ # Seed data for development
│ ├── middleware/ # Express middleware
│ ├── router/ # Route handlers
│ │ ├── authRouter.js
│ │ ├── cartRouter.js
│ │ ├── menuRouter.js
│ │ └── restaurantRouter.js
│ ├── .env # Environment variables
│ ├── index.js # Main entry point
│ ├── package.json # Project metadata and dependencies
│ └── README.md # Project documentation

🚀 Getting Started

🔨 Prerequisites

  • Node.js v18+
  • MySQL installed and running
  • Firebase project setup (Realtime DB + Storage)

🧪 Setup

🚀 Getting Started

🔨 Prerequisites

  • Node.js v18+
  • MySQL installed and running
  • Firebase project setup (Realtime DB + Storage)

🧪 Setup

bash git clone https://github.com/RedeyeXDX/food-ordering-app-backend.git cd food-ordering-app-backend npm install

Environment Variables

Create a .env file in the root directory with the following:

PORT=8080 DB_HOST=localhost DB_USER=root DB_PASS=yourpassword DB_NAME=food_ordering JWT_SECRET=your_jwt_secret FIREBASE_API_KEY=your_firebase_key FIREBASE_PROJECT_ID=your_project_id FIREBASE_STORAGE_BUCKET=your_bucket_url

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors