https://github.com/d-evm/rapidmart
Mimicing the operational flow of modern quick-commerce
https://github.com/d-evm/rapidmart
java maven q-commerce quick-commerce spring spring-boot
Last synced: about 2 months ago
JSON representation
Mimicing the operational flow of modern quick-commerce
- Host: GitHub
- URL: https://github.com/d-evm/rapidmart
- Owner: d-evm
- Created: 2025-06-08T18:50:56.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-06-09T17:19:52.000Z (about 1 year ago)
- Last Synced: 2025-06-09T18:19:26.972Z (about 1 year ago)
- Topics: java, maven, q-commerce, quick-commerce, spring, spring-boot
- Language: Java
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ RapidMart โ Quick-Commerce Backend System (Under development)
RapidMart is a Spring Boot-based backend system that mimics the operational flow of modern quick-commerce services like Zepto, Blinkit, and Instamart. The focus is on logistics, zone-based store allocation, and real-time delivery simulation โ not just carts and listings.
---
## ๐ Features
- โ
JWT-based Signup & Login
- โ
Product listing by user's zone (auto-resolved from pincode)
- โ
Store selection based on stock & proximity
- โ
ETA calculation: processing + delivery + buffer
- โ
Live order tracking via WebSocket
- โ
Realistic delivery simulation (10km/h, buffers)
- โ
Inventory deduction on order
- โ
Scheduler updates order status every 30s
---
## ๐ฆ Tech Stack
| Layer | Tech |
|--------------|------------------------------|
| Backend | Java, Spring Boot |
| Security | Spring Security, JWT |
| Real-time | WebSockets (STOMP + SockJS) |
| Database | PostgreSQL |
| Testing | Postman, HTML Client |
---
## ๐ Authentication
Use the `/auth/signup` and `/auth/login` endpoints to get a JWT token.
Then pass it in the `Authorization` header like:
```
Authorization: Bearer
```
---
## ๐ก WebSocket Live Order Tracking
You can test **live order tracking** in real time using this demo page:
๐ [๐ฅ Live WebSocket Demo](https://d-evm.github.io/rapidmart-html-client/)
### How to Use:
1. Place an order via `/orders` (see Postman below)
2. Open the demo link
3. Enter:
- `Order ID` (from response)
- `JWT Token` (from login)
4. You will receive live updates like:
```
Status: Out for Delivery | 6 min left
```
---
## ๐ Order Flow
1. User logs in (JWT token)
2. User places order (POST `/orders`)
3. System:
- Selects nearest store with full inventory
- Deducts stock
- Calculates ETA
4. Background scheduler updates order status every 30s
5. User receives WebSocket push updates
---
## ๐งช Postman Collection
You can import this collection to test signup, login, order placement, etc.
๐ฅ [Download RapidMart Postman Collection](./client-test/RapidMart_Postman_Collection.json)
---
## ๐ Project Structure
```
src/main/java/com/rapidmart/
โโโ controllers # REST Controllers
โโโ dtos # Request/Response DTOs
โโโ models # JPA Entities
โโโ repositories # Spring Data JPA Repositories
โโโ schedulers # WebSocket update scheduler
โโโ security # JWT, Filters, Configs
โโโ services # Business logic
โโโ config # WebSocket & app configs
โโโ RapidMartApplication.java
```
---
## ๐ Running the App
```bash
# Clone backend
git clone https://github.com/yourusername/rapidmart-backend.git
cd rapidmart-backend
# Configure PostgreSQL (update application.properties)
# Run the app
./mvnw spring-boot:run
```
App runs at: `http://localhost:8084`
---
## ๐ GitHub Pages Demo
The real-time HTML WebSocket client is deployed live:
๐ https://d-evm.github.io/rapidmart-html-client/
If you want to run it locally:
```bash
cd client-test
open rapidmart_order_tracker.html
```