Skip to content

CELINE Participant Webapp API

FastAPI Backend-for-Frontend (BFF) for the CELINE REC participant webapp. Deployed same-origin behind oauth2_proxy.

The participant frontend (SvelteKit) is maintained separately in celine-frontend (apps/webapp).

Architecture

The webapp uses the BFF pattern: - The frontend (SvelteKit) communicates exclusively with the BFF at /api/* - The BFF reads the JWT from the X-Auth-Request-Access-Token header injected by oauth2_proxy - The BFF proxies authenticated requests to backend services (Digital Twin, nudging-tool) - No cross-origin requests from the browser

Quick Start

uv sync
uv run alembic upgrade head
uv run -m celine.webapp.main
# Listens on http://localhost:8000

For the participant frontend, see celine-frontend apps/webapp.

Features

Feature Description
Overview Energy consumption and production summary
Notifications User notification list and preferences
Settings Account settings, terms acceptance
Web Push VAPID-based push notification subscription
Digital Twin Real-time energy data via DT integration
Assistant Embedded AI assistant (proxied to celine-ai-assistant)

Documentation

Document Description
Architecture BFF pattern, JWT flow, service dependencies, deployment model
API Reference All BFF endpoints: user, overview, notifications, settings
Features Terms acceptance, web push, digital twin integration
Development Local dev proxy setup, env vars, running tests

License

Apache 2.0 — Copyright © 2025 Spindox Labs