No description
Find a file
Piotr Oleszczyk 679e4e81f4 feat(frontend): responsive design for mobile (RWD)
- Layout: mobile hamburger + drawer nav (backdrop button + sibling nav),
  desktop sidebar hidden on small screens, p-4 md:p-8 main padding
- Products: card list view on mobile, flex-wrap filters
- Lab results: card list view on mobile
- ProductForm: responsive grids (grid-cols-1 sm:grid-cols-2), skin
  profile checkboxes 2→3 cols, active ingredient row restructured
  (name+✕ in flex row, percent/strength/irritation in 3-col grid),
  section headers stack on mobile
- Skin snapshots: date+icons on one row, badges on separate row below
- Product [id] header: back link stacked above title, redundant badge removed
- Routines header: flex-col on mobile, sm:flex-row

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 13:35:25 +01:00
backend refactor(routines): streamline suggest prompt — merge inventory context, add leaving_home SPF hint 2026-03-01 23:47:54 +01:00
docs fix(deploy): install frontend prod deps on server after deploy 2026-03-01 13:56:28 +01:00
frontend feat(frontend): responsive design for mobile (RWD) 2026-03-02 13:35:25 +01:00
nginx feat(routines): add minoxidil beard/mustache option to routine suggestions 2026-03-01 19:46:07 +01:00
systemd fix(docs): correct Debian 13 deployment steps 2026-02-28 21:05:01 +01:00
.gitignore fix: load .env via python-dotenv; SQLite default for local dev 2026-02-26 20:51:13 +01:00
CLAUDE.md Initial commit: backend API, data models, and test suite 2026-02-26 15:10:24 +01:00
deploy.sh fix(deploy): suppress prepare script noise with --ignore-scripts 2026-03-01 13:57:46 +01:00
README.md fix(docs): correct Debian 13 deployment steps 2026-02-28 21:05:01 +01:00

innercontext

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 + 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

Backend quick start

Requirements: Python 3.12+, PostgreSQL, uv

cd backend

# Install dependencies
uv sync

# Set database URL (defaults to postgresql+psycopg://localhost/innercontext)
export DATABASE_URL=postgresql+psycopg://user:password@localhost/innercontext

# Start the API server (creates tables on first run)
uv run uvicorn main:app --reload

API docs available at http://localhost:8000/docs.

Frontend quick start

Requirements: Node.js 24 LTS+, pnpm

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
/products Skincare / medication products + inventory
/inventory Individual inventory entries
/health/medications Medication entries and usage history
/health/lab-results Lab test results
/routines AM/PM skincare routines and steps
/routines/grooming-schedule Weekly grooming schedule
/skincare Weekly skin condition snapshots
/health-check Liveness probe

MCP server

innercontext exposes 14 tools via 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

cd backend

# Lint
uv run ruff check .

# Format
uv run black .
uv run isort .

# Tests
uv run pytest

Stack

  • 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 for a step-by-step guide for a Proxmox LXC setup (Debian 13, nginx, systemd services).