Web Application Architecture
A SaaS experience built on the engine, not around it.
“The browser is a client of the platform, not the platform itself.”
The web app as orchestration layer
The web application should be the most accessible face of AlgoLens, but it must not become the place where core logic is trapped. Its responsibility is orchestration: routes, layouts, workspaces, project management, editor integration, playback controls, collaboration surfaces, account flows, onboarding, dashboards, and documentation.
Next.js is a strong fit because it supports product pages, authenticated application routes, server-rendered documentation, API-adjacent workflows, and SEO-friendly educational content. The app can expose an editor, trace viewer, runtime panel, semantic inspector, timeline, complexity panel, export controls, and AI explanation panel while still calling the same engine used by API and CLI clients.
A mature web architecture should separate marketing, documentation, public trace sharing, playground sessions, authenticated workspaces, organization administration, billing, and enterprise settings. Each area should be route-driven, composable, and progressively enhanced. The UI is a client; the trace and project models remain portable.
Next.js App
├─ Marketing
├─ Docs
├─ Playground
├─ Workspaces
├─ Trace Viewer
├─ Collaboration
└─ Admin
↓
Universal Core + API