coloa

User journeys

Persona 1: Developer building an app with an AI agent (main flow)

1. Install and start

curl -fsSL https://get.coloa.dev | sh        # one Rust binary
coloa init shop-app --template react-ts      # React frontend + TS backend functions
coloa dev                                    # local DB, runtime, gateway, console at :4000

No cloud account needed. The same binary runs in production.

2. Declare data and access rules (coloa/schema.coloa)

table orders {
  id         uuid  @primary
  owner      user  @owner
  total      money
  card_last4 text  @sensitive     // never sent to the browser, masked in logs

  allow read, update: owner == auth.user
  allow read:         auth.role == "staff"
  // no rule for delete → nobody can delete
}

Deny by default: a table with no allow rules is private.

3. Connect the AI agent

coloa agent connect claude-code    # or codex, cursor, gemini

Registers an MCP server and gives the agent its own limited identity.

Agent CAN Agent CANNOT
Write code, edit schema, migrate in preview Touch production
Call APIs on the allowlist See real secrets
Deploy previews Disable access rules or the audit log

4. Agent builds the feature

Prompt: “Add an order history page and a refund button.” The agent runs coloa deploy --preview:

✗ Policy check failed
  functions/refund.ts:12  returns orders.card_last4 to client
  → field is @sensitive. Return a masked value or remove it.
✗ Egress: functions/refund.ts calls api.stripe.com, not in allowlist
  → run: coloa egress allow api.stripe.com  (requires human)
⚠ Cost check: query inside loop (N+1) → ~40 queries/request, +1.8M VND/month

The agent fixes and redeploys; the developer gets pr-42.shop-app.preview.local.

This is the demo moment that sells the product.

5. Secrets never reach the code

coloa secret set STRIPE_KEY sk_live_...      # human only

Code sees a placeholder; the gateway injects the real key into requests to api.stripe.com.

6. Promote with a human gate

coloa promote pr-42
# Changes: +1 page, +2 functions, migration 0007
# Snapshot: prod-db snap_0193
# Approve? [y/N]   (or console / Slack)

7. Roll back

coloa rollback --to snap_0193     # code + DB state

8. Cap costs (coloa.yaml)

budget:
  monthly_cap: 2000000 VND
  on_cap: read_only       # pause | throttle | notify_only

9. Leave anytime

coloa export --out shop-app.tar   # code, pg_dump, objects, config

Persona 2: Security / compliance officer

  1. Audit view — chained, append-only log of every agent and human action:
    10:42  agent:claude@dev-an   deploy preview pr-42        ✓
    10:44  agent:claude@dev-an   egress api.stripe.com       ✗ blocked
    10:51  human:an.nguyen       egress allow api.stripe.com ✓
    11:03  human:lead.tran       promote pr-42 → prod        ✓ (snap_0193)
    
  2. Replay an incident step by step.
  3. Org-wide policies:
    org_policy:
      data_residency: vn-only
      sensitive_fields: [cccd, phone, card_*]
      egress_default: deny
      prod_approval: 2 humans for schema changes
    
  4. Compliance report (PDP law, internal audit, SOC 2-style) as PDF.
  5. App inventory of everything built by employees or agents, with protection level (🟢 full / 🟡 partial / 🟠 external calls).

Persona 3: Local cloud operator (Viettel, CMC, FPT, GreenNode)

  1. Install on their infrastructure:
    coloa cluster install --nodes 3 --mode airgapped --brand "Viettel AppCloud"
    
  2. White-label: their logo, domain, VND billing.
  3. Resell to state agencies and state enterprises (Decisions 1121/808).
  4. Tenant isolation (WebAssembly or microVM per app), quotas, per-tenant policies and audit.
  5. Coloa earns licence per node/tenant + support.

Flow

 Developer + AI agent            Coloa                            Production
 prompt → code ──────────▶ policy + cost check ──✗──▶ agent fixes
                           │ ✓
                        preview env ◀── gateway (egress, credential injection)
                           │
           human/policy ──▶ promote ── snapshot ────────────▶ live app
                           │                                   │
                        audit log (chained, replayable) ◀─────┘