CommuneDrop-SR.1.mp4
CommuneDrop is a comprehensive delivery tracking platform built with a modern microservice architecture. The platform enables real-time delivery tracking, secure payment processing, and efficient order management through a set of specialized microservices deployed on AWS EKS.
CommuneDrop is built on a robust microservice architecture with the following components:
| Service | Technology Stack | Purpose |
|---|---|---|
| AuthService | .NET, Duende Identity Server, MongoDB | Authentication and authorization for all microservices |
| Frontend Service | React, Vite, TailwindCSS, Socket.IO | User interface and service coordination |
| LiveLocationService | Node.js, Socket.IO, Kafka, MongoDB | Real-time driver location tracking |
| LocationService | Node.js, Express, AWS Location, Redis | Geocoding and route calculation |
| OrderService | Node.js, TypeScript, Express, MongoDB, Kafka | Order management and status tracking |
| PaymentService | Node.js, TypeScript, Express, MongoDB, Stripe | Payment processing and refund management |
- Authentication: All services authenticate through AuthService using OAuth2/OpenID Connect
- Order Creation: Users create orders through the Frontend, which are processed by OrderService
- Payment Processing: PaymentService handles secure payment transactions via Stripe
- Location Tracking: LiveLocationService provides real-time driver location updates via Kafka and WebSockets
- Route Calculation: LocationService calculates optimal routes and delivery estimates
A .NET-based authentication service built as a Duende Identity Server for microservice authorization.
Key Features:
- User Authentication & Authorization
- JWT-Based Authentication
- OAuth2 & OpenID Connect Support
- Scope-Based Access Control
- Secure Password Hashing
React-based user interface that coordinates communication between all microservices.
Key Features:
- Real-time delivery tracking on maps
- Live notifications for order updates
- Secure payment processing
- Order history and delivery estimates
- Service-to-Service Authentication with OAuth tokens
Provides real-time location tracking between drivers and customers.
Key Features:
- Real-time Driver Location Tracking via WebSockets
- Order Notification System
- Bi-directional Communication
- Event-Driven Architecture with Kafka
- Geospatial queries for nearby driver discovery
Provides geocoding, route calculation, and location-based services.
Key Features:
- Address Geocoding
- Route Calculation with AWS Location Services
- Detailed Route Information
- Address Autocomplete
- Efficient Redis Caching
Manages delivery orders, status tracking, and payment processing.
Key Features:
- Order Creation
- Payment Processing
- Order Status Management
- Pricing Calculation
- Event-Driven Architecture with Kafka
Handles all payment-related operations through Stripe integration.
Key Features:
- Customer Management
- Payment Method Handling
- Payment Processing
- Refund Management
- Order Status Updates
The entire infrastructure is provisioned and managed using Terraform, enabling consistent, version-controlled deployment across environments.
The platform runs on Amazon EKS (Elastic Kubernetes Service) with the following components:
-
VPC Configuration:
- Custom VPC with public and private subnets across multiple availability zones
- Internet Gateway for public access
- NAT Gateway for private subnet outbound traffic
- Security groups with appropriate ingress/egress rules
-
EKS Cluster:
- Kubernetes version 1.27
- OIDC provider for service account IAM roles
- Cluster logging enabled for audit and troubleshooting
-
Node Groups:
- Spot instances for cost optimization (t3.medium)
- Auto-scaling configuration (1-3 nodes)
- IAM roles with necessary permissions
-
Load Balancing:
- AWS Load Balancer Controller for ingress management
- Automatic provisioning of Application Load Balancers
- SSL/TLS termination support
The /Infrastructure/Kubernetes directory contains:
egress-configuration.yaml: Outbound traffic rulesingress-commune-drop-configuration.yaml: Ingress rules for the main applicationingress-live-location-configuration.yaml: Ingress rules for the location service
- AWS CLI configured with appropriate credentials
- Terraform CLI
- kubectl
- Helm
- Clone the repository
git clone https://github.com/smangukia/CommuneDrop.git
cd CommuneDrop- Initialize Terraform
cd Infrastructure
terraform init
- Apply Terraform configuration
terraform apply
- Configure kubectl
aws eks update-kubeconfig --name eks-cluster --region us-east-1
- Deploy microservices
kubectl apply -f Kubernetes/
- Verify deployment
kubectl get pods --all-namespaces
- .NET Core: Powers the AuthService with Duende Identity Server
- Node.js: Foundation for most microservices
- Express: Web framework for Node.js services
- TypeScript: Type-safe JavaScript for robust applications
- MongoDB: NoSQL database for flexible data storage
- Redis: In-memory caching for LocationService
- Kafka: Event streaming platform for real-time updates
- Socket.IO: Real-time bidirectional communication
- React: UI library for building the user interface
- Vite: Next-generation frontend tooling
- TailwindCSS: Utility-first CSS framework
- Google Maps API: Map visualization for location tracking
- Supabase: Authentication and database services
-
Docker: Containerization of all services
-
Kubernetes: Container orchestration for deployment
-
Terraform: Infrastructure as Code for cloud resources
-
AWS Services:
-
Amazon EKS
-
VPC and networking components
-
Load Balancer Controller
-
IAM roles and policies
- OAuth2 & OpenID Connect: Industry-standard authentication protocols
- JWT: Secure token-based authentication
- Stripe: PCI-compliant payment processing
- Kubernetes Dashboard: Visual management of cluster resources
- AWS CloudWatch: Metrics and logging
- Prometheus & Grafana: Advanced monitoring (planned)
- All services use JWT-based authentication
- Sensitive data is encrypted at rest and in transit
- API endpoints are protected with appropriate scopes
- Payment information is handled securely through Stripe
- Private subnets for sensitive workloads
- Security groups with least privilege access
This project is licensed under the MIT License - see the LICENSE file for details.