How d-coder7/quickcommerce works
QuickCommerce is a FastAPI commerce API. Requests enter through the application’s registered routers; the visible checkout flow coordinates cart retrieval, product lookup, stock reservation, order creation, sale confirmation, and cart clearing. The graph preserves the documented-by-code domains and core modules, but several routers, repositories, and infrastructure files were not excerpted, so their internal calls are not inferred. Redis is shown as an external service because the sampled services use it for carts and catalog caching.
Main entry points: main.py FastAPI application · order.py Order service · inventory.py Inventory routes · catalog.py Catalog service
Components 27
API entry
- FastAPI application
app/main.py - User routes
app/routers/users.py - Catalog routes
app/routers/catalog.py - Inventory routes
app/routers/inventory.py - Cart routes
app/routers/cart.py - Order routes
app/routers/orders.py - Health routes
app/routers/health.py
Commerce workflows
- Catalog service
app/services/catalog.py - Cart service
app/services/cart.py - Order service
app/services/order.py - Catalog repository
app/repositories/catalog.py - Inventory repository
app/repositories/inventory.py - Order repository
app/repositories/order.py
Identity
- User service
app/services/user.py - User repository
app/repositories/user.py - Authentication
app/core/security.py
Domain data
- Catalog models
app/models/catalog.py - Inventory model
app/models/inventory.py - Order models
app/models/order.py - User model
app/models/user.py
Platform services
- Database access
app/core/database.py - Redis client
app/core/redis.py - Configuration
app/core/config.py - Logging
app/core/logging.py - Request logging
app/middleware/logging.py
Other components
- API client
- Redis
Connections 26
- API client → FastAPI application: sends requests
- FastAPI application → User routes: registers
app/main.py - FastAPI application → Catalog routes: registers
app/main.py - FastAPI application → Inventory routes: registers
app/main.py - FastAPI application → Cart routes: registers
app/main.py - FastAPI application → Order routes: registers
app/main.py - FastAPI application → Health routes: registers
app/main.py - FastAPI application → Request logging: installs
app/main.py - FastAPI application → Logging: configures
app/main.py - FastAPI application → Database access: disposes engine
app/main.py - FastAPI application → Redis client: closes client
app/main.py - Inventory routes → Inventory repository: calls
app/routers/inventory.py - Inventory routes → Catalog service: invalidates cache
app/routers/inventory.py - Inventory routes → Authentication: requires admin
app/routers/inventory.py - Order service → Cart service: reads and clears cart
app/services/order.py - Order service → Catalog repository: loads products
app/services/order.py - Order service → Inventory repository: reserves stock
app/services/order.py - Order service → Order repository: creates order
app/services/order.py - Cart service → Catalog repository: loads products
app/services/cart.py - Cart service → Inventory repository: checks stock
app/services/cart.py - Catalog service → Catalog repository: loads catalog
app/services/catalog.py - Catalog service → Inventory repository: reads availability
app/services/catalog.py - Catalog service → Redis: caches catalog
app/services/catalog.py - Cart service → Redis: stores carts
app/services/cart.py - Authentication → User repository: loads user
app/core/security.py - Authentication → Configuration: reads token settings
app/core/security.py