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.
- Frontend (Firebase Hosting): https://food-paradise-84029.web.app
- API Base URL (Vercel): https://food-paradise-server-rose.vercel.app
- 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)
- React 18 + Vite
- Tailwind CSS + DaisyUI
- React Router
- TanStack Query
- Axios
- Firebase Auth
- Stripe (client)
- Node.js + Express
- MongoDB (Atlas)
- JWT authentication
- Stripe (payments)
- Mailgun (email integration, optional)
- CORS + dotenv
- client---side — React client app
- server---side — Express API server
- 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)
- Open a terminal in server---side and install dependencies.
- Create a .env file in server---side.
- 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
- Open a terminal in client---side and install dependencies.
- Create a .env file in client---side.
- 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
- 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.
- 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
Client (client---side):
- npm run dev
- npm run build
- npm run preview
Server (server---side):
- npm start
This project is for learning and portfolio use.