How prathameshlonare/duokart works
DuoKart is a small-shop order and bill API deployed on AWS. A customer reaches the Flask API through the load balancer; the API serves product and health reads from MySQL, accepts validated orders into SQS with DynamoDB idempotency/status records, and generates presigned S3 upload URLs so file bytes bypass the app. A queue-triggered Lambda advances order status and sends separate owner and buyer notifications. The README documents the infrastructure and observability capabilities; worker internals are represented by the queue template because no worker source is present in the tree.
Main entry points: app.py Flask API · 05-queue.yaml Order Lambda · 02-compute.yaml Private app instances · 03-data.yaml RDS MySQL
Components 20
Network and access
- VPC and subnets
infra/01-vpc.yaml - Application load balancer
infra/02-compute.yaml - Private app instances
infra/02-compute.yaml - Bastion and SSM
infra/02-compute.yaml
Shop API
- Flask API
app/app.py - RDS MySQL
infra/03-data.yaml - Commerce schema
infra/schema.sql
Order processing
- Order queue
infra/05-queue.yaml - Dead-letter queue
infra/05-queue.yaml - Order Lambda
infra/05-queue.yaml - Order status table
infra/05-queue.yaml - Owner notifications
infra/05-queue.yaml - Buyer notifications
infra/05-queue.yaml
Bill and photo storage
- Photos and bills
infra/04-storage.yaml - Trail archive
infra/04-storage.yaml
Operations and visibility
- Alarms and dashboard
infra/06-observe.yaml - CloudTrail
infra/06-observe.yaml - Cost budget
infra/06-observe.yaml
Other components
- Shop user
- Email recipients
Connections 21
- Shop user → Application load balancer: HTTP requests
- Application load balancer → Private app instances: forwards traffic
- Private app instances → Flask API: runs API
- Flask API → RDS MySQL: queries products
- Flask API → RDS MySQL: checks health
- Commerce schema → RDS MySQL: defines and seeds
- Flask API → Order queue: sends order
- Flask API → Order status table: checks and writes order
- Order queue → Order Lambda: triggers
- Order Lambda → Order status table: updates status
- Order Lambda → Owner notifications: sends received notice
- Order Lambda → Buyer notifications: sends packing notice
- Owner notifications → Email recipients: notifies owner
- Buyer notifications → Email recipients: notifies buyer
- Order queue → Dead-letter queue: redrives failures
- Flask API → Photos and bills: creates presigned URL
- Shop user → Photos and bills: uploads directly
- Private app instances → Alarms and dashboard: emits monitored signals
- CloudTrail → Trail archive: stores trail
- Bastion and SSM → Private app instances: admin access
- Cost budget → Alarms and dashboard: tracks spend