How xkadzama/ecommerce works
This is a small FastAPI ecommerce backend centered on category and product CRUD: HTTP requests enter the application, reach the corresponding router, validate or serialize through Pydantic schemas, and use SQLAlchemy models and a yielded session for database work. Categories support parent-child relationships; products are associated with categories and can be listed by category. The README gives no further capability detail, and migrations are excluded as database setup machinery. Edges reflect the sampled source; the external HTTP entry is shown as unverified.
Main entry points: routing/products.py Product routes · models/categories.py Category model · routing/categories.py Category routes · models/products.py Product model
Components 9
Application entry
- FastAPI app
app/main.py
HTTP API
- Category routes
app/routing/categories.py - Product routes
app/routing/products.py
Domain models
- Request and response schemas
app/schemas.py - Category model
app/models/categories.py - Product model
app/models/products.py
Persistence
- Session dependency
app/db_depends.py - SQLite and ORM base
app/database.py
Other components
- HTTP client
Connections 15
- HTTP client → FastAPI app: sends requests
- FastAPI app → Category routes: registers router
app/main.py - FastAPI app → Product routes: registers router
app/main.py - Category routes → Session dependency: depends on
app/routing/categories.py - Product routes → Session dependency: depends on
app/routing/products.py - Session dependency → SQLite and ORM base: creates sessions
app/db_depends.py - Category model → SQLite and ORM base: inherits ORM base
app/models/categories.py - Product model → SQLite and ORM base: inherits ORM base
app/models/products.py - Category routes → Category model: queries and updates
app/routing/categories.py - Category routes → Request and response schemas: validates and serializes
app/routing/categories.py - Product routes → Product model: queries and updates
app/routing/products.py - Product routes → Category model: checks category
app/routing/products.py - Product routes → Request and response schemas: validates and serializes
app/routing/products.py - Category model → Product model: relates products
app/models/categories.py - Product model → Category model: references category
app/models/products.py