You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A production-ready, microservices-based Indian grocery e-commerce platform built with Angular 21 and .NET 10. Features real-time notifications, SignalR chat, Razorpay payments, Google OAuth2, AI shopping assistant (Gemini), and full Docker Compose deployment.
Browse 52 Indian grocery products across 21 categories
Live search with autocomplete suggestions
Filter by category, brand, price range, on-sale status
Sort by name, price (asc/desc), top rated
Product detail with images, stock status, average rating
Star ratings and written reviews
Compare up to 3 products side by side
Recently viewed products (localStorage)
Shopping cart with quantity controls and budget limit
Coupon code validation at checkout
Razorpay payment gateway (test mode)
Order history with status timeline
Real-time order tracking
Real-time notifications (bell icon with unread badge)
Support ticket system with real-time SignalR chat
User profile — edit name, phone, manage addresses, change password
Google OAuth2 sign-in
AI Shopping Assistant (Gemini 2.5 Flash):
Chat mode — ask anything about groceries
Recipe mode — enter a dish name, get ingredients auto-added to cart
Admin
Dashboard with KPIs (revenue, orders, products, users)
Product management — create, edit, update stock, set discount %
Order management — view all orders, update status
User management — view, edit role, activate/deactivate, delete
Support ticket management with real-time chat
Store Manager
Product and inventory management (stock, discounts)
Order management and status updates
Support ticket handling
Delivery Driver
View assigned deliveries
Update delivery status in real time
API Reference
All requests go through the API Gateway at http://localhost:5000.
Base path: /api/v1
Auth
Method
Endpoint
Auth
Description
POST
/auth/register
—
Register new customer
POST
/auth/login
—
Email/password → JWT
POST
/auth/google
—
Google OAuth2 → JWT
POST
/auth/refresh
—
Refresh access token
POST
/auth/logout
✓
Invalidate refresh token
GET
/auth/me
✓
Current user profile
PUT
/auth/me
✓
Update profile
POST
/auth/change-password
✓
Change password
Products
Method
Endpoint
Auth
Description
GET
/products
—
List (q, categoryId, brand, minPrice, maxPrice, sortBy, page, pageSize)
GET
/products/:id
—
Single product
GET
/products/brands
—
Distinct brands (optional categoryId filter)
GET
/products/suggestions
—
Live search suggestions
GET
/products/on-sale
—
Products with discount > 0
GET
/products/low-stock
Admin/Manager
Stock ≤ 10
POST
/products
Admin/Manager
Create product
PUT
/products/:id
Admin/Manager
Full update (name, price, category, discount, active…)
PATCH
/products/:id/stock
Admin/Manager
Update stock quantity
PATCH
/products/:id/discount
Admin/Manager
Set discount % (0–100)
Categories
Method
Endpoint
Auth
Description
GET
/categories
—
All categories
POST
/categories
Admin
Create category
Cart
Method
Endpoint
Auth
Description
GET
/cart
✓
Get cart
POST
/cart/items
✓
Add item
PUT
/cart/items/:productId
✓
Update quantity
DELETE
/cart/items/:productId
✓
Remove item
DELETE
/cart
✓
Clear cart
Orders
Method
Endpoint
Auth
Description
GET
/orders
✓
My orders / All orders (Admin)
GET
/orders/:id
✓
Order detail
POST
/orders/create-payment
✓
Create Razorpay order
POST
/orders/verify-payment
✓
Verify signature + create DB order
PATCH
/orders/:id/status
Admin/Driver
Update order status
Payments
Method
Endpoint
Auth
Description
POST
/payments/create-order
✓
Create Razorpay order
POST
/payments/verify
✓
Verify payment signature
POST
/payments/webhook
—
Razorpay webhook handler
Reviews
Method
Endpoint
Auth
Description
GET
/products/:id/reviews
—
Get reviews
POST
/products/:id/reviews
✓
Submit review
Coupons
Method
Endpoint
Auth
Description
POST
/coupons/validate
✓
Validate coupon code
GET
/coupons
Admin
All coupons
POST
/coupons
Admin
Create coupon
Notifications
Method
Endpoint
Auth
Description
GET
/notifications
✓
My notifications
PATCH
/notifications/:id/read
✓
Mark as read
PATCH
/notifications/read-all
✓
Mark all as read
Support
Method
Endpoint
Auth
Description
GET
/support/tickets
✓
My tickets / All (Admin)
POST
/support/tickets
✓
Open new ticket
GET
/support/tickets/:id
✓
Ticket + messages
POST
/support/tickets/:id/messages
✓
Send message
PATCH
/support/tickets/:id/status
Admin
Close / reopen
Users (Admin)
Method
Endpoint
Auth
Description
GET
/users
Admin
All users
PUT
/users/:id
Admin
Update user
PATCH
/users/:id/role
Admin
Change role
PATCH
/users/:id/active
Admin
Activate / deactivate
DELETE
/users/:id
Admin
Delete user
AI
Method
Endpoint
Auth
Description
POST
/ai/chat
✓
Grocery chat (Gemini)
POST
/ai/recipe
✓
Recipe → ingredient list
Deliveries
Method
Endpoint
Auth
Description
GET
/deliveries
Driver/Admin
My deliveries
PATCH
/deliveries/:id/status
Driver
Update status
SignalR Hubs
Hub
Path
Events
Notifications
/hubs/notifications
ReceiveNotification
Support Chat
/hubs/support
ReceiveMessage, TicketUpdated
Authentication Flow
Email/Password
POST /auth/login → { accessToken, refreshToken, expiresAt, role }
accessToken stored in localStorage
HTTP interceptor attaches: Authorization: Bearer <token>
On 401 → interceptor calls POST /auth/refresh automatically
On refresh failure → redirect to /auth/login
Google OAuth2
Google Identity Services renders sign-in button
User clicks → Google returns credential (JWT)
POST /auth/google { idToken }
Backend verifies via Google tokeninfo endpoint
User found-or-created → app JWT issued
Payment Flow (Razorpay)
1. POST /orders/create-payment
→ OrderService proxies to PaymentService
→ Razorpay order created, { razorpayOrderId, amount, currency } returned
2. Razorpay JS SDK popup opens in browser
→ User enters card / UPI / netbanking
3. POST /orders/verify-payment { razorpayOrderId, razorpayPaymentId, razorpaySignature }
→ HMAC-SHA256 signature verified server-side
→ Order saved to DB with status PaymentConfirmed
→ RabbitMQ event published → NotificationService sends email + push notification
Event-Driven Messaging (RabbitMQ)
Event
Publisher
Consumer
Action
order.created
OrderService
NotificationService
Send order confirmation email
order.status_changed
OrderService
NotificationService
Send status update email + push
user.registered
AuthService
NotificationService
Send welcome email
payment.confirmed
PaymentService
OrderService
Update order status
Configuration
docker-compose environment variables
Key variables set in infrastructure/docker-compose.yml:
Seeder is idempotent — safe to restart containers.
Pricing & Locale
Setting
Value
Currency
Indian Rupee (₹)
Free delivery above
₹500
Delivery fee
₹49
Tax rate
5% GST
Troubleshooting
Port already allocated
Bind for 0.0.0.0:5672 failed: port is already allocated
A previous container didn't release the port. Either restart Docker Desktop, or change the host port in docker-compose.yml (e.g. 5673:5672). Internal service communication is unaffected.
Health check failing (curl/wget not found)
The .NET 10 base image doesn't include curl or wget. Health checks use a TCP bash probe:
The Angular build must complete before nginx serves files. The multi-stage Frontend/Dockerfile handles this automatically — no need to run ng build manually.
Deployment to a Server
Install Docker + Docker Compose on your Linux server
Clone the repo
Update secrets in infrastructure/docker-compose.yml (JWT secret, Razorpay keys, email credentials)