Skip to content

ismaileub/resturant-website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

🍽️ Food Paradise

Food Paradise is a full‑stack restaurant platform that supports menu browsing, ordering, reservations, reviews, and a role‑based dashboard for users and admins. The client is built with React (Vite) and Tailwind, while the server provides secure REST APIs with JWT, Stripe payments, and MongoDB.

🔗 Live Links

✨ Features

  • Responsive landing pages, menu, and category browsing
  • Firebase authentication with protected routes
  • JWT-secured API calls and role‑based access (admin/user)
  • Cart management and Stripe checkout
  • Reviews, reservations, and booking management
  • Admin dashboard: manage users, items, and analytics
  • Image upload for menu items (ImgBB)

🧰 Tech Stack

Client

  • React 18 + Vite
  • Tailwind CSS + DaisyUI
  • React Router
  • TanStack Query
  • Axios
  • Firebase Auth
  • Stripe (client)

Server

  • Node.js + Express
  • MongoDB (Atlas)
  • JWT authentication
  • Stripe (payments)
  • Mailgun (email integration, optional)
  • CORS + dotenv

📁 Project Structure

  • client---side — React client app
  • server---side — Express API server

✅ Prerequisites

  • Node.js (LTS recommended)
  • MongoDB Atlas cluster
  • Firebase project (Web app)
  • Stripe account (publishable + secret keys)
  • ImgBB API key (for image upload)
  • Mailgun API key (optional, for emails)

⚙️ Setup (Local)

1) Server

  1. Open a terminal in server---side and install dependencies.
  2. Create a .env file in server---side.
  3. Start the server.

Example server---side/.env:

PORT=5000 DB_USER=your_mongodb_user DB_PASS=your_mongodb_password ACCESS_TOKEN_SECRET=your_jwt_secret STRIPE_SECRET_KEY=your_stripe_secret_key MAILGUN_API_KEY=your_mailgun_api_key MAIL_SENDING_DOMAIN=your_mailgun_domain

Start server:

npm install npm start

2) Client

  1. Open a terminal in client---side and install dependencies.
  2. Create a .env file in client---side.
  3. Start the client.

Example client---side/.env:

VITE_APIKEY=your_firebase_api_key VITE_AUTHDOMAIN=your_firebase_auth_domain VITE_PROJECTID=your_firebase_project_id VITE_STORAGEBUCKET=your_firebase_storage_bucket VITE_MESSAGINGSENDERID=your_firebase_sender_id VITE_APPID=your_firebase_app_id VITE_IMAGE_HOSTING_KEY=your_imgbb_key VITE_Payment_Gateway_PK=your_stripe_publishable_key

Start client:

npm install npm run dev

🔧 Configuration Notes

  • API base URL is hard‑coded in the Axios helpers. Update both files if you run the server locally:
    • client---side/src/components/Hooks/useAxiosPublic.jsx
    • client---side/src/components/Hooks/useAxiosSecure.jsx
  • Update allowed origins for CORS in server---side/index.js if your client URL changes.

🔌 API Endpoints (Overview)

  • Auth: POST /jwt
  • Menu: GET /menu, GET /menu/:id, POST /menu, PATCH /menu/:id, DELETE /menu/:id
  • Users: GET /users, POST /users, PATCH /users/admin/:id, GET /users/admin/:email, DELETE /users/:id
  • Cart: GET /carts, POST /carts, DELETE /carts/:id
  • Reviews: POST /reviews
  • Reservations: POST /reservations, GET /bookings, PATCH /bookings/:id
  • Payments: POST /create-payment-intent, POST /payments, GET /payments/:email
  • Analytics: GET /admin-stats, GET /order-stats

🧪 Scripts

Client (client---side):

  • npm run dev
  • npm run build
  • npm run preview

Server (server---side):

  • npm start

📝 License

This project is for learning and portfolio use.

About

This is a full-stack restaurant web application built with React, Node.js, and Express, featuring user authentication, secure API routes and dynamic menu/shop management.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages