innercontext/frontend
Piotr Oleszczyk c8fa80be99 fix(api): rename 'metadata' to 'response_metadata' to avoid Pydantic conflict
The field name 'metadata' conflicts with Pydantic's internal ClassVar.
Renamed to 'response_metadata' throughout:
- Backend: RoutineSuggestion, BatchSuggestion, ShoppingSuggestionResponse
- Frontend: TypeScript types and component usages

This fixes the AttributeError when setting metadata on SQLModel instances.
2026-03-06 16:16:35 +01:00
..
messages feat(profile): add profile settings and LLM user context 2026-03-05 15:57:21 +01:00
project.inlang chore(frontend): format files with prettier 2026-03-03 20:51:34 +01:00
src fix(api): rename 'metadata' to 'response_metadata' to avoid Pydantic conflict 2026-03-06 16:16:35 +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
.mcp.json chore(frontend): format files with prettier 2026-03-03 20:51:34 +01:00
.npmrc feat: add SvelteKit frontend scaffold with Tailwind CSS 2026-02-26 20:34:34 +01:00
.prettierignore feat(frontend): add ESLint and Prettier with Svelte support 2026-03-03 01:21:50 +01:00
.prettierrc feat(frontend): add ESLint and Prettier with Svelte support 2026-03-03 01:21:50 +01:00
components.json chore(frontend): format files with prettier 2026-03-03 20:51:34 +01:00
eslint.config.js feat(frontend): add ESLint and Prettier with Svelte support 2026-03-03 01:21:50 +01:00
package.json feat(frontend): add ESLint and Prettier with Svelte support 2026-03-03 01:21:50 +01:00
pnpm-lock.yaml feat(frontend): add ESLint and Prettier with Svelte support 2026-03-03 01:21:50 +01:00
pnpm-workspace.yaml feat: add SvelteKit frontend scaffold with Tailwind CSS 2026-02-26 20:34:34 +01:00
README.md chore(frontend): format files with prettier 2026-03-03 20:51:34 +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(frontend): unify editorial UI and DRY form architecture 2026-03-04 21:43:37 +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)