No description
Find a file
Piotr Oleszczyk 31e030eaac feat: AI pre-fill for product form via Gemini API
Add POST /products/parse-text endpoint that accepts raw product text,
calls Gemini (google-genai) with a structured extraction prompt, and
returns a partial ProductParseResponse. Frontend gains a collapsible
"AI pre-fill" card at the top of ProductForm that merges the LLM
response into all form fields reactively.

- Backend: ProductParseRequest/Response schemas, system prompt with
  enum constraints, temperature=0.0 for deterministic extraction,
  effect_profile always returned in full
- Frontend: parseProductText() in api.ts; controlled $state bindings
  for all text/number/checkbox inputs; applyAiResult() merges response

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-27 23:04:24 +01:00
backend feat: AI pre-fill for product form via Gemini API 2026-02-27 23:04:24 +01:00
frontend feat: AI pre-fill for product form via Gemini API 2026-02-27 23:04:24 +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
README.md Initial commit: backend API, data models, and test suite 2026-02-26 15:10:24 +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 and MCP to an LLM agent.

Repository layout

backend/   Python backend — FastAPI REST API + SQLModel models

A frontend will be added in the future.

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.

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
/skin-snapshots Weekly skin condition snapshots
/health-check Liveness probe

Development

cd backend

# Lint
uv run ruff check .

# Format
uv run black .
uv run isort .

Stack

  • Runtime: Python 3.12, FastAPI, Uvicorn
  • ORM: SQLModel 0.0.37 + SQLAlchemy, Pydantic v2
  • Database: PostgreSQL (psycopg3)