How itu-dasyalab/introdb-coffeeshop-python works
Coffee Shop is a small web app for browsing products, registering and logging in, buying drinks, and reviewing purchase history. Users interact with static pages; shared browser helpers send requests to a FastAPI backend, which reads and writes DuckDB. The documented workflow spans authentication, catalog browsing, purchasing, and history, though registration, purchase insertion, and personal-history retrieval are TODO stubs in the sampled backend. The README documents the frontend/API arrangement; backend-to-database edges below reflect only queries visible in the excerpt.
Main entry points: app.js Client helpers · init.sql DuckDB store · index.html Home page · login.html Login page
Components 13
Web frontend
- Home page
web/index.html - Login page
web/login.html - Registration page
web/register.html - Products page
web/products.html - Purchase history
web/purchases.html - My purchases
web/mypurchases.html - Client helpers
web/app.js
API backend
- Authentication API
app.py - Product API
app.py - Purchase API
app.py - History API
app.py
Data layer
- DuckDB store
init.sql
Other components
- Shopper
Connections 19
- Shopper → Home page: uses
README.md - Shopper → Login page: logs in
README.md - Shopper → Registration page: registers
README.md - Shopper → Products page: browses
README.md - Shopper → Purchase history: views history
README.md - Shopper → My purchases: views purchases
README.md - Home page → Client helpers: uses
README.md - Login page → Client helpers: uses
README.md - Registration page → Client helpers: uses
README.md - Products page → Client helpers: uses
README.md - Purchase history → Client helpers: uses
README.md - My purchases → Client helpers: uses
README.md - Client helpers → Authentication API: sends requests
web/app.js - Client helpers → Product API: sends requests
README.md - Client helpers → Purchase API: sends requests
README.md - Client helpers → History API: sends requests
README.md - Authentication API → DuckDB store: queries
app.py - Product API → DuckDB store: reads products
app.py - History API → DuckDB store: reads purchases
app.py