LetsEat is an AI-powered, production-style food ordering platform built with a true microservices backend. It combines consumer-grade product thinking (personalized food discovery, smooth checkout, real-time order flow) with engineering depth (domain-driven service boundaries, async eventing, OAuth2/JWT security, and vector search).
The backend is organized into independent Spring Boot services, each aligned to a domain boundary:
- UserCatalogueService: identity, user profile, and address management.
- RestaurantCatalogueService: restaurant/menu inventory and catalogue search.
- OrderService: order lifecycle, persistence, and authenticated order retrieval.
- PaymentService: payment-link creation and payment webhook processing.
- NotificationService: asynchronous order event consumption.
- SearchService: AI semantic search over restaurants and menu items.
- User signs in through Google OAuth2 in UserCatalogueService and receives JWT.
- User discovers restaurants/items via RestaurantCatalogueService and/or SearchService.
- User places an order in OrderService.
- PaymentService creates Razorpay payment link for the order.
- Razorpay webhook hits PaymentService after payment completion.
- PaymentService fetches order details from OrderService and publishes event to Kafka.
- NotificationService consumes Kafka order-processing event and processes notification payload.
- Controllers: user CRUD and address CRUD endpoints.
- Security layer: Spring Security OAuth2 login + JWT token generation.
- Persistence: JPA repositories for User and UserAddress.
- Controllers: restaurant onboarding/status/address updates, menu/item operations, search API.
- Search LLD: strategy-based search execution (global and radius styles).
- Persistence: normalized entities for Restaurant, Menu, Item with JPA repositories.
- Controller: order creation, order lookup by id, current-user order history.
- Service layer: order total calculation and mapping logic.
- Pricing LLD: strategy/factory pattern for delivery pricing.
- Security layer: custom JWT authentication filter for stateless APIs.
- Controller: payment initiation and payment webhook endpoint.
- Gateway abstraction: PaymentGateway interface with Razorpay implementation.
- Integration layer: RestTemplate call to OrderService for authoritative order details.
- Eventing layer: Kafka producer publishes paid order details to order-processing topic.
- Consumer-only service (no REST controller).
- Kafka listener consumes order-processing events.
- Processing logic validates payload totals and logs processing outcomes.
- Controller: AI index bootstrap and AI search endpoints.
- Embedding layer: Azure OpenAI embedding generation.
- Vector layer: Azure AI Search index upsert/query for restaurants and items.
- Ranking layer: score sorting and optional city/diet/price-aware filtering.
- Microservice-based domain decomposition for independent evolution.
- Google OAuth2 login with JWT-based downstream authorization.
- Order management with secure user-scoped retrieval.
- Razorpay payment link flow and webhook-driven payment confirmation.
- Kafka-based asynchronous payment-to-notification event pipeline.
- Restaurant and menu catalogue management APIs.
- AI semantic food search using embeddings + vector search.
- /users
- /users/{userId}
- /users/{userId}/addresses
- /users/{userId}/addresses/{addressId}
- /s/users?userID={userID}
- /s/users?email={email}
- /restaurants
- /restaurants/{restaurantId}/status
- /restaurants/{restaurantId}/address
- /menu/restaurants/{restaurantId}/menu
- /menu/{menuId}/items/{itemId}
- /menu/{menuId}/items
- /menu/{restaurantId}
- /s
- /orders/id/{orderId}
- /orders/createOrder
- /orders
- /payments
- /payments/webhook
- /ai/restaurant/createIndex
- /ai/restaurant/search
- No REST API endpoints (Kafka consumer service)
- Java 21
- Spring Boot
- Spring Web
- Spring Data JPA
- MySQL
- Spring Security
- Spring OAuth2 Client (Google)
- JWT (jjwt)
- Java 21
- Spring Boot
- Spring Web
- Spring Data JPA
- MySQL
- Bean Validation
- Strategy pattern for search execution
- Java 21
- Spring Boot
- Spring Web
- Spring Data JPA
- MySQL
- Spring Security
- JWT (jjwt)
- Strategy/factory pattern for pricing
- Java 21
- Spring Boot
- Spring Web
- Razorpay Java SDK
- RestTemplate
- Spring Kafka (producer)
- Java 21
- Spring Boot
- Spring Kafka (consumer)
- Jackson Databind
- Java 21
- Spring Boot
- Spring Web
- Azure OpenAI Embeddings
- Azure AI Search (vector search)
- RestTemplate
- spring-dotenv