Nelavista
Scalable backend product designed to scale from day one.
Overview
Nelavista is an in-progress backend platform organised around clear domain modules. Authentication, billing and core entities each live behind their own routers and repositories, with PostgreSQL handling persistence and migrations driven by Alembic.
Highlights
- →Domain-driven module layout — auth, billing, core all isolated
- →Repository pattern over SQLAlchemy 2.0 async sessions
- →Alembic migrations with reversible upgrade scripts
- →Redis-backed rate limiting and short-lived caches
The architecture
Each domain owns its router, service layer and repository. Nothing reaches into another domain's database tables directly — they cross boundaries through service calls. It is more upfront work, but it makes refactoring painless once the product shape settles.
Database & migrations
PostgreSQL is the source of truth. Alembic handles schema evolution with paired up/down scripts, and every migration is reviewed before it lands in main. Indexes are added deliberately — only when query plans show they are needed.
What is next
I am currently wiring background workers for long-running jobs and adding OpenTelemetry traces across the request lifecycle so I can actually see what the system is doing in production.
Challenges
- ×Choosing module boundaries before the product is fully defined
- ×Wiring async SQLAlchemy without leaking sessions across requests
- ×Designing an auth flow that works for both web and future mobile clients