{"repo": "chrisdover/outlive-engine", "files": {"README.md": {"c5bfca338f6261cd051dbdffafcd6934c07dd105": {"t": 1785674408.428448, "n": 10307, "h": "01bebe365cd47653", "c": "
\n
\n
\n Open-source longevity protocol platform.
\n Feed it your health data. Get a personalized daily protocol. Your data never leaves your machine.\n
\n Quick Start |\n What It Tracks |\n Architecture |\n Security |\n Local AI |\n FAQ\n
\n\n---\n\n## Quick Start\n\nYou need **Node.js 20+**, **Python 3.11+**, and **PostgreSQL 15+** installed.\n\n```bash\ngit clone https://github.com/ChrisDover/outlive-engine.git\ncd outlive-engine\nmake setup # Creates DB, generates secrets, installs deps, bootstraps schema\nmake dev # Starts backend (port 8000) and frontend (port 3000)\n```\n\nOpen [http://localhost:3000](http://localhost:3000), create an account, and you're in.\n\n> **Note:** `make setup` assumes passwordless local PostgreSQL (the default on Mac/Linux dev machines). If your Postgres requires a password, see [Advanced Setup](#advanced-setup) below.\n\n### What to do after setup\n\n1. **Create an account** at http://localhost:3000/signup\n2. **Log bloodwork** — click Bloodwork → \"Add Your First Panel\" and enter your latest lab results (presets included for common markers like testosterone, lipids, HbA1c)\n3. **Track body composition** — log weight, body fat, lean mass to see trends over time\n4. **Add genomic risks** — enter risk categories from 23andMe, Nebula, or other testing\n5. **Run an experiment** — design an N=1 test for a supplement or protocol change\n6. **Ask AI** — go to Insights and ask questions about your data (requires [Ollama](https://ollama.ai) or a cloud LLM key)\n\nThe dashboard shows a getting-started checklist that tracks your progress.\n\n### API docs\n\nOnce the backend is running, interactive API docs are at:\n\n- **Swagger UI:** http://localhost:8000/docs\n- **ReDoc:** http://localhost:8000/redoc\n\nAll 31 endpoints are documented with request/response schemas.\n\n## Architecture\n\n```\nBrowser → Next.js (web/) → FastAPI Backend (backend/)\n ↓\n PostgreSQL (all health data)\n```\n\n- **Web frontend:** Next.js 16, React 19, TypeScript, Tailwind CSS v4\n- **Backend API:** FastAPI, asyncpg, PostgreSQL\n- **AI:** Local LLMs by default (Ollama), optional cloud LLM support\n- **Database:** Single PostgreSQL database shared between frontend auth and backend health data\n\n## What It Tracks\n\n| Domain | Description |\n|--------|-------------|\n| **Bloodwork** | Biomarker tracking with optimal ranges, flags, and panel history |\n| **Body Composition** | Weight, body fat, lean mass, waist — with trend charts |\n| **Genomics** | Genetic risk categories (APOE, MTHFR, etc.) informing protocols |\n| **Experiments** | N=1 experiment tracker with snapshots and status management |\n| **Training** | Workout programming adjusted by recovery zone |\n| **Nutrition** | Calorie and macro targets tuned to activity and goals |\n| **Supplements** | Personalized stack informed by bloodwork and genetics |\n| **Interventions** | Sauna, cold plunge, breathwork, red light scheduling |\n| **Sleep** | Target bedtime/wake, sleep hygiene protocols |\n\n## Security Model\n\n**Your health data is yours.** Outlive Engine is designed for self-hosting with security as a first-class concern:\n\n- **All sensitive fields encrypted at rest** with AES-256-GCM (field-level encryption)\n- **No telemetry, no analytics, no phone-home** — zero data leaves your machine\n- **Local LLMs by default** via Ollama — your health data never hits external APIs\n- **Optional cloud LLM support** (OpenAI, Anthropic) if you choose — clearly gated behind explicit configuration\n- **Startup validation** — app refuses to start with default/missing secrets\n- **Rate limiting** on backend write endpoints (FastAPI/slowapi). Note: the web auth routes (login, signup, magic-link) are not yet rate-limited in-app — front them with a reverse-proxy rate limit (see [SECURITY.md](SECURITY.md))\n- **Local-only admin endpoints** — server `.env` editing and process restart are gated to local development, not exposed in hosted deployments\n- **Audit logging** on every API request\n- **Token revocation** with refresh token rotation\n- **Constant-time key comparison** — timing-attack resistant service auth\n- **HKDF-SHA256 key derivation** for encryption keys\n- **Security response headers** on all API and web responses\n\nSee [SECURITY.md](SECURITY.md) for the full security policy and self-hosting hardening guide.\n\n## Local AI Setup\n\nOutlive Engine uses [Ollama](https://ollama.ai) for local AI by default — your health data never leaves your machine.\n\n```bash\nollama pull llama3.1 # Or any model you prefer\n```\n\nSet `AIRLLM_BASE_URL=http://localhost:11434/v1` in `backend/.env` (this is the default).\n\n### Using Cloud LLMs Instead\n\nIf you prefer cloud models, set these in `backend/.env`:\n\n```bash\n# OpenAI\nAIRLLM_BASE_URL=https://api.openai.com/v1\nAIRLLM_API_KEY=sk-...\nAIRLLM_MODEL=gpt-4o\n\n# Or Anthropic\nAIRLLM_BASE_URL=https://api.anthropic.com/v1\nAIRLLM_API_KEY=sk-ant-...\nAIRLLM_MODEL=claude-sonnet-4-20250514\n```\n\n**Be aware:** when using cloud LLMs, your health context is sent to external APIs. Use local models if data sovereignty is important to you.\n\n## Advanced Setup\n\nIf `make setup` doesn't work for your environment (e.g. Postgres requires a password), you can set up manually:\n\n```bash\n# 1. Backend\ncd backend\ncp .env.example .env # Edit with your values — generate secrets per the comments\npython3 -m venv .venv && .venv/bin/pip install -r requirements.txt\n.venv/bin/uvicorn app.main:app --reload\n\n# 2. Web Frontend (in a separate terminal)\ncd web\ncp .env.example .env # Edit with your values\nnpm install\nnpx prisma db push # Create auth tables\nnpm run dev\n```\n\nBoth `.env.example` files document every variable with generation commands. The backend creates all health data tables on startup.\n\n## Environment Variables\n\nbackend/.env)web/.env)\n Built for people who take their health seriously and want full control of their data.\n
\n\n\n---\n\nBuilt by Chris Dover ([chrisdmacro.base.eth](https://github.com/ChrisDover)). Also working on [agent commerce infrastructure](https://pollinateresearch.com/) and [MAKO](https://github.com/ChrisDover/mako-verifier).\n"}}}}