innercontext/frontend
Piotr Oleszczyk 9524e4df54 fix(frontend): fix routine step numbering and product name display
Steps were numbered from 2 due to off-by-one (order_index + 1).
Product steps showed "Unknown step" because the template checked
step.product (never returned by API) instead of looking up by
step.product_id in the already-loaded products list.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 01:04:28 +01:00
..
src fix(frontend): fix routine step numbering and product name display 2026-03-01 01:04:28 +01:00
static feat: add SvelteKit frontend scaffold with Tailwind CSS 2026-02-26 20:34:34 +01:00
.env.example feat: add API client, types, layout, and all page routes 2026-02-26 20:45:54 +01:00
.gitignore feat: add SvelteKit frontend scaffold with Tailwind CSS 2026-02-26 20:34:34 +01:00
.npmrc feat: add SvelteKit frontend scaffold with Tailwind CSS 2026-02-26 20:34:34 +01:00
components.json feat: add SvelteKit frontend scaffold with Tailwind CSS 2026-02-26 20:34:34 +01:00
package.json feat: add deployment guide, nginx/systemd configs, switch to adapter-node 2026-02-28 20:09:00 +01:00
pnpm-lock.yaml feat: add deployment guide, nginx/systemd configs, switch to adapter-node 2026-02-28 20:09:00 +01:00
pnpm-workspace.yaml feat: add SvelteKit frontend scaffold with Tailwind CSS 2026-02-26 20:34:34 +01:00
README.md feat: add deployment guide, nginx/systemd configs, switch to adapter-node 2026-02-28 20:09:00 +01:00
svelte.config.js feat: add deployment guide, nginx/systemd configs, switch to adapter-node 2026-02-28 20:09:00 +01:00
tsconfig.json feat: add SvelteKit frontend scaffold with Tailwind CSS 2026-02-26 20:34:34 +01:00
vite.config.ts feat: add SvelteKit frontend scaffold with Tailwind CSS 2026-02-26 20:34:34 +01:00

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)