Skip to content

Emmanard/TasteHub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🍕 TasteHub — Food Delivery Platform

A full-stack food delivery application built with the MERN stack (MongoDB, Express.js, React.js, Node.js). This platform allows users to browse food items, manage their cart and favorites, and place orders seamlessly.

🚀 Features

For Customers

  • User Authentication: Sign up and login with secure JWT authentication
  • Food Browsing: Browse and search food items by category and keywords
  • Product Details: View detailed food item information with images and descriptions
  • Shopping Cart: Add/remove items with quantity management
  • Favorites: Save favorite food items for quick access
  • Order Placement: Place orders with order tracking
  • Order History: View past orders and order details
  • Search & Filter: Advanced search with category filtering

🛠️ Tech Stack

Frontend

  • React.js (v18.2.0) - UI library for building user interfaces
  • Redux Toolkit (v2.2.1) - State management with modern Redux patterns
  • React Router DOM (v6.22.3) - Client-side routing
  • Material-UI (v5.15.14) - React component library
  • Styled Components (v6.1.8) - CSS-in-JS styling
  • Axios (v1.6.8) - HTTP client for API requests
  • Redux Persist (v6.0.0) - Persist Redux state

Backend

  • Node.js - JavaScript runtime environment
  • Express.js (v4.18.2) - Web application framework
  • MongoDB - NoSQL database
  • Mongoose (v6.8.2) - MongoDB object modeling
  • JWT (v9.0.2) - JSON Web Tokens for authentication
  • Bcrypt (v5.1.1) - Password hashing
  • Nodemailer (v6.9.12) - Email notifications
  • CORS (v2.8.5) - Cross-origin resource sharing
  • Dotenv (v16.0.3) - Environment variable management

📦 Installation & Setup

Prerequisites

  • Node.js (v14 or higher)
  • MongoDB (local or Atlas)
  • npm package manager

Clone the Repository

git clone https://github.com/Emmanard/TasteHub.git
cd TasteHub

Backend Setup

cd server
npm install
touch .env
npm start

Frontend Setup

cd client
npm install
touch .env
npm start

🔧 Environment Variables

Backend (.env)

MONGODB_URL=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
PORT=8080
EMAIL_USER=your_email_address
EMAIL_PASS=your_email_password

Frontend (.env)

REACT_APP_API_BASE_URL=http://localhost:8080

📁 Project Structure

TasteHub/
├── server/
│   ├── controllers/
│   ├── middleware/
│   ├── models/
│   ├── routes/
│   ├── utils/
│   └── index.js
├── client/
│   ├── public/
│   ├── src/
│   │   ├── components/
│   │   ├── pages/
│   │   ├── redux/
│   │   ├── api/
│   │   ├── utils/
│   │   └── App.js
│   └── package.json
└── README.md

🔗 API Endpoints

Authentication

  • POST /user/signup - User registration
  • POST /user/signin - User login

Food Items

  • GET /food - Get all food items with optional filtering
  • GET /food/:id - Get specific food item details
  • Query Parameters: search, category

Cart Management

  • GET /user/cart - Get user's cart items
  • POST /user/cart - Add item to cart
  • PATCH /user/cart - Remove/update item in cart

Favorites

  • GET /user/favorite - Get user's favorite items
  • POST /user/favorite - Add item to favorites
  • PATCH /user/favorite - Remove item from favorites

Orders

  • POST /user/order - Place a new order
  • GET /user/order - Get user's order history

🔒 Authentication

JWT tokens stored in localStorage with key foodeli-app-token, included in API requests via Authorization headers.

🛡️ Error Handling

  • Authentication errors (401/403) with automatic token management
  • Network error handling
  • Server error responses with user-friendly messages

🚀 Deployment

Backend: Render/Railway — set MONGODB_URL, JWT_SECRET, PORT=8080

Frontend: Vercel/Netlify — set REACT_APP_API_BASE_URL

🔄 Version History

  • v1.0.0 - Initial release with core food ordering functionality
  • v1.1.0 - Added favorites and enhanced search functionality
  • v1.2.0 - Improved cart management and order tracking

👤 Author

Emmanuel OmunizuaGitHub

📧 emmanuelomunizua@gmail.com


⭐ Star this repository if you found it helpful!

Releases

No releases published

Packages

 
 
 

Contributors