How nitesh-0/python works
This repository contains several FastAPI examples; the substantial product represented by the central source index is the Carpet Store backend. Its main workflow serves shop and carpet browsing, creates orders from active inventory, then supports checkout and payment-status updates. Staff, authentication, user management, and image uploads are distinct capabilities. The graph preserves these areas and core infrastructure; several service-to-router and database connections are not visible in the excerpts, so they are omitted rather than inferred.
Main entry points: main.py FastAPI app · carpets/service.py Carpet catalog · storage.py Object storage · payments/service.py Payment lifecycle
Components 25
API entry
- FastAPI app
fastapi/projects/carpet-store/src/carpet_store/main.py
Store and orders
- Shop settings
fastapi/projects/carpet-store/src/carpet_store/modules/shop/service.py - Shop routes
fastapi/projects/carpet-store/src/carpet_store/modules/shop/router.py - Carpet catalog
fastapi/projects/carpet-store/src/carpet_store/modules/carpets/service.py - Carpet routes
fastapi/projects/carpet-store/src/carpet_store/modules/carpets/router.py - Order management
fastapi/projects/carpet-store/src/carpet_store/modules/orders/service.py - Order routes
fastapi/projects/carpet-store/src/carpet_store/modules/orders/router.py
Identity and staff
- Authentication
fastapi/projects/carpet-store/src/carpet_store/modules/auth/service.py - Auth routes
fastapi/projects/carpet-store/src/carpet_store/modules/auth/router.py - User management
fastapi/projects/carpet-store/src/carpet_store/modules/users/service.py - User routes
fastapi/projects/carpet-store/src/carpet_store/modules/users/router.py
Payments
- Payment lifecycle
fastapi/projects/carpet-store/src/carpet_store/modules/payments/service.py - Payment routes
fastapi/projects/carpet-store/src/carpet_store/modules/payments/router.py
Core services
- Image uploads
fastapi/projects/carpet-store/src/carpet_store/modules/uploads/service.py - Upload routes
fastapi/projects/carpet-store/src/carpet_store/modules/uploads/router.py - Object storage
fastapi/projects/carpet-store/src/carpet_store/core/storage.py - Database setup
fastapi/projects/carpet-store/src/carpet_store/core/database.py - Token security
fastapi/projects/carpet-store/src/carpet_store/core/security.py - Configuration
fastapi/projects/carpet-store/src/carpet_store/core/config.py - Domain enums
fastapi/projects/carpet-store/src/carpet_store/core/enums.py - Pagination
fastapi/projects/carpet-store/src/carpet_store/core/pagination.py - Error handling
fastapi/projects/carpet-store/src/carpet_store/core/exceptions.py
Other components
- API clients
- Stripe
- MinIO
Connections 23
- API clients → FastAPI app: sends requests
- FastAPI app → Shop routes: registers
fastapi/projects/carpet-store/src/carpet_store/main.py - FastAPI app → Auth routes: registers
fastapi/projects/carpet-store/src/carpet_store/main.py - FastAPI app → User routes: registers
fastapi/projects/carpet-store/src/carpet_store/main.py - FastAPI app → Carpet routes: registers
fastapi/projects/carpet-store/src/carpet_store/main.py - FastAPI app → Order routes: registers
fastapi/projects/carpet-store/src/carpet_store/main.py - FastAPI app → Payment routes: registers
fastapi/projects/carpet-store/src/carpet_store/main.py - FastAPI app → Upload routes: registers
fastapi/projects/carpet-store/src/carpet_store/main.py - FastAPI app → Object storage: ensures bucket
fastapi/projects/carpet-store/src/carpet_store/main.py - FastAPI app → Error handling: registers handler
fastapi/projects/carpet-store/src/carpet_store/main.py - Carpet catalog → Shop settings: reads currency
fastapi/projects/carpet-store/src/carpet_store/modules/carpets/service.py - Carpet catalog → Object storage: checks and cleans images
fastapi/projects/carpet-store/src/carpet_store/modules/carpets/service.py - Order management → Carpet catalog: loads active items
fastapi/projects/carpet-store/src/carpet_store/modules/orders/service.py - Order management → Shop settings: reads currency
fastapi/projects/carpet-store/src/carpet_store/modules/orders/service.py - Payment lifecycle → Carpet catalog: gets item names
fastapi/projects/carpet-store/src/carpet_store/modules/payments/service.py - Payment lifecycle → Order management: reads and updates
fastapi/projects/carpet-store/src/carpet_store/modules/payments/service.py - Payment lifecycle → Stripe: creates and checks sessions
fastapi/projects/carpet-store/src/carpet_store/modules/payments/service.py - Image uploads → Object storage: uses storage
fastapi/projects/carpet-store/src/carpet_store/modules/uploads/service.py - Object storage → MinIO: manages objects
fastapi/projects/carpet-store/src/carpet_store/core/storage.py - Authentication → Token security: creates and verifies tokens
fastapi/projects/carpet-store/src/carpet_store/modules/auth/service.py - Authentication → User management: checks user
fastapi/projects/carpet-store/src/carpet_store/modules/auth/service.py - User management → Authentication: revokes sessions
fastapi/projects/carpet-store/src/carpet_store/modules/users/service.py - Token security → Configuration: uses settings
fastapi/projects/carpet-store/src/carpet_store/core/security.py