How alexolimpio/canecas-shop works
Canecas Shop is a Flask storefront for personalized mugs. A shopper browses the catalog, selects an in-stock variant, manages a session-backed cart, submits delivery details at checkout, and views a session-protected order confirmation. The main layers are Flask routes and Jinja pages, business services, and PostgreSQL data access. The README documents catalog, cart, and checkout capabilities; source excerpts show the route/service calls and persistence operations. Template-to-route form submissions are documented by the README’s route table; other unsampled template behavior is not inferred.
Main entry points: app.py Flask routes · db.py Database access · produto_service.py Product catalog · carrinho_service.py Cart rules
Components 12
Storefront presentation
- Flask routes
app.py - Catalog page
templates/index.html - Product detail
templates/produto.html - Cart page
templates/carrinho.html - Checkout page
templates/checkout.html - Confirmation page
templates/confirmacao.html
Business services
- Product catalog
services/produto_service.py - Cart rules
services/carrinho_service.py - Order checkout
services/pedido_service.py
Data access
- Database access
database/db.py
Other components
- Shopper
- PostgreSQL
Connections 14
- Shopper → Flask routes: sends requests
README.md - Flask routes → Catalog page: renders
app.py - Flask routes → Product detail: renders
app.py - Flask routes → Cart page: renders
app.py - Flask routes → Checkout page: renders
app.py - Flask routes → Confirmation page: renders
app.py - Flask routes → Product catalog: requests catalog
app.py - Flask routes → Cart rules: manages cart
app.py - Flask routes → Order checkout: processes checkout
app.py - Flask routes → Database access: initializes schema
app.py - Product catalog → Database access: queries products
services/produto_service.py - Cart rules → Database access: checks variants
services/carrinho_service.py - Order checkout → Database access: creates and reads orders
services/pedido_service.py - Database access → PostgreSQL: reads and writes
README.md