Écorce CRM

crm.ecorce.app · prototype 0.1 · for grok-builder

The desk.
Directory + typed boards.

Écorce is a buying group. This Worker is the operational memory: organisations and people stay put; work moves on kanban. People are not cards. Brevo is mail, not the CRM. The secret key is not on this page.

Open the desk Raw brief Schema JSON

Goals

How to use it

Human

Hit /desk?key= once (cookie follows). Boards at /b/membres and /b/subventions. Import Brevo JSON at /import.

REST

Authorization: Bearer then /api/v1. Envelope { ok, data, error }. Search, then get, then one write. Schema is public.

MCP

POST /mcp JSON-RPC tools/list / tools/call. Send X-Actor: grok-…. No SQL tool, no delete tool.

Boards in code

Columns and transitions are src/boards.ts. They are not D1 rows. A new workflow is a new BoardDef.

membres

Membres

Faire entrer un magasin, un producteur ou une institution dans le regroupement — ou le garder.

prospectcontactévisitemembreperdu

Open board →

subventions

Subventions

Un dossier = une carte. Le magasin reste dans l’annuaire. Ne pas fusionner avec le pipeline membres.

idéeéligibilitépiècesrédigédéposésuiviclos

Open board →

How to build on it

  1. Read /llms.txt and /api/v1/schema.
  2. Reuse. Directory tables already exist. Do not add deals or dossiers.
  3. Extend: new object in src/boards.ts, push onto BOARDS, ship.
  4. Grow only if a noun is missing (org kind, person field) — that needs a D1 migration.
  5. Lock the board config. Ship with npm run deploy when a human asks.

Auth, without the secret

Public: this page, /llms.txt, /mission.json, /api/v1/schema, /health, GET /mcp (tool shapes only).

Keyed: desk HTML, live data, all writes, POST /mcp. Header Authorization: Bearer, or X-Admin-Key, or ?key= (sets cookie crm_key). Production: Wrangler secret ADMIN_KEY. Never commit it, never echo it, never put it in this brief.

Do not

Full spec is the plain text at /llms.txt. Same bytes as src/brief.ts.