Systems
Open-source tools for starting and deploying backends.
Open source
FastAPI backend template
A production-ready FastAPI backend I built for Hybrid Interactive, published as the company's official open-source template. It's the starting point for many of our ERP and CRM backends.
Design decisions
- A modular monolith, split into modules by business domain following domain-driven design
- Async SQLAlchemy 2.0 for data access, with Alembic migrations
- JWT authentication with refresh tokens and role-based access control
- Celery for background jobs, monitored with Flower
- One storage interface for DigitalOcean Spaces and other S3-compatible services
Built with Python, FastAPI, SQLAlchemy, Celery, Docker
GitHub Why it's structured this way
deployctl
A deployment tool I built for Hybrid Interactive, now open source. It takes a containerized app to one server, or to several behind a load balancer, and needs nothing on the servers but Docker and SSH. Once a project is set up, a release is a merge: GitHub Actions runs deployctl on every push to the deploy branch. The same commands work from a laptop, and a local control panel takes a new project through its first deployment.
Design decisions
- Nothing is built on a server. CI builds the image and pushes it to a registry, and hosts pull one immutable tag, which is also what makes a rollback possible
- Rolling deploys, primary first, with each host gated on a health check and a watch on every service. If a host fails, it and every host already updated go back to the previous release, so the fleet is never left split between two
- A single server is a cluster of one. Both share one code path and differ only in the number of hosts, where TLS ends, and whether Postgres and Redis run in containers
- Migrations run once, on the primary, before any app container restarts, and the scheduler runs on exactly one host so no job fires twice
- One lock per environment, shared by CI and laptops, so two deploys can never interleave
- The control panel listens on 127.0.0.1 only, can trigger nothing outside a fixed list of actions, and shows the exact command behind every button
Built with Python, Typer, FastAPI, Jinja2, Bash, Docker Compose, GitHub Actions
GitHub Documentation