Skip to content

The backend API for the MERN Food Ordering app handles restaurant listings, user profiles, authentication, and order management. Built with Express, it includes endpoints for searching, filtering, and updating orders. Integrated with Stripe for payments and Auth0 for secure user authentication.

Notifications You must be signed in to change notification settings

AnasHany2193/mern-food-ordering-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MERN Food Ordering - Backend 🍔🍕🍜

Welcome to the backend repository for the MERN Food Ordering App! This project handles API functionality, database management, and integrations for a full-featured food ordering platform.

Project Overview 🚀

The backend is built with Node.js, Express, MongoDB, and Mongoose. It manages restaurant listings, user profiles, order processing, payment via Stripe, and much more. This repository works in tandem with the frontend found here, which completes the user interface.

Key Features ✨

  • User Authentication: Auth0 for secure, managed authentication.
  • Restaurant Management: API endpoints for adding, updating, and managing restaurant data.
  • Order Management: Create, update, and track customer orders.
  • Payment Integration: Stripe for processing payments.
  • Search and Filtering: Allows searching by cuisine, rating, etc.

Setup Guide 🛠

Prerequisites

  • Node.js & npm
  • MongoDB
  • Auth0 account
  • Stripe account

Installation Steps

  1. Clone the repository:

    git clone https://github.com/AnasHany2193/mern-food-ordering-backend.git
    cd mern-food-ordering-backend
  2. Install dependencies:

    npm install
  3. Configure Environment Variables: Create a .env file at the root of the project with the following variables:

    PORT=5000
    
    MONGODB_CONNECTION_STRING=<Your MongoDB Connection String>
    
    AUTH0_AUDIENCE=<Your Auth0 API Audience>
    AUTH0_ISSUER_BASE_URL=<Your Auth0 Issuer URL>
    AUTH0_TOKEN_SIGNING_ALG=<Your Auth0 Token Signing Algorithm>
    
    CLOUDINARY_API_KEY=<Your Cloudinary API Key>
    CLOUDINARY_API_SECRET=<Your Cloudinary API Secret>
    CLOUDINARY_CLOUD_NAME=<Your Cloudinary Cloud Name>
    
    FRONTEND_URL=<Your Frontend URL>
    STRIPE_API_KEY=<Your Stripe API Key>
    STRIPE_WEBHOOK_SECRET=<Your Stripe Webhook Secret>
    
  4. Start the Development Server:

    npm run dev

    The backend will be available at http://localhost:7000.

Frontend Setup 🌐

To complete the project, clone and set up the frontend as described here. Make sure the frontend .env file is configured to connect with this backend.

Project Video 📹

A demo video

API Endpoints 📚

  • Authentication: /api/auth
  • Restaurants: /api/restaurants
  • Orders: /api/orders
  • Payments: /api/payments

Contributing 🤝

Feel free to open issues, make pull requests, or suggest improvements!

About

The backend API for the MERN Food Ordering app handles restaurant listings, user profiles, authentication, and order management. Built with Express, it includes endpoints for searching, filtering, and updating orders. Integrated with Stripe for payments and Auth0 for secure user authentication.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •