Titan is a high-performance API platform by Antmind Ventures Private Limited.
- Product: Titan
- Company: Antmind Ventures Private Limited
- Website: https://antmind.ai
- Production Domain: https://titan.antmind.ai
Built with FastAPI, PostgreSQL (pgvector), Redis, ARQ workers, Nginx, Docker, and Alembic.
If you only read one section, read this one.
cp .env.example .envEdit .env and set at minimum:
SECRET_KEYDB_PASSWORDREDIS_PASSWORD
make setupThis builds images, starts Postgres/Redis, runs migrations, and starts all services.
curl -sS http://localhost/api/v1/healthSwagger docs are available at http://localhost/docs.
- Domain DNS A record points to server IP.
- Ports 80 and 443 are open.
.envsecrets are set.- If using Cloudflare, set DNS record to
DNS only(gray cloud) while issuing the first certificate. - If using Cloudflare, set SSL/TLS mode to
Fullduring issuance, thenFull (strict)after cert is installed.
- Bring stack up once:
make setup- Generate and install TLS certificate:
make ssl- Validate HTTPS:
curl -I https://titan.antmind.ai/api/v1/health- Continue normal operations:
make status
make logsWhat make ssl does:
- Temporarily switches Nginx to HTTP bootstrap mode (
titan.conf) on production. - Runs Certbot webroot challenge.
- Obtains Let's Encrypt certificate.
- Switches
.envtoNGINX_CONF=titan-prod.conf. - Restarts Nginx with TLS config.
For future releases, use:
make deploymake up
make down
make restart
make status
make logs
make logs-app
make logs-worker
make logs-nginxmake migrate
make migration name=<description>
make downgrade
make migration-historyCurrent migration baseline enables PostgreSQL extensions:
vectoruuid-ossppg_trgmbtree_gin
GET /service metadataGET /healthredirects to API health endpointGET /api/v1/healthapp + database + redis + system health
- Worker service:
arq-worker - Worker entrypoint:
arq app.workers.worker.WorkerSettings - Current task:
health_ping_task
| Variable | Required | Default |
|---|---|---|
SECRET_KEY |
Yes | - |
DB_HOST |
No | postgres |
DB_PORT |
No | 5432 |
DB_USER |
No | titan |
DB_PASSWORD |
Yes | - |
DB_NAME |
No | titan |
REDIS_HOST |
No | redis |
REDIS_PORT |
No | 6379 |
REDIS_PASSWORD |
Yes | - |
REDIS_DB |
No | 0 |
ARQ_QUEUE_NAME |
No | titan:queue |
WORKERS_COUNT |
No | 0 (auto) |
RUN_MIGRATIONS |
No | false |
NGINX_CONF |
No | titan.conf |
Client -> Nginx -> FastAPI app
|-> PostgreSQL (pgvector)
|-> Redis
|-> ARQ queue -> ARQ worker
To add a new service module:
- Create
app/services/<name>/router.py. - Include router in
app/main.py. - Add models under
app/services/<name>/models/. - Import that models package in
alembic/env.py. - Generate and run migration.
- Confirm DNS points to server.
- Confirm port 80 is reachable from internet.
- Ensure Cloudflare proxy is temporarily disabled (
DNS only) for first certificate issuance. - Ensure
NGINX_CONF=titan.confbefore runningmake ssl. - Re-run
make ssl.
Error example:
cannot load certificate \"/etc/letsencrypt/live/<domain>/fullchain.pem\"
Cause:
- Nginx is using production TLS config before Let's Encrypt files exist.
- This can happen on first deploy if
NGINX_CONF=titan-prod.confis already set.
Fix:
- Set
NGINX_CONF=titan.confin.env. - Run
make up(ordocker compose up -d nginx) and verify HTTP is reachable on port 80. - Run
make ssl. - Confirm Nginx is healthy:
make statusandmake logs-nginx.
make logs-appmake status- Check DB/Redis passwords in
.env.
make statusmake logs-worker- Confirm
ARQ_QUEUE_NAMEmatches producer and worker.
Titan is fully open-source for any type of use, including personal and commercial use, as stated by Antmind Ventures Private Limited.
To make this explicit for all ecosystems, add a root LICENSE file with your preferred legal text (for example, MIT or Apache-2.0).