How shelakeemahesh/swiftcart-backend works
SwiftCart is a Spring Boot e-commerce backend. Its main workflow is a client request passing through security and REST APIs into domain services, which coordinate catalog/cart/order/payment work and persistence. The README also documents search fallback, Kafka live activity, OAuth/RBAC, AI support, and sentiment analysis. Several service-to-service details and feature implementations are unsampled, so those branches are shown only where documented; source-level call edges are limited to indexed evidence.
Main entry points: SecurityConfig.java Security and RBAC · PaymentService.java Payment processing · AuthService.java Account service · ProductService.java Catalog management
Components 23
API and identity
- Security and RBAC
src/main/java/com/swiftcart/config/SecurityConfig.java - Authentication
src/main/java/com/swiftcart/controller/AuthController.java - OAuth2 identity
src/main/java/com/swiftcart/security/oauth2/CustomOAuth2UserService.java - Commerce APIs
src/main/java/com/swiftcart/controller/OrderController.java - Catalog APIs
src/main/java/com/swiftcart/controller/ProductController.java - Reviews API
src/main/java/com/swiftcart/controller/ReviewController.java
Commerce workflows
- Account service
src/main/java/com/swiftcart/service/AuthService.java - Catalog management
src/main/java/com/swiftcart/service/ProductService.java - Cart and pricing
src/main/java/com/swiftcart/service/CartService.java - Order lifecycle
src/main/java/com/swiftcart/service/OrderService.java - Payment processing
src/main/java/com/swiftcart/service/PaymentService.java - Reviews and sentiment
src/main/java/com/swiftcart/service/sentiment/SentimentAnalyticsService.java
Discovery and intelligence
- Catalog search
src/main/java/com/swiftcart/service/SearchService.java - AI shopping assistant
src/main/java/com/swiftcart/service/ai/AiChatbotService.java - Product RAG
src/main/java/com/swiftcart/service/ai/ProductRagService.java
Data and events
- Relational data
- Redis cache
- Elasticsearch
- Kafka events
src/main/java/com/swiftcart/kafka/producer/OrderEventProducer.java
Other components
- Web/mobile client
- Razorpay
- LLM and embeddings
- SMS and email
Connections 26
- Web/mobile client → Security and RBAC: sends requests
README.md - Security and RBAC → Authentication: routes requests
README.md - Security and RBAC → Commerce APIs: routes requests
README.md - Security and RBAC → Catalog APIs: routes requests
README.md - Security and RBAC → Reviews API: routes requests
README.md - Authentication → Account service: delegates to
README.md - OAuth2 identity → Relational data: persists identity
src/main/java/com/swiftcart/security/oauth2/CustomOAuth2UserService.java - Commerce APIs → Order lifecycle: invokes
src/main/java/com/swiftcart/controller/OrderController.java - Catalog APIs → Catalog management: delegates to
README.md - Reviews API → Reviews and sentiment: uses analytics
src/main/java/com/swiftcart/controller/ReviewController.java - Account service → Relational data: reads and writes
src/main/java/com/swiftcart/service/AuthService.java - Account service → SMS and email: sends notifications
src/main/java/com/swiftcart/service/AuthService.java - Catalog management → Relational data: reads and writes
src/main/java/com/swiftcart/service/ProductService.java - Catalog management → Catalog search: indexes products
src/main/java/com/swiftcart/service/ProductService.java - Cart and pricing → Relational data: reads and writes
README.md - Order lifecycle → Relational data: persists orders
src/main/java/com/swiftcart/service/OrderService.java - Order lifecycle → Kafka events: publishes activity
README.md - Payment processing → Razorpay: processes payments
README.md - Payment processing → Redis cache: guards idempotency
README.md - Payment processing → Kafka events: publishes order events
src/main/java/com/swiftcart/service/PaymentService.java - Reviews and sentiment → Relational data: reads reviews
README.md - Catalog search → Elasticsearch: searches catalog
README.md - Catalog search → Relational data: fallback queries
README.md - AI shopping assistant → Product RAG: requests recommendations
src/main/java/com/swiftcart/service/ai/AiChatbotService.java - Product RAG → LLM and embeddings: uses embeddings
README.md - Product RAG → Relational data: retrieves catalog
src/main/java/com/swiftcart/service/ai/ProductRagService.java