Evergreen

The Hidden Architecture of AI-Generated Apps

AI app builders make hidden choices about data, identity, permissions, state, integrations, deployment, operations, and exit. Review them before users arrive.

Aug 4, 20267 min readBy Dalton Anderson
In this article

The Architecture Decisions Hidden Inside an AI-Generated App

An AI app builder makes architecture decisions whenever it chooses how data is stored, users are identified, permissions are enforced, workflows change state, integrations are called, background work runs, files are retained, and the application is deployed. The interface may appear before those decisions are visible. Review them before real users and data make them expensive to reverse.

The goal is not to reject managed platforms or demand a perfect design on day one. It is to know which choices are easy to change, which create compounding dependencies, and who owns the consequences.

The dashboard is the surface of a system

E098's generated insurance applications contained familiar screens: dashboards, properties, submissions, claims, classifications, carrier options, and reports. A builder had to decide what those objects were and how they related, even if it only created demo data.

The visible hierarchy may imply a deeper model. A submission may belong to an organization and a property. A property may have locations, documents, claims, exposures, and quotes. A user may be an employee, broker, administrator, or customer. Each relationship affects queries, permissions, reports, exports, and future migrations.

flowchart TB
    U["Users and organizations"] --> I["Identity and tenant boundary"]
    I --> A["Authorization rules"]
    A --> D["Data model and state transitions"]
    D --> Q["Jobs, reports, and analytics"]
    D --> X["External APIs and files"]
    Q --> O["Deployment and observability"]
    X --> O
    O --> E["Backup, recovery, and exit"]

A choice near the top reaches many downstream consumers. That is why an innocent-looking shortcut can become costly later.

Data shape becomes application shape

A generated form can create fields without establishing a durable data model. That may be acceptable for a disposable prototype. It becomes risky when the same fields drive permissions, analytics, documents, integrations, and business decisions.

Review entities, identifiers, relationships, required and optional values, allowed states, history, deletion, and migration. Ask how the system distinguishes a correction from a new fact and whether the application preserves the event that changed a record.

The storage model matters too. Base44's current backend documentation describes a managed NoSQL, MongoDB-compatible service with entity schemas and row-level and field-level controls. Lovable's hosting and ownership guidance describes managed, hybrid, and self-managed patterns commonly involving Lovable Cloud, Supabase, or PostgreSQL-based services. These are not interchangeable implementations of the phrase "full stack."

A schema-light backend can accelerate iteration. A relational model can make some constraints and reporting paths clearer. Either can be appropriate. The important question is whether the chosen model fits the data, constraints, access patterns, and migration plan.

Tenancy and authorization are architecture

Multi-user applications need a tenant boundary. The system must know which organization owns a record and enforce that boundary on every read, write, file, report, and background job.

Hiding another customer's record in the interface is not authorization. The server or trusted data layer must enforce access. Test direct URLs, APIs, exports, search, attachments, administrative tools, and indirect references.

The model should distinguish roles from permissions. "Admin" is too vague when one administrator can manage users, another can review submissions, and a platform operator can access support data. Record who can grant each permission and how changes are audited.

OWASP ASVS provides testable security requirements that can turn this architecture discussion into verification. The builder's default rules are a starting point, not proof.

Identity determines who owns the user relationship

An early authentication choice affects onboarding, support, recovery, branding, enterprise access, account deletion, and migration.

Replit's current authentication documentation, for example, distinguishes Replit Auth from a dedicated Clerk tenant. Replit positions the first as a quick path and the second as a better fit for branded commercial applications. The technical feature is login. The architecture decision is who owns the identity relationship and how it moves later.

Ask which account owns the identity provider, whether development and production are separated, which identifiers are stored in the application, how sessions are revoked, how enterprise SSO would fit, and how users are migrated without losing ownership or access.

State transitions carry the business rules

A button is not a workflow. A workflow defines which states exist, who may move between them, what validation is required, what side effects occur, and how failure is handled.

In E098, generated applications used states such as submitted, quoted, pending review, bound, and declined. Those labels create an impression of business completeness. The architecture needs to answer whether a user can skip a state, whether two actions can conflict, whether a retry duplicates an external event, and whether the history can be audited.

Model critical transitions explicitly. Record the command, current state, required permission, validation, resulting state, event, and recovery behavior. Avoid placing the only version of a business rule inside generated interface code.

Integrations create contracts outside the app

Builders can make an integration appear through a card, API label, or generated client. A working integration also needs credentials, environments, rate limits, timeouts, retries, idempotency, error mapping, data contracts, monitoring, and an owner.

Keep external-service code behind a defined boundary. Validate inbound and outbound data. Record which system is authoritative for each field. Test degraded behavior when the service is slow, unavailable, or returns an unexpected response.

Generated claims such as "real-time carrier quotes" or "three-second enrichment" should be treated as interface copy until the actual service and measurement exist.

Background work hides behind instant-looking screens

Reports, document processing, notifications, imports, enrichment, and analytics may need work that continues after a request ends. The builder may implement this synchronously, use a platform job, or leave it simulated.

Architecture should identify queues, schedules, retry limits, dead-letter handling, idempotency, visibility, and cancellation. A failed background job should not silently leave the user with a permanent "processing" state.

Operational ownership matters. Ask where jobs are listed, how failures alert the team, how a job is replayed, and how duplicate side effects are prevented.

Files and secrets need separate treatment

Uploaded documents do not belong in an ephemeral deployment filesystem. They need controlled storage, access checks, scanning where appropriate, retention, deletion, backup, and a migration path.

Secrets should be stored in a purpose-built service and exposed only to the component that needs them. Replit's secrets documentation warns against hard-coding credentials and describes encrypted environment variables. Other builders provide their own managed vaults. The application owner still needs an inventory, rotation process, access policy, and incident response.

Never assume an exported repository is safe to publish. Scan the current files and history for credentials, customer data, generated test fixtures, and private URLs.

Deployment choices become operating choices

The architecture must distinguish preview, staging, and production. It should identify build provenance, configuration, persistent services, custom domains, logs, metrics, alerts, backup, recovery, rollback, and cost.

Replit's current publishing documentation describes several deployment types and explains that published apps run from snapshots. Lovable documents managed and external hosting routes. Base44 emphasizes integrated hosting. A managed environment can remove substantial work, but it also sets the operational boundary.

Choose that boundary deliberately. A team with no infrastructure staff may benefit from an integrated platform. A team with private-networking, regional, audit, or internal-control requirements may need a different deployment path.

Code export does not equal system portability

A Git repository can be complete while the application remains coupled to managed data, identity, storage, background jobs, or deployment behavior.

Base44's GitHub documentation describes a two-way connection with plan, ownership, permanence, and history conditions. Lovable describes GitHub as a bridge to alternative deployments. Emergent and Replit also document GitHub workflows. The important question is what still depends on the vendor after the repository moves.

Run a clean-room exit test. Rebuild the application from the repository in a new environment. Import representative data. Recreate identity and secrets. Exercise a critical workflow. Observe it, restore it, and list every remaining dependency.

Portability is a tested capability, not a feature label.

Write a one-page architecture record

Before significant adoption, record the system boundary, users, components, data stores, trust zones, identity, authorization, critical workflows, integrations, jobs, file storage, secrets, deployment, observability, backup, recovery, and exit.

For each important decision, name the owner, alternatives considered, reason, evidence, reversal cost, and trigger for review. Mark assumptions that the builder made without explicit approval.

NIST SP 800-218 can help connect architecture choices to secure-development ownership and response. The record does not need to be long. It needs to be accurate enough for another person to challenge and operate.

Spend attention where dependencies compound

Colors, labels, and many interface components remain easy to change. Data shape, tenant boundaries, authorization, identity ownership, integration contracts, and operating dependencies become harder as users and history accumulate.

That is the useful version of Dalton's E098 warning about one-way doors. The builder can accelerate the first implementation. The product owner still has to decide which doors the system walks through.

Use [[From AI Prototype to Production]] to turn the architecture record into a release gate. Use [[How to Evaluate an AI App Builder]] when the platform itself is still a choice.

AI assisted with research organization, structure, drafting, and validation. Dalton Anderson remains the attributed author and final editorial authority. The transcript and linked public sources control factual claims. Publication remains unauthorized.

Sources

Follow the evidence.

  1. docs.base44.com: githubdocs.base44.com
  2. web.dev: vitalsweb.dev
  3. docs.replit.com: replit appsdocs.replit.com
  4. docs.replit.com: build with agentdocs.replit.com
  5. csrc.nist.gov: finalcsrc.nist.gov
  6. help.emergent.sh: 272715 features and toolshelp.emergent.sh
  7. firebase.google.com: migrating projectfirebase.google.com
  8. owasp.org: www project application security verification standardowasp.org
  9. docs.base44.com: Quick start guidedocs.base44.com
  10. w3.org: WCAG22w3.org
  11. firebase.google.com: get started aifirebase.google.com
  12. help.emergent.sh: plans and creditshelp.emergent.sh
  13. docs.lovable.dev: githubdocs.lovable.dev
  14. docs.lovable.dev: getting starteddocs.lovable.dev
  15. firebase.google.com: overviewfirebase.google.com

From this episode

Two useful next steps.

Evergreen · 1 min

What One-Shot App Generation Actually Proves

A one-shot AI app build can prove initial instruction-following and visible interaction. It cannot prove security, correctness, scale, or demand.

Research Note · 1 min

Vibe Coding Benchmark Method Research Note

A useful AI app-builder benchmark must answer a decision rather than manufacture a universal leaderboard. The decision might be which tool best supports a team's internal

Return to the episode