Open Source · Apache License 2.0

Enterprise Application Features, Generated Automatically

AppWithAI produces fully functional applications with production-grade features out of the box — without writing a single line of code.

Every example on this page is taken from one real model: the seventeen-entity CRM the hands-on guide builds. Nothing here is illustrative — you can run that application in your browser and check any claim against it. For why these features belong in a platform at all, see why AppWithAI exists.

AI-Powered

Intelligent Data Modeling

Describe your business domain in plain English. The Domain Analysis Agent, powered by Claude, OpenAI, or a local Ollama model, analyzes your description and automatically extracts entities, attributes, and relationships with confidence scoring.

Key Capabilities

  • ✓ Automatic entity and relationship extraction from natural language
  • ✓ Intelligent attribute type detection (string, number, date, currency, enum)
  • ✓ Human-in-the-loop review gate before any code is produced
  • ✓ Full support for one-to-one, one-to-many, and many-to-many relationships
  • ✓ Automatic primary key and foreign key generation
  • ✓ Choice of AI provider — bring your own API key or run locally

The CRM, as the AI first saw it

Input: "Marketing runs campaigns that produce leads. A qualified lead becomes an account with a contact and an opportunity. We quote the opportunity, contract the win, and support the customer afterwards."

AI Extracts:
Entity: Lead (company_name, lead_source, employee_count, annual_revenue, score, rating, status)
Entity: Account (name, account_type, tier, industry, health_score, territory_id)
Entity: Opportunity (account_id, amount, stage, probability, forecast_category, expected_close_date)
Entity: Quote (opportunity_id, subtotal, discount_percent, grand_total, status, valid_until)

Relationships:
Campaign 1:N Lead
Account 1:N Opportunity
Opportunity 1:N Quote
Quote 1:N QuoteLineItem

Seventeen entities in all, in seven dashboard groups. Chapter 01 →

Visual ERD Designer Capabilities

  • ✓ Mermaid syntax editor with live validation
  • ✓ Interactive React Flow graph visualization
  • ✓ Real-time SQL DDL preview
  • ✓ Migration script preview (Kysely)
  • ✓ Entity and relationship add/edit/delete
  • ✓ Cardinality visualization (Crow's Foot notation)
  • ✓ Save and version ERD diagrams per project
  • ✓ Natural language to ERD conversion
Visual Design

Interactive ERD Designer

The built-in visual ERD designer gives you full control over your data model before code generation. Edit Mermaid syntax directly, see changes reflected instantly in the graph visualization, and preview the exact SQL and migration scripts that will be produced.

All AI-generated ERDs flow through the designer, giving you a clear review and edit experience before any application is generated.

Mermaid-Based ERDs

AppWithAI uses the Mermaid ERD format with Crow's Foot notation — an industry-standard, human-readable, and version-control-friendly representation of your data model.

Intelligent Forms

AI-Generated Smart Forms

Generate data-driven forms that faithfully mirror real-world business documents — quotes with priced line items, contracts, support cases, purchase orders, invoices, expense claims, and any other document your business uses.

The AI understands the semantic meaning of document fields and automatically selects the appropriate input control for each field type, producing forms that reflect how your team actually works.

Runtime Customization — No Code Required

Administrators can reorder form fields by dragging and dropping, hide or make fields mandatory, set display logic, and configure field groups — all through the admin interface without touching code.

The generated New Lead form

Nothing below was designed by hand. Every control comes from the column's type and its dictionary row — this is the form as the CRM actually renders it.

  • 17 fields, 7 required — counted and stated at the top of the form
  • Fields grouped into General and Details, in dictionary sequence
  • Each field badged with the control its type earned — Text, Integer, Amount, Date/Time, Direct Lookup
  • campaign_id and owner_id become lookups that resolve to names, not identifiers
  • annual_revenue is an Amount, converted_at a date-time picker — from the column type alone
  • A help icon on every field, carrying text the generator wrote from the model
  • Required markers on exactly the columns the model did not mark OPTIONAL
  • Schema-validated input via TanStack Form + Zod

Chapter 05 →

Business Rules and Validation Engine

Encode your organization's business logic using visual decision flowcharts. The GoRules Zen Engine executes DMN-based rules with high performance at runtime. The CRM model declares eight; the generated application ships twenty-five, because every entity also gets a validation rule of its own.

🔒

Field-Level Validation

Required fields, ranges, formats, uniqueness, conditional requirements and cross-field checks — one validation rule generated per entity. In the CRM that is seventeen of the twenty-five, and they are why account_number, quote_number and case_number stay unique without anyone writing a check.

📊

Policy Gates

Thresholds an operations person owns, not a developer. The CRM's discount policy auto-approves up to 15%, holds 15–25% for a sales manager, 25–40% for a VP, and refuses anything above 40% outright — as a decision table, editable in the running app.

🔗

Relationship Integrity

Referential rules prevent orphaned records and control deletion — enforced at the API and in the database. In the CRM, blockDeleteWithOpenBusiness refuses to delete an account that still has open opportunities, and it runs before the delete, not after.

Lifecycle Hook System

Draw a decision as a flowchart and bind it to an event. AppWithAI generates executable TypeScript organised by lifecycle event — the CRM binds thirty-eight hooks this way, and each one names the field it guards.

Lifecycle Hook Events — as the CRM uses them

Every handler named below is in the model. None of them is a placeholder.

beforeCreate

leadScoring grades a lead on firmographics, source and revenue before the row exists; normalizeAccountName and assignAccountNumber mint an account's identity

afterCreate

leadRouting sends the scored lead to the partner desk, strategic accounts, enterprise, mid-market or the SMB queue; seedAccountTeam populates the selling team

beforeUpdate

leadQualification gates conversion; opportunityCloseGate refuses a closed-won deal that has no accepted quote; quoteDiscountApproval applies the discount policy

afterUpdate

syncToMarketingPlatform fires when a contact's email_opt_out changes — consent propagates without anyone remembering to propagate it

beforeDelete

blockDeleteWithOpenBusiness refuses to delete an account that still has open opportunities or live contracts

customValidate

ensureAccountNumberUnique and ensureUniqueEmail — the cross-record checks a column constraint cannot express on its own

Thirty-eight hooks across the CRM. Chapter 02 →

Workflow and Document Routing Engine

A state-machine engine routes documents through your organization for review, approval, escalation and action — with full audit trails. The CRM declares ten processes: five state machines and five multi-step sagas.

Conditional Routing

Approval paths adapt to document content. The CRM's discount policy, exactly as the model states it:

  • • Up to 15% — auto-approved within rep authority
  • • 15–25% — held for a sales manager, 24-hour review window
  • • 25–40% — held for a VP, 48-hour review window
  • • Above 40% — refused outright; the quote must be repriced

Lead routing branches the same way, on partner source, revenue above $50M, headcount above 500, then rating.

Escalation and Timeouts

Nothing stalls because nobody looked. The CRM's scheduled triggers, from the model:

  • checkSlaBreaches on support cases — every 15 minutes
  • expireStaleQuotes daily at 06:00; nudgeStalledOpportunities at 07:00
  • openRenewalWindows on contracts daily at 08:00
  • recycleStaleLeads every Monday at 07:00

A critical case escalates to an executive bridge with a 15-minute response target; high goes to a support manager at 60 minutes.

Multi-Step Processes

Sagas write across entities in one transaction, with compensation if a step fails. The CRM declares five:

  • LeadConversion — one qualified lead becomes an account, a contact and an opening opportunity, sized by score
  • QuoteApprovalEscalation — raises the approval task and holds the quote
  • CriticalCaseEscalation — escalates, raises a task, and posts to an external bridge
  • ClosedWonHandoff — opens the contract and books the onboarding kickoff
  • RenewalPlaybook — grades renewal risk and opens the renewal opportunity

Approval Stamping and Audit

The Quote entity carries its own approval record, and the audit log carries the rest:

  • approved_by_id, approved_at and approval_notes — who, when, and on what terms
  • version_number — a renegotiated quote is a new version, not an overwrite
  • • Every rule and workflow run recorded in sys_workflow_runs
  • • Append-only audit log, generated for every audited entity

The CRM's five state machines

Each one is a stateDiagram-v2 in the model. The generated application applies the states, guards every transition by role, and refuses a move the diagram does not draw.

Lead

new → working → nurturing → qualified → converted, with disqualification from three of them

Opportunity

prospecting → qualification → needs_analysis → proposal → negotiation → closed_won, and closed_lost from four stages

Quote

draft → in_review → approved → presented → accepted, with reject, revise, renegotiate and lapse

Support Case

new → assigned → in_progress → resolved → closed, with waiting_on_customer, escalate and reopen

Contract

draft → in_approval → active → expiring → renewed, with terminate and lapse

Guarded by role

Only a sales manager may close_won; only an administrator may terminate a contract

Chapter 03 → · watch one run →

Enterprise-Grade Security

Generated applications include a comprehensive, layered security model — from authentication through to individual field visibility per user role.

Security Architecture — Four Layers

Authentication Layer

Better Auth, configured for email and password with server-side sessions. That is the whole of it — no social sign-in, no second factor, nothing else configured on your behalf. Better Auth supports more; the generated application enables what it needs, and you add the rest

Role Assignment Layer

Users are assigned to one or more roles. Roles aggregate granular permissions for table, field, and row access

Table-Level Access Control

Roles are granted Read, Create, Update, and Delete permissions at the table level via sys_access_role

Field-Level Access Control

Individual columns can be marked visible, editable, or hidden per role — enforced at the API level via sys_access_field

Row-Level Security

Users see only records belonging to their department, region, or organizational unit — enforced via sys_access_record policies

Document Status Security

Approved or completed documents are locked from editing, preserving the integrity of the audit trail

Access control, as the CRM declares it

Fifteen %%rbac restrictions in the model. They restrict — an operation no directive names stays open, which is why the ones that matter are named explicitly.

%%rbac role:sales_manager|sales_ops on Lead.convert
%%rbac role:sales_manager on Opportunity.close_won
%%rbac role:sales_manager|sales_ops on Quote.approve
%%rbac role:support_manager on SupportCase.escalate
%%rbac role:administrator on Contract.terminate

Seven roles across the model — sales_rep, account_executive, sales_manager, sales_ops, support_agent, support_manager, administrator — seeded into the Role screen and enforced on every request. Contact records also run enforceFieldLevelSecurity on read and maskPersonalData on phone and mobile, so a role without the permission never receives the value in the first place.

Chapter 06 →

What this is, and what it is not

Authentication is Better Auth — email and password, server-side sessions. Everything else on this page is authorization: roles, table and field permissions, row policies and the audit trail, all derived from your model and enforced in the generated API.

This page used to claim SOX readiness, GDPR compliance and ISO 27001 alignment. It no longer does, because none of them had been assessed. A compliance programme is an audit of an organization and its operations, not a property a code generator can hand you — the access control and the audit trail here are evidence you would bring to one, not a substitute for it. The security assessment is on the list of things outstanding before 1.0.0.

Embedded AI

AI Copilot Interface

Every generated application includes an embedded AI assistant powered by CopilotKit. End users get a conversational interface for natural language data queries, in-context guidance, and intelligent suggestions — directly within their application.

What Users Can Do

  • "How many quotes are sitting in review right now?"
  • "Show me every opportunity in negotiation above $100,000"
  • "Which leads scored hot this week and who owns them?"
  • "List the critical support cases still open past their SLA"
  • "What contracts enter their renewal window in the next 90 days?"

Security Is Never Compromised

The AI Copilot query interface honors the same security model as the rest of the application:

  • ✓ Users can only query data they are authorized to access
  • ✓ System administration tables are inaccessible
  • ✓ Field-level permissions are enforced per query
  • ✓ Row-level security filters are applied automatically
  • ✓ Query complexity limits prevent resource exhaustion
  • ✓ SQL injection patterns are detected and blocked
AI Query Pipeline
User query → Intent parsing → Security validation → Query construction → Result presentation

Metadata-Driven Application Dictionary

Application behavior is driven by metadata, not hardcoded logic — enabling runtime customization without developer involvement.

What Makes It Different

When form layout, validation, and routing are driven by metadata tables, your application administrators can change application behavior directly — no code change, no deployment, no regression risk.

Traditional vs AppWithAI

Change Traditional AppWithAI
Add a field to a form Hours of development Minutes in admin
Reorder form fields Code + deploy Drag and drop
Change validation rule Code + test + deploy Update in admin
Change the discount approval threshold Code change + redeploy Update workflow config
Add a user role Code + config Create role + assign

Dictionary-Driven Form Relationships

The Application Dictionary defines not just individual forms, but how forms relate to each other. This is the CRM's Opportunity window as the generated application stores it.

sys_window: Opportunity  (1 tab · 17 fields)
└─ sys_tab: Opportunity
    ├─ Id   → id  · seq 10 · displayed: No
    ├─ Account Id → account_id · seq 20 · lookup
    ├─ Amount → amount · seq 70
    ├─ Stage → stage · seq 90
    └─ … eleven more, each with sequence, displayed, read-only and active

Result:
✓ Sequence numbers step by ten, so a field can be slotted between two
id exists as a field but is never displayed
✓ Foreign keys resolve to names, not identifiers
✓ Twenty-three windows in all — seventeen entities plus six admin screens

Chapter 06 →

Check Any of This Yourself

Every feature on this page is on one page of the guide, and the whole CRM runs in your browser — no install, no signup, nothing sent anywhere.

Run the CRM in Your Browser Schedule a Demo