Skip to content
 
 

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

IndiCrave VIT - microservices food ordering system

Node.js Version

IndiCrave VIT is a microservices-based food ordering platform built with Express and MongoDB. It includes four backend services (Users, Restaurants, Orders, Payments) and a role-aware frontend for customers, restaurant owners, and delivery partners.

Key Features

  • End-to-end order flow: browse restaurants, add items, place orders, process payment, and track delivery.
  • Multi-role experience in one app:
  • customer can order and review.
  • restaurant_owner can manage restaurant data, menus, and order states.
  • delivery_partner can claim and complete deliveries.
  • Clear microservice boundaries with separate databases per domain:
  • user_db, restaurant_db, order_db, payment_db.
  • Practical DBMS project architecture demonstrating schema design, service separation, and cross-service frontend orchestration.

Project Structure

IndiCraveVIT/
|-- backend/
|   |-- user_server.js
|   |-- restaurant_server.js
|   |-- order_server.js
|   |-- payment_server.js
|   `-- package.json
|-- frontend/
|   |-- index.html
|   |-- app.js
|   |-- styles.css
|   `-- assets/
`-- README.md

Services and Ports

Getting Started

Prerequisites

  • Node.js 18+
  • npm 9+
  • MongoDB running locally on mongodb://127.0.0.1:27017

1. Install backend dependencies

cd backend
npm install

2. Start all backend microservices

Open 4 terminals inside backend:

node user_server.js
node restaurant_server.js
node order_server.js
node payment_server.js

3. Run the frontend

Option A: open frontend/index.html directly in your browser.

Option B (recommended): serve frontend with any static server (for example VS Code Live Server).

Usage Examples

Health checks

curl http://localhost:3000/
curl http://localhost:3001/
curl http://localhost:3002/
curl http://localhost:3003/

Create roles (required before registration if roles collection is empty)

curl -X POST http://localhost:3000/roles \
	-H "Content-Type: application/json" \
	-d '{"role_name":"customer","permissions":["place_order","review"]}'

curl -X POST http://localhost:3000/roles \
	-H "Content-Type: application/json" \
	-d '{"role_name":"restaurant_owner","permissions":["manage_restaurant","manage_menu","update_orders"]}'

curl -X POST http://localhost:3000/roles \
	-H "Content-Type: application/json" \
	-d '{"role_name":"delivery_partner","permissions":["claim_order","mark_delivered"]}'

Register and log in a customer

curl -X POST http://localhost:3000/users/register \
	-H "Content-Type: application/json" \
	-d '{"full_name":"Test User","email":"test@example.com","phone":"9876543210","password":"test123","role_name":"customer"}'

curl -X POST http://localhost:3000/users/login \
	-H "Content-Type: application/json" \
	-d '{"email":"test@example.com","password":"test123"}'

Tech Stack

  • Backend: Express, Mongoose, CORS, bcryptjs
  • Frontend: HTML, CSS, Vanilla JavaScript
  • Database: MongoDB (one DB per microservice)

Dependency source: backend/package.json

Where To Get Help

Contributors

  • Kushaagra Sood
  • Siddhartha Gupta
  • Abhishek Paul

Contributions are welcome through pull requests.

Suggested lightweight workflow:

  1. Fork the repository.
  2. Create a feature branch.
  3. Make small, focused commits with clear messages.
  4. Add or update tests/check scripts where applicable.
  5. Open a pull request describing what changed and why.

For larger changes, open an issue first to discuss scope and design.

Notes

  • Payment processing in backend/payment_server.js is simulated (randomized success/failure).
  • Order and payment services are linked by order_id; refund flow is supported.
  • This repository currently does not include CI config or a dedicated API docs site.

About

Distributed food ordering platform using Node.js, Express, and MongoDB, implementing a microservices architecture with database-per-service pattern (User, Restaurant, Order, Payment) and RESTful APIs.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages