How ankit-chauhan-nitdgp/bulk-parcel-pickup works
Project Type and Purpose
• This is a full-stack solution for “Bulk Garbage Pickup Scheduling” built as a modular monolith using Spring Boot.
• It exposes REST APIs to mobile clients and an admin dashboard, persists data in AWS RDS, and orchestrates third-party logistics and notification services.
File Structure
• Top-Level:
• pom.xml, mvnw – Maven build setup.
• src/main/java/com/demo/kasafaat – core application package.
• Modules under com/demo/kasafaat:
• commonModule – shared utilities, exceptions, API response wrapper.
• userModule – authentication, OTP, JWT, user profiles.
• addressModule – user addresses + geo utils.
• darkstoreModule – warehouse management, capacity, geolocation.
• orderModule – order creation, lifecycle, linking user, address, darkstore.
• logisticModule – integration with external courier APIs via REST/webhooks.
• notificationModule – push (FCM), SMS (DLT), email (SES).
• Deployment descriptors: .github/workflows/deploy.yml, Docker/maven wrapper, application.properties.
README Insights
• Architecture: Mobile + Admin UI → ALB → ECS Fargate container running Spring Boot → RDS
• External services: Secrets Manager, CodePipeline/CodeBuild, CloudWatch, logistics API, FCM/SMS/SES.
a. Main Components
• Clients: Mobile App (Customer), Admin Dashboard
• API Layer: AWS ALB
• Application: Spring Boot container on ECS Fargate
• Functional Modules (grouped):
· User Module
· Address Module
· Darkstore Module
· Order Module
· Logistics Module
· Notification Module
· Common Module
• Database: AWS RDS (Postgres/MySQL)
• Configuration: AWS Secrets Manager
• CI/CD: CodePipeline → CodeBuild → ECS deployment
• Monitoring: CloudWatch
• External Services:
• Logistics partners (Webhook/Polling)
• FCM, SMS gateway, SES for notifications
b. Relationships and Data Flow
1. Client → ALB: HTTP(S) requests
2. ALB → ECS Task: routes to Spring Boot service
3. Spring Boot Controller (per module) → Service Layer → Repository
4. Repository → RDS for CRUD operations
5. Order Module calls:
• Address Module to geocode & fetch user address
• Darkstore Module to get nearest warehouse
• Logistics Module to place shipment request
6. Logistics Module ↔ External Courier API (REST / Webhook)
7. Notification Module → FCM/SMS/SES to notify user
8. Secrets Manager supplies DB and API credentials at runtime
9. CI/CD pipeline builds, tests, and deploys Docker image
10. CloudWatch collects logs & metrics from ECS tasks
c. Architectural Patterns
• Modular Monolith: clear package-level separation by domain
• Layered Architecture: Controller → Service → DAO/Repository → Database
• Event/Callback: Webhook handling in logistics module
• Externalized Configuration and Secrets Injection
d. Key Technologies & Frameworks
• Java 17 (or 11) + Spring Boot
• Spring Data JPA, Hibernate
• Maven build / Docker containerization
• AWS: ECS Fargate, ALB, RDS, Secrets Manager, CloudWatch, CodePipeline/CodeBuild
• JWT, DLT OTP for authentication
• FCM, SES, SMS gateway