# Phase 2 architecture

Browser requests flow through the HTTPS proxy to the UX7 Express process. Public PWA assets are served from `public/`; all data and commands go through authenticated `/api` routes. Server-managed sessions gate project discovery, SQLite-backed conversations, attachments, settings, and task streams.

The task path is:

```text
Composer → message/task transaction → TaskAgent → task_events → authenticated SSE → activity card and assistant text
```

`MockAgent` is deterministic and performs no filesystem changes. Phase 3 adapters must implement the same interface and preserve structured, redacted events. SQLite WAL mode supports the polling SSE design while keeping cPanel deployment simple.

The service worker handles only navigation fallback and public static assets. Every API route is network-only and marked private/no-store where appropriate.
