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

  1. Container start – docker-compose.yml builds the backend image from backend/Dockerfile. The Dockerfile runs uvicorn backend.app.main:app --host 0.0.0.0 --port 8000.
  2. FastAPI boot – backend/app/main.py creates the FastAPI instance, loads configuration from backend/app/core/config.py, and includes routers from every backend/app/api/*.py module (e.g., accounts.py, transactions.py, budget.py).
  3. Request flow – An HTTP request hits a router (e.g., GET /api/transactions). The router function in backend/app/api/transactions.py validates the request, then calls service functions in backend/app/core/ or backend/app/agents/services/ as needed.
  4. 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.
  5. Auth & rate‑limit – Middleware in backend/app/core/auth.py and backend/app/core/rate_limit.py enforce JWT/TOTP/OIDC flows defined in backend/app/api/custom_auth.py and backend/app/api/oidc_auth.py.
  6. Agent path – Calls to /api/agents/* are routed to backend/app/agents/api/*.py. The request ultimately reaches a provider implementation in backend/app/agents/providers/ (e.g., openai.py, anthropic.py). The provider returns a response that backend/app/agents/runtime/executor.py formats back to the client.
  7. Frontend – frontend/Dockerfile runs npm 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.