How rsingh230105/ecommerce-product-service works
Product Service is the e-commerce catalogue API: clients and Order Service request product records and current prices, and the service validates requests, performs CRUD operations, and persists products. Its internal layers are FastAPI routes, Pydantic schemas, SQLAlchemy models and sessions, and PostgreSQL. The README also documents health/readiness checks and Alembic-managed schema changes. Relationships reflect the sampled route calls or explicit README statements; migration internals were not sampled.
Main entry points: main.py Product and health routes · database.py Database sessions · models.py Product model · alembic Schema migrations
Components 8
API
- Product and health routes
app/main.py - Request and response schemas
app/schemas.py
Catalogue
- Product model
app/models.py
Persistence
- Database sessions
app/database.py - PostgreSQL
- Schema migrations
alembic
Other components
- Public clients
- Order Service
Connections 8
- Public clients → Product and health routes: call API
README.md - Order Service → Product and health routes: request products
README.md - Product and health routes → Request and response schemas: validate and serialize
app/main.py - Product and health routes → Database sessions: open sessions
app/main.py - Product and health routes → Product model: query and modify
app/main.py - Product model → Database sessions: use base
app/models.py - Database sessions → PostgreSQL: persist data
README.md - Schema migrations → PostgreSQL: manage schema
README.md