wrenlyDocumentation
Architecture

How Wrenly works

Follow a prompt from your browser to an AI answer, a checked app and an optional deployment.

Wrenly turns a conversation into an app through several separate steps. Keeping them separate lets a build continue when you refresh the browser, and lets you inspect an app before deciding to publish it.

For example:

You ask for a booking app. Wrenly checks your access, asks your chosen model to write code, checks that code inside Docker, then saves the result for you to inspect.

Web workspaceNext.js · browser UI
Wrenly APIHono · Bun · Better Auth
Framework MCP serversNext.js / Laravel tools

API-managed persistence and execution ↓

Control PostgreSQLAccounts · history · durable work
Docker sandboxValidation · isolated previews
PublishingPrivate image → Coolify
The API calls framework tools through MCP. Model calls and credentials stay server-side. Browser subscriptions do not own execution.

Follow your prompt

  1. Your browser sends the message and selected project version to the API—the server that handles Wrenly requests.
  2. The API checks access and saves the request before confirming it. A server worker picks up that saved work; the browser does not keep it alive.
  3. Wrenly asks the chosen model for an answer. This step is called inference. The answer can be a question, plan or generated code. Framework-specific programs called MCP servers provide the tools for generating and editing each stack. API tokens stay on the server.
  4. Docker checks generated code in isolation. Dependencies are installed under restrictions, then validation runs with network access blocked. If a check fails, Wrenly can give the error to the model for another bounded attempt.
  5. Wrenly saves progress and results. Reloading the browser reads those records again instead of starting the request over. Cancelling work is an explicit action.

Find each responsibility

LocationWhat it does
apps/webShows conversations, projects, code and preview controls
apps/apiChecks access, saves requests and coordinates server work
Framework MCP serversProvide generation/editing tools for a framework
packages/inferenceSafely sends model requests and checks saved skill instructions
packages/sandboxUses Docker to check generated code and run previews
packages/dbDefines and manages Wrenly's PostgreSQL records using Drizzle
packages/deployTalks to the services used to put an app online
apps/docsServes documentation and the landing page

Framework tools and official MCP packages

MCP is a way for programs to expose and call named tools. Two MCP servers can use that same protocol while doing different jobs. Wrenly's Laravel server, for example, exposes generation and editing tools that return app files; the API handles Docker validation separately.

Wrenly does not currently install or call Laravel Boost or the laravel/mcp package. Boost helps coding assistants work on an existing Laravel application. Laravel MCP lets a Laravel app expose its own functionality to AI clients. These can complement development tooling, but neither replaces Wrenly's saved-build or sandbox lifecycle.

Preview first; publish when ready

A preview runs one saved app version so you can inspect it. Publishing puts that version at a live address. Neither generation nor opening a preview publishes it.

Wrenly packages the checked app into a Docker image and stores it in a private registry, a service for keeping images. Coolify runs that exact image, identified by its content fingerprint, or digest. It does not build a different copy from source.

Words you will see in the code

TermPlain meaning
Model providerThe service that runs the model you ask for answers
AdmissionChecking and saving a new request before accepting the work
Durable workWork remembered in the database, rather than only in a browser connection
WorkerA server loop that picks up saved work
Claim / leaseWhich worker owns an operation, and how long that ownership lasts without renewal
ReplayReading already-saved progress again after reconnecting
Frozen snapshotThe saved version of source/settings/instructions chosen for that request
ReconciliationChecking what actually happened after a result could not be confirmed

Keep instance data separate from generated-app data

Instance dataControl PostgreSQL · active
Generated-app dataExperimental · Development only
These are separate resources and credentials. Generated applications never receive control-database access. Development uses its own scoped credentials; Production provisioning remains unavailable.

The control database stores Wrenly's own accounts, projects and work history. Generated apps must not receive its credentials. The separate generated-app database module remains in development; its internal code does not make that feature available yet.

Read the next layer