Skip to content

Component boundaries ​

In the proposed design, the editor manages the author's intent, a worker prepares a version, and publishing serves visitors.

A long build does not hold a browser request open or replace a working page piece by piece.

Responsibilities ​

ComponentWhat it doesWhat it must not receive
EditorRequest, materials, progress, preview, historyAI and storage keys
APIAuthentication, project permissions, jobs, version selectionArbitrary generated code execution inside its process
WorkerGeneration, file preparation, result checksUnrestricted access to other projects
PostgreSQLOwners, jobs, versions, domain bindingsLarge images and build archives
Object storageMaterials and immutable resultsPublic drafts and internal repositories
Publication deliveryDomain → site → active versionAn AI call on every visit

This is a responsibility design. A dedicated generation worker and domain router do not exist yet.

Communication ​

The API first saves a job and returns its ID. The editor reads its state; events can speed up screen updates but are not the sole source of progress. After a tab reload, state is restored from saved data.

The worker receives the job, prepares a separate version and reports the result. The API does not consider a site ready just because the model answered: files and passed checks are required. Lifecycle.

Boundaries in code ​

CleanSlice separates responsibilities: HTTP accepts and validates input, the domain describes the use case, a gateway defines a data-access contract, and its implementation works with a specific storage system. Prisma schemas are assembled from slice files. These rules do not mean every slice becomes a separate service.

Existing entry points are listed in the technical foundation. New slice names, API methods and schema fields are not presented here as existing contracts.

Bonsite — small websites for your big ideas.