innercontext/frontend/README.md
Piotr Oleszczyk 95fbdeb212 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>
2026-02-28 20:09:00 +01:00

1.8 KiB

innercontext — frontend

SvelteKit web UI for innercontext. Provides a browser interface for managing skincare products, routines, health data, and skin condition snapshots.

Stack

  • Framework: SvelteKit 2, Svelte 5 (Runes)
  • Language: TypeScript
  • Styles: Tailwind CSS v4
  • Components: shadcn-svelte (bits-ui)
  • Adapter: @sveltejs/adapter-node (required — uses +page.server.ts form actions)

Development

# Install dependencies
pnpm install

# Start dev server (API proxied to localhost:8000)
pnpm dev

The backend must be running at http://localhost:8000. See ../backend/ for setup instructions.

Environment variables

Variable Description Default
PUBLIC_API_BASE Base URL of the FastAPI backend http://localhost:8000

Set PUBLIC_API_BASE at build time for production:

PUBLIC_API_BASE=http://innercontext.lan/api pnpm build

Building for production

pnpm build
# Output: build/

Run the production server:

node build/index.js

Or use the provided systemd service: ../systemd/innercontext-node.service.

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

Key files

File Purpose
src/lib/api.ts API client (typed fetch wrappers)
src/lib/types.ts Shared TypeScript types
src/app.css Tailwind v4 theme + global styles
svelte.config.js SvelteKit config (adapter-node)