innercontext/frontend
Piotr Oleszczyk 40f9a353bb feat(products): add shopping suggestions feature
- Add POST /api/products/suggest endpoint that analyzes skin condition
  and inventory to suggest product types (e.g., 'Salicylic Acid 2% Masque')
- Add MCP tool get_shopping_suggestions() for MCP clients
- Add 'Suggest' button to Products page in frontend
- Add /products/suggest page with suggestion cards
- Include product type, key ingredients, target concerns, why_needed,
  recommended_time, and frequency in suggestions
- Fix stock logic: sealed products now count as available inventory
- Add legend to clarify ✓ (in stock) vs ✗ (not in stock) markers
2026-03-02 22:38:08 +01:00
..
messages feat(products): add shopping suggestions feature 2026-03-02 22:38:08 +01:00
project.inlang feat(frontend): add PL/EN i18n using @inlang/paraglide-js v2 2026-03-01 13:20:34 +01:00
src feat(products): add shopping suggestions feature 2026-03-02 22:38:08 +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(frontend): add drag-and-drop reordering and inline editing for routine steps 2026-03-01 17:21:59 +01:00
pnpm-lock.yaml feat(frontend): add drag-and-drop reordering and inline editing for routine steps 2026-03-01 17:21:59 +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(frontend): add PL/EN i18n using @inlang/paraglide-js v2 2026-03-01 13:20: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)