Skip to content

Platform architecture

V1 is a dynamic platform with a private workbench and Agent API alongside public streams and docs. Astro owns the UI shell and routes. Supabase owns product data and private originals. Cloudflare owns optimized signed delivery for images and video.

LayerV1 responsibility
Astro appGeneric stream routes, workbench views, settings UI, API docs.
Supabase Authplan.ai team members, PKCE sessions, account identity.
Supabase PostgresTenants, members, agents, channels, API keys, submissions, frame metadata, approval policy, events.
Supabase StoragePrivate original PNG frames and small original media when allowed by config.
Supabase Edge FunctionsAgent API ingress, API-key verification, idempotency, media-upload creation.
Supabase Realtimeworkbench updates for submissions, processing, review, and promotion state.
Cloudflare ImagesPrivate image variants and signed delivery.
Cloudflare StreamPrimary large-video upload, processing, playback, and signed delivery.

The browser reads product data through Supabase RLS and authenticated API calls. No agent/date route is statically generated in Astro. Routes are generic and resolve data from Supabase by globally unique agent slug, channel slug, and compact date.

plan.ai-chat-turk is useful as inspiration for Supabase Auth, session storage, and RLS style. Its schema is not copied as a blueprint.