Skip to content

Pranab239/Tomato

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tomato - MERN Stack Food Delivery Web Application

Table of Contents

Introduction

Tomato is a full-fledged food delivery web application built using the MERN stack (MongoDB, Express, React, and Node.js). This project includes a fully responsive front end, a robust back end, and an admin panel to manage food items and orders. It supports user authentication, shopping cart functionality, and order placement with Stripe integration for payments.

Features

Front End

  • Menu Section: Browse food items categorized by type. Each item has an add-to-cart option.
  • Responsive Design: The web application is fully responsive and works seamlessly across various devices.
  • User Authentication: Users can sign up and log in to their accounts. Authentication is managed using JWT (JSON Web Tokens).
  • Profile Management: Users can view and update their profiles.
  • Cart Functionality: Users can add items to their cart, view the cart, and proceed to checkout.
  • Order Placement: Users can place orders from their cart and complete payments using Stripe.

Back End

  • Express Server: Handles API requests and communicates with the MongoDB database.
  • User Authentication: Implements secure user authentication using JWT.
  • Data Management: CRUD operations for managing food items and orders.

Admin Panel

  • Add Items: Admins can add new food items to the menu.
  • List Items: View a list of all available food items.
  • Manage Orders: View and update orders. Changes in order status are automatically reflected in the user interface.

Authentication

  • Sign Up/Login: Users can create an account or log in to an existing account.
  • JWT Authentication: Secure authentication using JSON Web Tokens.

Database

  • MongoDB: Stores user information, food items, and orders.

Technologies Used

  • Front End: React.js, HTML, CSS, JavaScript
  • Back End: Node.js, Express.js
  • Database: MongoDB
  • Authentication: JWT (JSON Web Tokens)
  • Payment Processing: Stripe
  • State Management: React Hooks, Context API
  • Styling: CSS, responsive design

Installation

  1. Clone the repository:

    git clone git@github.com:Pranab239/Tomato.git
    cd Tomato
  2. Install dependencies:

    npm install
    cd client
    npm install
    cd ..
  3. Set up environment variables: Create a .env file in the root directory and add the following:

    MONGO_URI=your_mongodb_uri
    JWT_SECRET=your_jwt_secret
    STRIPE_SECRET_KEY=your_stripe_secret_key
  4. Run the application:

    npm run dev

Usage

  1. Start the server:

    npm run server
  2. Start the client:

    cd client
    npm start
  3. Access the application: Open your browser and navigate to http://localhost:4000

API Endpoints

Authentication

  • POST /api/user/register: Register a new user
  • POST /api/user/login: Login an existing user

Food Items

  • GET /api/food/list: Get a list of all food items
  • POST /api/food/add: Add a new food item (Admin only)

Orders

  • GET /api/order/list: Get a list of all orders (Admin only)
  • POST /api/order/place: Place a new order

Screenshots

User-View

1. Home Page:

Tomato_Homepage

2. Menu Page

Tomato_Menu

3. Selection Feature:

Tomato_SelectFeature

4. Cart Page

Tomato_cartPage

5. Delivery Page:

Tomato_Delivery

6. Payment Page:

Tomato_PaymentPage

Admin-View

1. Add Item Panel:

Screenshot from 2024-07-29 17-22-28

2. List Item Panel:

Screenshot from 2024-07-29 17-23-08

3. Orders Panel:

Screenshot from 2024-07-29 17-23-15

Contributing

Contributions are welcome! Please fork this repository and submit a pull request for any features, improvements, or bug fixes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgement

Thanks for the superb video from GreatStack . link: https://www.youtube.com/watch?v=DBMPXJJfQEA

Contact

For any inquiries or questions, please contact:

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors