The Problem
People who want a self‑hosted finance manager must choose between brittle home‑grown scripts and SaaS products that hoard every transaction. The result is either a maintenance nightmare or a privacy loss.
What This Does
securo delivers a full‑stack personal finance platform that runs entirely on your own infrastructure. The backend lives in backend/ (Python, FastAPI, Alembic migrations) and exposes a REST API via the entry points backend/app/main.py and backend/app/api/setup.py. The frontend in frontend/ is a React/TypeScript SPA built with npm (frontend/package.json). Docker and Docker‑Compose files (backend/Dockerfile, frontend/Dockerfile, docker‑compose.yml) orchestrate the two services together with a PostgreSQL container (implicit in the compose file). Optional AI agents are implemented under backend/app/agents/, exposing LLM‑driven endpoints that can query your financial data.
How It Is Wired
- Container start –
docker-compose.ymlbuilds the backend image frombackend/Dockerfile. The Dockerfile runsuvicorn backend.app.main:app --host 0.0.0.0 --port 8000. - FastAPI boot –
backend/app/main.pycreates the FastAPI instance, loads configuration frombackend/app/core/config.py, and includes routers from everybackend/app/api/*.pymodule (e.g.,accounts.py,transactions.py,budget.py). - Request flow – An HTTP request hits a router (e.g.,
GET /api/transactions). The router function inbackend/app/api/transactions.pyvalidates the request, then calls service functions inbackend/app/core/orbackend/app/agents/services/as needed. - Database interaction – All persistence uses SQLAlchemy sessions created in
backend/app/core/database.py. Alembic migration scripts (backend/alembic/versions/*.py) define the schema evolution. - Auth & rate‑limit – Middleware in
backend/app/core/auth.pyandbackend/app/core/rate_limit.pyenforce JWT/TOTP/OIDC flows defined inbackend/app/api/custom_auth.pyandbackend/app/api/oidc_auth.py. - Agent path – Calls to
/api/agents/*are routed tobackend/app/agents/api/*.py. The request ultimately reaches a provider implementation inbackend/app/agents/providers/(e.g.,openai.py,anthropic.py). The provider returns a response thatbackend/app/agents/runtime/executor.pyformats back to the client. - Frontend –
frontend/Dockerfilerunsnpm ci && npm run build, producing static assets served by the backend or a separate Nginx container (depending on compose overrides). The SPA talks to the API at/api/using the OpenAPI spec generated by FastAPI.
The widest blast‑radius lies in backend/app/main.py (initializes the whole API) and backend/app/core/database.py (shared DB session). The agents subsystem introduces a modest cycle: provider ↔ runtime ↔ service, but it is isolated behind its own router.
How To Use It
# Clone the repo
git clone https://github.com/moses-y/securo.git
cd securo
# Copy example env files and edit as needed
cp .env.example .env
cp backend/.env.example backend/.env
# Build and start all services (Docker Desktop, Docker or Podman required)
docker compose up --build
The README’s quick‑start script (curl … | bash) performs the same steps automatically. After the containers are healthy, open http://localhost:3000. The frontend will prompt for account creation; the backend will store data in the attached PostgreSQL container.
Real‑World Use
A small business owner can add a European bank by setting the ENABLE_BANKING_CLIENT_ID and ENABLE_BANKING_CLIENT_SECRET variables in backend/.env, restart docker compose, then create a “Bank Sync” job through the UI. The sync task calls backend/app/api/connections.py → backend/app/core/database.py to persist fetched transactions, which are immediately visible in the SPA’s Net‑Worth report.
Code Health & Issues
- Low – No structural red flags – tests (208 files), CI workflow (
.github/workflows/ci.yml), lockfiles, and license are present. - Low – Large migration history – 71 Alembic revisions (
backend/alembic/versions/) may slow fresh DB setup; consider squashing older migrations. - Medium – Optional agent dependencies – AI provider packages are imported lazily but still increase the Docker image size; a separate build target could isolate them.
The Bottom Line
securo is a well‑organized, fully containerized finance manager with a clear API boundary and solid test/CI coverage. It is ready for teams that need on‑prem privacy and are comfortable maintaining Docker‑based services. The main trade‑off is the sizeable migration set and optional AI agent overhead, which may require pruning for lightweight deployments.