A journaling application focused on emotional self-awareness and reflective practice, built with a modular FastAPI backend and a minimal HTMX-driven UI.
LumaireJ combines a small, focused API surface with a clean UI to support daily mood journaling. The backend follows clear boundaries between API, domain, persistence, and configuration, enabling fast iteration without compromising maintainability.
app/
βββ api/v1/ # FastAPI routers and endpoints
βββ core/ # settings, database, exceptions
βββ dependencies/ # dependency injection
βββ models/ # SQLModel tables
βββ schemas/ # Pydantic request/response models
βββ crud/ # persistence operations
βββ main.py # FastAPI app assembly
- API: FastAPI
- Data: SQLModel + SQLAlchemy
- DB: PostgreSQL (SQLite for local/dev)
- UI: HTMX + static HTML
- Testing: Pytest (unit) and Playwright (E2E/UI)
- Tooling: PDM, Ruff
- CI/CD: GitHub Actions, GitHub Pages
- Python 3.14+
- PDM
pdm install
pdm run devOpen:
Create a .env file at the project root:
database_url=sqlite:///./lumairej.db
debug=true
allowed_origins=http://localhost,http://127.0.0.1:8000Alembic and FastAPI both read database_url (legacy DATABASE_URL is also supported).
pdm run dbrevision
pdm run dbupgradepdm run pytestFor UI/E2E runs (Playwright):
pdm run pytest --headed- CI: GitHub Actions runs lint and test workflows
- Pages: Static UI deploys to GitHub Pages on
main - Actions: https://github.com/dariero/LumaireJ/actions
- Live site: https://dariero.github.io/LumaireJ/
- Modular layering: API, schema, CRUD, and configuration layers remain separate to keep responsibilities isolated and testable. See
docs/adr/001-keep-modular-architecture.md. - Sync SQLModel for MVP: The current SQLModel session is synchronous for simplicity; the service boundary makes it straightforward to migrate to
AsyncSessionif concurrency grows. - Explicit dependencies: FastAPI dependencies are centralized in
dependencies/to avoid hidden coupling. - SDLC approach: Small, traceable changes with ADRs for architectural decisions, CI gates on lint/tests, and incremental releases.
- Add GET/PATCH/DELETE endpoints for journal entries
- Mood trend visualization
- Export formats (PDF/JSON)
- Optional authentication
Darie Ro