feat: add deployment guide, nginx/systemd configs, switch to adapter-node
- Add docs/DEPLOYMENT.md: step-by-step Proxmox LXC guide (Debian 13, PostgreSQL, nginx reverse proxy, systemd services) - Add nginx/innercontext.conf: proxy /api/ → uvicorn, /mcp/ → uvicorn with SSE streaming support, / → SvelteKit Node server - Add systemd/innercontext.service and innercontext-node.service - Switch frontend from adapter-auto to adapter-node (required for +page.server.ts form actions); install adapter-node 5.5.4 - Update README.md: add frontend, MCP sections; fix /skin-snapshots → /skincare; update repo layout - Replace frontend/README.md generic Svelte template with project docs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
142fbe8530
commit
95fbdeb212
9 changed files with 649 additions and 47 deletions
64
README.md
64
README.md
|
|
@ -1,15 +1,17 @@
|
|||
# innercontext
|
||||
|
||||
Personal health and skincare data hub. Collects structured data (products, routines, lab results, medications, skin snapshots) and exposes it via a REST API and MCP to an LLM agent.
|
||||
Personal health and skincare data hub. Collects structured data (products, routines, lab results, medications, skin snapshots) and exposes it via a REST API, MCP, and a web UI to an LLM agent.
|
||||
|
||||
## Repository layout
|
||||
|
||||
```
|
||||
backend/ Python backend — FastAPI REST API + SQLModel models
|
||||
backend/ Python backend — FastAPI REST API + MCP server + SQLModel models
|
||||
frontend/ SvelteKit web UI (Svelte 5, TypeScript, Tailwind CSS v4)
|
||||
docs/ Deployment guides
|
||||
nginx/ nginx config for production
|
||||
systemd/ systemd service units
|
||||
```
|
||||
|
||||
A frontend will be added in the future.
|
||||
|
||||
## Backend quick start
|
||||
|
||||
**Requirements:** Python 3.12+, PostgreSQL, [uv](https://docs.astral.sh/uv/)
|
||||
|
|
@ -29,6 +31,22 @@ uv run uvicorn main:app --reload
|
|||
|
||||
API docs available at `http://localhost:8000/docs`.
|
||||
|
||||
## Frontend quick start
|
||||
|
||||
**Requirements:** Node.js 22+, [pnpm](https://pnpm.io/)
|
||||
|
||||
```bash
|
||||
cd frontend
|
||||
|
||||
# Install dependencies
|
||||
pnpm install
|
||||
|
||||
# Start dev server (proxies API calls to localhost:8000)
|
||||
pnpm dev
|
||||
```
|
||||
|
||||
UI available at `http://localhost:5173`.
|
||||
|
||||
## API overview
|
||||
|
||||
| Prefix | Resource |
|
||||
|
|
@ -39,9 +57,32 @@ API docs available at `http://localhost:8000/docs`.
|
|||
| `/health/lab-results` | Lab test results |
|
||||
| `/routines` | AM/PM skincare routines and steps |
|
||||
| `/routines/grooming-schedule` | Weekly grooming schedule |
|
||||
| `/skin-snapshots` | Weekly skin condition snapshots |
|
||||
| `/skincare` | Weekly skin condition snapshots |
|
||||
| `/health-check` | Liveness probe |
|
||||
|
||||
## MCP server
|
||||
|
||||
innercontext exposes 14 tools via [FastMCP](https://github.com/jlowin/fastmcp) at the StreamableHTTP endpoint `http://localhost:8000/mcp/mcp`.
|
||||
|
||||
Tools include: `get_products`, `get_product`, `get_open_inventory`, `get_recent_routines`, `get_latest_skin_snapshot`, `get_skin_history`, `get_medications`, `get_expiring_inventory`, `get_grooming_schedule`, `get_recent_lab_results`, and more.
|
||||
|
||||
Connect an MCP-compatible LLM agent by pointing it at `http://<host>/mcp/mcp`.
|
||||
|
||||
## Frontend routes
|
||||
|
||||
| Route | Description |
|
||||
|---|---|
|
||||
| `/` | Dashboard |
|
||||
| `/products` | Product list |
|
||||
| `/products/new` | Add product |
|
||||
| `/products/[id]` | Product detail / edit |
|
||||
| `/routines` | Routine list |
|
||||
| `/routines/new` | Create routine |
|
||||
| `/routines/[id]` | Routine detail |
|
||||
| `/health/medications` | Medications |
|
||||
| `/health/lab-results` | Lab results |
|
||||
| `/skin` | Skin condition snapshots |
|
||||
|
||||
## Development
|
||||
|
||||
```bash
|
||||
|
|
@ -53,10 +94,17 @@ uv run ruff check .
|
|||
# Format
|
||||
uv run black .
|
||||
uv run isort .
|
||||
|
||||
# Tests
|
||||
uv run pytest
|
||||
```
|
||||
|
||||
## Stack
|
||||
|
||||
- **Runtime:** Python 3.12, FastAPI, Uvicorn
|
||||
- **ORM:** SQLModel 0.0.37 + SQLAlchemy, Pydantic v2
|
||||
- **Database:** PostgreSQL (psycopg3)
|
||||
- **Backend:** Python 3.12, FastAPI, Uvicorn, SQLModel 0.0.37 + SQLAlchemy, Pydantic v2, PostgreSQL (psycopg3)
|
||||
- **MCP:** FastMCP 3.0.2 (StreamableHTTP transport)
|
||||
- **Frontend:** SvelteKit 2, Svelte 5 (Runes), TypeScript, Tailwind CSS v4, shadcn-svelte
|
||||
|
||||
## Deployment
|
||||
|
||||
See [docs/DEPLOYMENT.md](docs/DEPLOYMENT.md) for a step-by-step guide for a Proxmox LXC setup (Debian 13, nginx, systemd services).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue