How srguillebta/secure-demobank works
Secure DemoBank is a simulated digital-wallet project, but the checked-in runtime currently exposes only a health endpoint; no wallet, authentication, or transaction workflow is implemented in the sampled backend. The documented request path is browser → Nginx → FastAPI → PostgreSQL. The graph preserves the static frontend, proxy security functions, database role setup, and the backend’s settings and connection layers. Runtime wiring for several unsampled components is based on the README; source excerpts confirm the API’s health-check database access and configuration dependencies.
Main entry points: default.conf Nginx proxy · main.py FastAPI API · db.py SQLAlchemy engine · config.py Settings and secrets
Components 10
Client
- Static frontend
frontend/public
Proxy edge
- Nginx proxy
proxy/default.conf - Security headers
proxy/snippets/security-headers.conf - API proxy rules
proxy/snippets/proxy-backend.conf
Backend
- FastAPI API
backend/app/main.py - Settings and secrets
backend/app/config.py - SQLAlchemy engine
backend/app/db.py
Database
- PostgreSQL
- Database roles
db/init/01-roles.sh
Other components
- Browser
Connections 10
- Browser → Nginx proxy: requests
README.md - Nginx proxy → Static frontend: serves app
- Nginx proxy → FastAPI API: proxies API
README.md - Nginx proxy → Security headers: applies
- Nginx proxy → API proxy rules: uses rules
- FastAPI API → Settings and secrets: loads
backend/app/main.py - FastAPI API → SQLAlchemy engine: checks database
backend/app/main.py - SQLAlchemy engine → Settings and secrets: reads URL
backend/app/db.py - SQLAlchemy engine → PostgreSQL: connects
README.md - Database roles → PostgreSQL: creates roles
README.md