NodoOne Starter Pack is a production-ready FastAPI + LangChain kit with Postgres + pgvector RAG, Redis cache, observability, and CI. Designed to be the base for multiple applications.
- FastAPI app with Swagger/ReDoc
- LangChain + OpenAI ready
- Postgres + pgvector RAG (ingest + query)
- Redis cache for RAG queries
- Static UI to validate LLM + RAG
- API versioning (
/v1/...) with legacy route - Health and readiness endpoints
- Prometheus metrics (
/metrics) - Optional OpenTelemetry tracing
- Per-route rate limiting (v1 routes)
- Structured logs + request-id
- Dockerized with non-root user + healthcheck
- CI + secret scan (Gitleaks)
- Dependabot updates
- Python 3.11
- FastAPI + Uvicorn
- LangChain + OpenAI
- Postgres + pgvector
- Redis
- Docker + Docker Compose
.
├─ main.py
├─ settings.py
├─ static/
│ ├─ index.html
│ └─ index2.html
├─ tests/
│ └─ test_health.py
├─ docker-compose.yml
├─ Dockerfile
├─ requirements.txt
├─ requirements-dev.txt
├─ .env.example
├─ .pre-commit-config.yaml
├─ .gitleaks.toml
└─ README.md
- Copy
.env.exampleto.envand setOPENAI_API_KEY. - Run:
docker compose up --buildOpen http://localhost:8000/.
pip install -r requirements.txt -r requirements-dev.txt
pytest/Static page/v1/helloLLM response (versioned)/v1/ingestIngest texts into the vector DB/v1/queryQuery similar chunks from the vector DB/api/helloLegacy route (deprecated)/api/dashboardCache + RAG status/docsSwagger/redocReDoc/metricsPrometheus metrics/healthHealthcheck/readyReadiness
- Start with Docker:
docker compose up --build - Open
http://localhost:8000/ - Use the RAG section to ingest a few lines and query
Environment variables (see .env.example):
OPENAI_API_KEYMODEL(default:gpt-4o-mini)EMBEDDING_MODEL(default:text-embedding-3-small)TEMPERATUREREQUEST_TIMEOUTMAX_RETRIESALLOWED_ORIGINSDATABASE_URLRAG_COLLECTIONENABLE_RATE_LIMITRATE_LIMIT_PER_MINUTEREDIS_URLCACHE_TTL_SECONDSENABLE_METRICSENABLE_TRACINGOTEL_SERVICE_NAMEOTEL_EXPORTER_OTLP_ENDPOINT
- Metrics: scrape
http://localhost:8000/metricswith Prometheus. - Tracing: set
ENABLE_TRACING=trueandOTEL_EXPORTER_OTLP_ENDPOINT(OTLP/HTTP).
- Never commit secrets. Use
.env(gitignored). - Run
pre-commit installto enable local secret scanning. - CI runs secret scanning on each push/PR.
See .github/CONTRIBUTING.md.
MIT. See LICENSE.
