---
title: "Owner Project Lab"
description: "Buyer My Projects (/my-orders), shared order_lab chat with integrator and Reggie, and admin CRM order desk under /admin/crm — right-rail tabs + hero status"
locale: "en"
---
# Owner Project Lab

> **Info**
> Use **Founder** / **Developer** tabs in the docs sidebar to filter this page. Shared sections below apply to both audiences.

After a calculator **project order** is paid, the **buyer (owner)** opens **My Projects** at `/my-orders` — status, **Order Project Config** (name/slogan/logo), **owner secrets** (Firebase/RingBase), masked deploy summary, and one shared **Project room** with integrator and Reggie. Integrators work the same room from `/my-jobs/[id]` with ops env + full projectConfig (no owner secrets plaintext). Admins manage orders under `/admin/crm/orders/[id]`. All three detail surfaces share **Order Lab right-rail tabs** (color-coded completion) plus a slim **pods / deploy / DB health** hero. Deploy is integrator/admin only; Reggie never deploys.

| Role | Surface | What they can do |
|------|---------|------------------|
| **Buyer** | `/my-orders`, `/my-orders/[id]` | Tabs: overview · playbook · project · secrets · wiki · source · room; vital **projectConfig**; **owner_private** env; **writable** Forgejo overlay source (after scaffold); Project room — **no** deploy/scaffold |
| **Integrator** | `/my-jobs/[id]` Order Lab | Tabs: overview · playbook · project · secrets · wiki · env · source · deploy (+ floating chat rail); ops env + `imageTag`; full projectConfig; **Request update** for owner keys; deploy |
| **Admin** | `/admin/crm/orders/[id]` | Tabs: overview · manage · project · secrets · env · source · deploy · chats; namespace lock; all env + projectConfig |
| **Reggie** | Poller on `order_lab` | Locked to metadata namespace/project; chat plans only — **no deploy** |

### Order Lab chrome (1.97.20+)

Shared shell: `OrderLabPageShell` → `RingRightRailLayout` + `DavinciCenterPane` + `OrderLabNavRail` (active = beam chrome; status via StatusDot) + `OrderLabHeroStats`. Deep-links: `?tab=`, `?source=` (opens Source tab), `#project-config` / `#secrets`. Status SSOT: `computeOrderLabTabStatuses` (server first paint) + live client bumps (`refreshHero`, `tabStatusFromDeploySnapshot`, `tabStatusFromSourceTree` — empty/scaffold → orange incomplete). `GET /api/my-jobs/[id]/deployment/status` (server-side clone `/api/health` — no browser CORS). Client fetches use `fetchJsonSafe`. Manage client lives at `features/crm/orders/crm-order-detail-client.tsx`.

### Order Project Config SSOT

Control-plane store: `project_orders.data.projectConfig` (allowlisted ring-config overlay). On deploy, `applyAndDeploy` writes ConfigMap `RING_ORDER_PROJECT_CONFIG` + `NEXT_PUBLIC_BRAND_*` mirrors. Runtime: `ring-config-core` `mergeDeep(file, overlay)`. Install `ring-config.json` is never rewritten.

```mermaid
flowchart TD
  buyer["/my-orders/[id]"] --> lab["order_lab roombuyer + integrator + Reggie"]
  integrator["/my-jobs/[id]"] --> lab
  admin["/admin/crm/orders/[id]"] --> lab
  admin --> dmI["Integrator DM"]
  admin --> dmC["Client DM"]
  reggie["Reggie poller"] --> lab
```

### For founders

## Why this matters for your clone

Custom Ringization orders need a **buyer-facing control panel** that is not the integrator desk. Owners see progress and talk in one room; they never see cluster secrets. Admins keep private escalation DMs while the Project room stays the single source of project talk. Color-coded tabs show what still needs filling (red = required, orange = recommended, mint = ready).

  
  
  

### Operator checklist

1. Buyer pays via calculator → lands on **My Projects** detail for that order.
2. Nav label **My Projects** (`navigation.myProjectOrders`) lists paid/in-progress work.
3. Detail shows payment/work status, progress, project URL / last deploy status (masked — no env secrets) in the hero + Overview tab.
4. Chat: single **Project room** tab — same room the integrator and Reggie use.
5. Admin opens `/admin/crm/orders/[id]` for Manage + Chats (Reggie room | Integrator DM | Client DM), and sets namespace lock when ready.

Old `/admin/email-*` page URLs are **gone**. Bookmarks must use `/admin/crm/{inbox,drafts,contacts,tasks,analytics,orders}`. API paths remain `/api/admin/email/*`.

### For developers

## Buyer APIs and pages

| Piece | Path |
|-------|------|
| List page | `app/[locale]/my-orders/page.tsx` → `MyOrdersListClient` |
| Detail page | `app/[locale]/my-orders/[id]/page.tsx` → `BuyerOrderPanel` → `OrderLabPageShell` |
| List API | `GET /api/my-orders` — `ProjectOrderService.listForUser` (session owner) |
| Detail API | `GET /api/my-orders/[id]` — owner or platform admin; deployment summary **without** env secrets |
| Status (hero) | `GET /api/my-jobs/[id]/deployment/status` — `allowBuyer`; pods + deploy meta + server health probe |
| Owner env | `GET/PATCH /api/my-orders/[id]/env` — `owner_private` + `public_shared` only |
| Project config | `GET/PATCH /api/my-orders/[id]/project-config` — buyer vital mask |
| Integrator project config | `GET/PATCH /api/my-jobs/[id]/project-config` — full allowlist |
| Env request | `POST /api/my-jobs/env-request` (+ `/cancel`) — posts `env_request` into `order_lab` |
| Routes | `ROUTES.MY_ORDERS`, `ROUTES.MY_ORDER(id)` in `constants/routes.ts` |
| Success CTA | `app/[locale]/calculator/success/page.tsx` → `ROUTES.MY_ORDER(order.id)` |
| Shell SSOT | `features/crm/lab/order-lab-page-shell.tsx`, `order-lab-tabs.ts`, `order-lab-tab-status.ts`, `safe-fetch-json.ts` |

Detail response includes order + optional `{ edge, namespace, projectName, deploymentName, projectUrl, lastDeployAt, lastDeployStatus, lastError? }` and `edgeLabels` from `RING_EDGES`.

## Lab auth and chat bootstrap

| Piece | Path / contract |
|-------|-----------------|
| Auth | `features/crm/lab/lab-auth.ts` — roles `admin` \| `integrator` \| `buyer`; `allowBuyer` for chat/read + source file PUT/suggest-message |
| Reject buyer mutate | Deploy/env/scaffold routes omit `allowBuyer` (403); source overlay commits allowed for buyer |
| Chat bootstrap | `GET /api/my-jobs/[id]/chat` with `allowBuyer: true` |
| Shared payload | `labConversationId` (+ deprecated `orderLabConversationId`) for all roles |
| Admin-only extras | `integratorDmId`, `clientDmId` (aliases include deprecated `customerConversationId`) |
| Room service | `getOrCreateOrderLabConversation` + `syncOrderLabMetadata` in `order-lab-chat-service.ts` |

`syncOrderLabMetadata` copies `namespace`, `deploymentName`, `edge`, `projectName`, `buyerUserId`, `integratorId` onto conversation metadata (`kind: order_lab`, `hiddenFromInbox: true`).

### Role matrix (verified)

| Action | Buyer | Integrator | Admin | Reggie |
|--------|-------|------------|-------|--------|
| Read order + masked deploy | yes | yes (My Jobs) | yes | — |
| Project room chat | yes | yes | yes | poller reply |
| `owner_private` env | **write** | request only | write | no |
| `integrator_ops` env | no | write | write | no |
| Order Project Config (vital) | **write** | write | write | no |
| Order Project Config (full) | vital only | **full** | full | no |
| Deploy / pods | no | yes | yes | **no** |
| Namespace / edge lock | no | no | yes | no |

## Admin CRM UI

| Piece | Path |
|-------|------|
| Chat tabs | `features/crm/lab/admin-crm-chat-tabs.tsx` — Reggie room \| Integrator DM \| Client DM |
| Namespace editor | `features/crm/lab/admin-namespace-editor.tsx` |
| CRM shell | `features/admin/crm/crm-admin-shell.tsx` — `showRightRail={false}`; tabs Orders \| Inbox \| Drafts \| Contacts \| Tasks \| Analytics |
| pageContexts | `crm-orders`, `crm-inbox`, `crm-drafts`, `crm-contacts`, `crm-tasks`, `crm-analytics` |
| Routes | `ADMIN_CRM_*` canonical; `ADMIN_EMAIL_*` aliases point at `/admin/crm/*` |
| Re-export | `features/admin/email/email-admin-shell.tsx` → `CrmAdminShell` (deprecated alias) |

Email admin **HTTP** APIs are unchanged — see [Email AI-CRM API](/docs/api/email-ai-crm.md). Cron `email-analytics` id unchanged.

### Trace buyer access

Confirm session user owns the order for `GET /api/my-orders/[id]`. Buyers must not receive env maps — only the masked deployment summary fields above.

### Bootstrap chat with allowBuyer

Call `GET /api/my-jobs/[id]/chat`. Expect `labConversationId` and `role: 'buyer' | 'integrator' | 'admin'`. Wire UI to a single Project room (`LabThread` / order-lab rail pattern).

### Keep Reggie locked

After namespace/projectName changes, ensure `syncOrderLabMetadata` runs (chat bootstrap and deployment patch paths). Poller (`AI-REGGIE/scripts/reggie-order-lab-poller.mjs`) reads metadata and refuses other namespaces/projects.

## Related documentation

  
- **[Email AI-CRM](/docs/features/email-ai-crm.md)** — Inbox under /admin/crm/*; APIs still /api/admin/email/*.

  
- **[Admin console](/docs/features/admin.md)** — CrmAdminShell, pageContexts, and CRM tab bar.

  
- **[PaymentConductor](/docs/features/payment-conductor.md)** — project_order deposits that feed My Projects.

  
- **[Messaging](/docs/features/messaging.md)** — Conversation types and inbox hide for tool / lab rooms.

- [configuration](/docs/configuration.md) — Next-step: Order Lab configuration hub — public vars, secrets, WalletConnect, wiki, playbook.

- [configuration/walletconnect](/docs/configuration/walletconnect.md) — Same-workflow: buyer sets NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID on Secrets.

- [configuration/secrets](/docs/configuration/secrets.md) — Deep-dive: owner_private / public_shared Secrets tab save flow.

- [customization/ringization-playbook](/docs/customization/ringization-playbook.md) — Next-step: Tier-1/2/3 feature-overlay checklist for self-build and integrator desks.

- [features/admin-wiki](/docs/features/admin-wiki.md) — Same-workflow: each project order can keep a Markdown wiki vault on buyer and integrator desks.

- [features/admin](/docs/features/admin.md) — See-also: CRM orders desk lives under the Admin console shell.

- [features/payment-conductor](/docs/features/payment-conductor.md) — Prerequisite: project orders are paid through PaymentConductor before My Projects unlocks.

- [development/ring-mcp](/docs/development/ring-mcp.md) — Depends-on: agents may write project vaults via ring-wiki-* while Reggie stays plan-only on deploy.
