Thanks to visit codestin.com
Credit goes to github.com

Skip to content

An online food ordering platform with a React frontend and a Spring Boot backend. Browse categories, manage menu items, add to cart, and place orders β€” all in one place πŸ”βœ¨

Notifications You must be signed in to change notification settings

sanketzope/eatzy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Eatzy πŸ”βœ¨

An online food ordering platform with a React frontend and a Spring Boot backend. Browse categories, manage menu items, add to cart, and place orders β€” all in one place.

πŸš€ Tech Stack

  • Frontend: React 19, React Router, Bootstrap 5, React Toastify
  • Backend: Java 17, Spring Boot 3.5, Spring Data JPA
  • Database: MySQL 8+

πŸ“ Monorepo Structure

  • backend/ β€” Spring Boot API
  • frontend/ β€” React app (Create React App)

βš™οΈ Prerequisites

  • Java 17
  • Node.js 18+ and npm
  • MySQL 8+

🧰 Setup

  1. Database (MySQL)
  • Create a database named Eatzy.
  • Update credentials in backend/src/main/resources/application.properties (or set your own):
spring.datasource.url=jdbc:mysql://localhost:3306/Eatzy
spring.datasource.username=YOUR_USER
spring.datasource.password=YOUR_PASSWORD
spring.jpa.hibernate.ddl-auto=update
  1. Backend (Spring Boot)

Windows PowerShell:

cd backend
./mvnw.cmd spring-boot:run

macOS/Linux:

cd backend
./mvnw spring-boot:run
  • Default URL: http://localhost:8080
  • CORS is enabled for all origins.
  1. Frontend (React)
cd frontend
npm install
npm start
  • App runs at http://localhost:3000
  • The frontend expects the backend at http://localhost:8080

πŸ§ͺ Quick Test

  • Register and log in from the UI.
  • Add items to cart and place an order.
  • Visit admin routes under /admin to manage categories, menu, and orders.

πŸ‘€ Roles & Access

  • User (Customer):
    • Can browse categories and menu without logging in
    • Must log in to add items to cart, view cart, or check orders
  • Admin:
    • Manage categories, menu items, and orders via /admin

✨ Key Features

  • Browse and discover: Category list and menu grid with Veg/Non-Veg badges and prices
  • Search and sort: Search by name and sort by price (low to high, high to low)
  • Cart: Add, increment/decrement quantity, remove items, view total, place order
  • Orders: View your orders; list auto-refreshes periodically
  • Admin tools: CRUD for categories and menu items, view all orders

πŸ“š API Overview

Base URL: http://localhost:8080

  • πŸ” Auth & Users

    • POST /register β€” Register a user (body: User JSON)
    • POST /login-user β€” Login with { email, password }
  • 🏷️ Categories

    • POST /add-category β€” Create category (body: Category)
    • GET /get-category β€” List categories
    • PUT /update-category/{categoryId} β€” Update category
    • DELETE /delete-category/{categoryId} β€” Delete category
  • πŸ• Menu Items

    • POST /add-menu-item/{categoryId} β€” Create item in category (body: MenuItem)
    • GET /get-menu-items β€” List all items
    • GET /get-menu-item/{id} β€” Get item by id
    • PUT /update-menu-item/{menuItemId} β€” Update item
    • DELETE /delete-menu-item/{menuItemId} β€” Delete item
  • πŸ›’ Cart

    • POST /add-to-cart?userId&menuItemId&quantity β€” Add to cart
    • GET /get-cart-items β€” List all cart items
    • PUT /update-cart?cartId&quantity β€” Update quantity
    • DELETE /delete-cart?cartId β€” Remove from cart
  • πŸ“¦ Orders

    • POST /place-order?userId β€” Place order (body: List<OrderRequestDTO>)
    • GET /get-orders/{userID} β€” Orders by user
    • GET /get/orders β€” All orders (admin)
    • PUT /update-order-status?orderId&status β€” Update status
    • DELETE /delete-order?orderId β€” Delete order

🧩 Useful Notes

  • Schema is auto-managed via spring.jpa.hibernate.ddl-auto=update.
  • To change backend port, add server.port=8081 in application.properties.

πŸ™Œ Contributing

Pull requests are welcome. Please open an issue for major changes to discuss what you’d like to change.

πŸ“ License

This project is for educational/demo purposes. Add a license if you intend to distribute.

About

An online food ordering platform with a React frontend and a Spring Boot backend. Browse categories, manage menu items, add to cart, and place orders β€” all in one place πŸ”βœ¨

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published