Skip to content

Application Design and Layout

James Brucker edited this page Jun 24, 2025 · 5 revisions

Backend

Uses SqlAlchemy, FastAPI, and Pydantic. Application deployed in a Docker container.


backend/                        # Boring name :-)
├── app/
│   ├── core/
│   │   ├── config.py           # App settings from .env
│   │   └── database.py         # DB engine, Base class for models, and session creation
│   │   └── security.py         # Password hash and validation, for local user accounts
│   ├── data_access/
│   │   └── user_dao.py         # Persistence operations using SQLAlchemy
│   ├── models.py               # SqlAlchemy ORM model definitions, User, Measurement, Location, etc.
│   │                           # All models put in one module for now, can transparently repackage later
│   ├── routers/                # FastAPI route definitions
│   │   └── user.py             
│   ├── schemas.py              # Pydantic "schema" for validation, serialization, and external representation of model data
│   │                           # All schema classes put in one module for now, can transparently repackage later
│   └── main.py                 # FastAPI app entry point
├── tests/                      # Unit tests for backend
├── .env                        # Environment variables, not committed to git (of course)
├── Dockerfile
├── requirements.txt
└── docker-compose.yml

Clone this wiki locally