{
  "generated_at": "2026-04-10T10:31:25.519Z",
  "system": {
    "id": "topolo-crm",
    "name": "TopoloCRM",
    "slug": "topolo-crm",
    "kind": "application",
    "summary": "CRM workflows, records, and SDR inbox/control-plane services exposed through the platform auth layer.",
    "aliases": [],
    "lifecycle": "active",
    "last_verified": "2026-04-07",
    "owners": [
      "crm"
    ],
    "repo_paths": [
      "PlatformApplications/TopoloCRM"
    ],
    "service_ids": [
      "srv_iCwM4jGXcwlj"
    ],
    "visibility": "public",
    "openapi": {
      "path": "PlatformApplications/TopoloCRM/packages/backend/openapi.yaml",
      "format": "yaml"
    },
    "primary_hosts": [
      "https://crm.topolo.app"
    ],
    "doc_paths": [
      "applications/crm",
      "internal/apps/crm"
    ],
    "dependencies": [
      "topolo-auth",
      "topolo-one"
    ],
    "public_hub_url": "/systems/topolo-crm",
    "internal_hub_url": null,
    "application_api_url": "/reference/apps/topolo-crm",
    "generated_openapi_url": "/reference/generated/topolo-crm",
    "machine_urls": {
      "system": "/machine/systems/topolo-crm.json",
      "application": "/machine/applications/topolo-crm.json"
    }
  },
  "docs": {
    "public": [
      {
        "id": "applications/crm.mdx",
        "title": "TopoloCRM",
        "summary": "Public overview of the CRM service, pipeline surface, SDR inbox control plane, and developer-key access model.",
        "audience": "public",
        "tags": [
          "crm",
          "sales",
          "pipelines"
        ],
        "url": "/applications/crm.mdx",
        "last_verified": "2026-04-07"
      }
    ],
    "internal": [],
    "runbooks": []
  },
  "authority": {
    "owners": [
      "crm"
    ],
    "repo_paths": [
      "PlatformApplications/TopoloCRM"
    ],
    "service_ids": [
      "srv_iCwM4jGXcwlj"
    ],
    "dependencies": [
      "topolo-auth",
      "topolo-one"
    ],
    "aliases": []
  },
  "interfaces": {
    "contract_type": "openapi",
    "contract_source": "PlatformApplications/TopoloCRM/packages/backend/openapi.yaml",
    "contract_source_exists": true,
    "openapi": {
      "title": "TopoloCRM API",
      "version": "1.0.0",
      "description": "A comprehensive Customer Relationship Management (CRM) API built on Cloudflare Workers.\n\nTopoloCRM provides full CRUD operations for contact management, sales pipeline tracking,\nnotes, file attachments, and data import/export capabilities.\n\n## Features\n- **Contact Management**: Full-text search, pagination, CRUD operations\n- **Sales Pipeline**: Kanban-style pipeline with drag-and-drop stage management\n- **Notes**: Rich note-taking with author tracking\n- **Attachments**: File upload/download with R2 storage\n- **Import/Export**: CSV data import and export\n- **Full-text Search**: FTS5-powered contact search\n\n## Authentication\nCurrently, authentication is handled through environment-based user context.\nJWT-based authentication will be implemented in future versions.\n\n## Rate Limiting\nAll endpoints are subject to rate limiting based on IP address.\nLimits are enforced using Cloudflare KV storage.\n",
      "servers": [
        {
          "url": "http://localhost:8787",
          "description": "Local development server"
        },
        {
          "url": "https://your-worker.your-subdomain.workers.dev",
          "description": "Production Cloudflare Worker"
        }
      ],
      "tags": [
        {
          "name": "system",
          "description": "System health and metadata"
        },
        {
          "name": "contacts",
          "description": "Contact management operations"
        },
        {
          "name": "notes",
          "description": "Contact notes and interactions"
        },
        {
          "name": "attachments",
          "description": "File upload and management"
        },
        {
          "name": "pipeline",
          "description": "Sales pipeline and stage management"
        },
        {
          "name": "import-export",
          "description": "Data import and export operations"
        }
      ],
      "securitySchemes": [],
      "defaultSecurity": [],
      "operations": [
        {
          "method": "GET",
          "path": "/health",
          "summary": "Health check",
          "description": "Returns API health status and timestamp",
          "tags": [
            "system"
          ],
          "security": [],
          "requestContentTypes": [],
          "responseCodes": [
            "200"
          ]
        },
        {
          "method": "GET",
          "path": "/api",
          "summary": "API information",
          "description": "Returns API metadata and available endpoints",
          "tags": [
            "system"
          ],
          "security": [],
          "requestContentTypes": [],
          "responseCodes": [
            "200"
          ]
        },
        {
          "method": "GET",
          "path": "/api/contacts",
          "summary": "List contacts",
          "description": "Retrieve a paginated list of contacts with optional full-text search.\nSupports advanced search using FTS5 for names, emails, companies, and tags.\n",
          "tags": [
            "contacts"
          ],
          "security": [],
          "requestContentTypes": [],
          "responseCodes": [
            "200",
            "500"
          ]
        },
        {
          "method": "POST",
          "path": "/api/contacts",
          "summary": "Create contact",
          "description": "Create a new contact with provided information",
          "tags": [
            "contacts"
          ],
          "security": [],
          "requestContentTypes": [
            "application/json"
          ],
          "responseCodes": [
            "201",
            "400",
            "500"
          ]
        },
        {
          "method": "GET",
          "path": "/api/contacts/{id}",
          "summary": "Get contact",
          "description": "Retrieve a specific contact by ID",
          "tags": [
            "contacts"
          ],
          "security": [],
          "requestContentTypes": [],
          "responseCodes": [
            "200",
            "404",
            "500"
          ]
        },
        {
          "method": "PUT",
          "path": "/api/contacts/{id}",
          "summary": "Update contact",
          "description": "Update an existing contact's information",
          "tags": [
            "contacts"
          ],
          "security": [],
          "requestContentTypes": [
            "application/json"
          ],
          "responseCodes": [
            "200",
            "400",
            "404",
            "500"
          ]
        },
        {
          "method": "DELETE",
          "path": "/api/contacts/{id}",
          "summary": "Delete contact",
          "description": "Soft delete a contact (sets deleted flag)",
          "tags": [
            "contacts"
          ],
          "security": [],
          "requestContentTypes": [],
          "responseCodes": [
            "200",
            "404",
            "500"
          ]
        },
        {
          "method": "GET",
          "path": "/api/contacts/{id}/notes",
          "summary": "List contact notes",
          "description": "Get paginated list of notes for a specific contact",
          "tags": [
            "notes"
          ],
          "security": [],
          "requestContentTypes": [],
          "responseCodes": [
            "200",
            "404",
            "500"
          ]
        },
        {
          "method": "POST",
          "path": "/api/contacts/{id}/notes",
          "summary": "Create note",
          "description": "Add a new note to a contact",
          "tags": [
            "notes"
          ],
          "security": [],
          "requestContentTypes": [
            "application/json"
          ],
          "responseCodes": [
            "201",
            "400",
            "404",
            "500"
          ]
        },
        {
          "method": "GET",
          "path": "/api/contacts/{contactId}/notes/{noteId}",
          "summary": "Get specific note",
          "description": "Retrieve a specific note by ID",
          "tags": [
            "notes"
          ],
          "security": [],
          "requestContentTypes": [],
          "responseCodes": [
            "200",
            "404",
            "500"
          ]
        },
        {
          "method": "PUT",
          "path": "/api/contacts/{contactId}/notes/{noteId}",
          "summary": "Update note",
          "description": "Update an existing note",
          "tags": [
            "notes"
          ],
          "security": [],
          "requestContentTypes": [
            "application/json"
          ],
          "responseCodes": [
            "200",
            "400",
            "404",
            "500"
          ]
        },
        {
          "method": "DELETE",
          "path": "/api/contacts/{contactId}/notes/{noteId}",
          "summary": "Delete note",
          "description": "Delete a note permanently",
          "tags": [
            "notes"
          ],
          "security": [],
          "requestContentTypes": [],
          "responseCodes": [
            "200",
            "404",
            "500"
          ]
        },
        {
          "method": "GET",
          "path": "/api/contacts/{id}/attachments",
          "summary": "List contact attachments",
          "description": "Get all attachments for a specific contact",
          "tags": [
            "attachments"
          ],
          "security": [],
          "requestContentTypes": [],
          "responseCodes": [
            "200",
            "404",
            "500"
          ]
        },
        {
          "method": "POST",
          "path": "/api/contacts/{id}/attachments",
          "summary": "Upload attachment",
          "description": "Upload a file attachment for a contact",
          "tags": [
            "attachments"
          ],
          "security": [],
          "requestContentTypes": [
            "multipart/form-data"
          ],
          "responseCodes": [
            "201",
            "400",
            "404",
            "413",
            "500"
          ]
        },
        {
          "method": "GET",
          "path": "/api/attachments/{id}",
          "summary": "Download attachment",
          "description": "Download an attachment file",
          "tags": [
            "attachments"
          ],
          "security": [],
          "requestContentTypes": [],
          "responseCodes": [
            "200",
            "404",
            "500"
          ]
        },
        {
          "method": "DELETE",
          "path": "/api/attachments/{id}",
          "summary": "Delete attachment",
          "description": "Delete an attachment permanently",
          "tags": [
            "attachments"
          ],
          "security": [],
          "requestContentTypes": [],
          "responseCodes": [
            "200",
            "404",
            "500"
          ]
        },
        {
          "method": "GET",
          "path": "/api/pipeline",
          "summary": "List pipelines",
          "description": "Get all available sales pipelines",
          "tags": [
            "pipeline"
          ],
          "security": [],
          "requestContentTypes": [],
          "responseCodes": [
            "200",
            "500"
          ]
        },
        {
          "method": "GET",
          "path": "/api/pipeline/{pipelineId}",
          "summary": "Get pipeline details",
          "description": "Get detailed information about a specific pipeline including stages",
          "tags": [
            "pipeline"
          ],
          "security": [],
          "requestContentTypes": [],
          "responseCodes": [
            "200",
            "404",
            "500"
          ]
        },
        {
          "method": "GET",
          "path": "/api/pipeline/{pipelineId}/board",
          "summary": "Get pipeline board",
          "description": "Get kanban board view with contacts grouped by pipeline stages",
          "tags": [
            "pipeline"
          ],
          "security": [],
          "requestContentTypes": [],
          "responseCodes": [
            "200",
            "404",
            "500"
          ]
        },
        {
          "method": "PUT",
          "path": "/api/pipeline/{contactId}/move",
          "summary": "Move contact to stage",
          "description": "Move a contact to a different pipeline stage",
          "tags": [
            "pipeline"
          ],
          "security": [],
          "requestContentTypes": [
            "application/json"
          ],
          "responseCodes": [
            "200",
            "400",
            "404",
            "500"
          ]
        },
        {
          "method": "GET",
          "path": "/api/pipeline/{contactId}/history",
          "summary": "Get contact pipeline history",
          "description": "Get the stage movement history for a contact",
          "tags": [
            "pipeline"
          ],
          "security": [],
          "requestContentTypes": [],
          "responseCodes": [
            "200",
            "404",
            "500"
          ]
        },
        {
          "method": "POST",
          "path": "/api/contacts/import",
          "summary": "Import contacts",
          "description": "Import contacts from CSV file with field mapping",
          "tags": [
            "import-export"
          ],
          "security": [],
          "requestContentTypes": [
            "multipart/form-data"
          ],
          "responseCodes": [
            "200",
            "400",
            "500"
          ]
        },
        {
          "method": "GET",
          "path": "/api/contacts/export",
          "summary": "Export contacts",
          "description": "Export contacts to CSV format",
          "tags": [
            "import-export"
          ],
          "security": [],
          "requestContentTypes": [],
          "responseCodes": [
            "200",
            "500"
          ]
        }
      ]
    },
    "readme": {
      "path": "PlatformApplications/TopoloCRM/README.md",
      "intro": [
        "Canonical documentation for TopoloCRM lives in `PlatformApplications/TopoloDocs`.",
        "Use this repository for implementation only. Local product and operational docs have been retired in favor of the docs application."
      ],
      "headings": [
        "TopoloCRM"
      ],
      "routeHighlights": [],
      "commandHighlights": []
    }
  },
  "auth": {
    "depends_on_topolo_auth": true,
    "api_key_scopes": [
      {
        "name": "contacts.read",
        "description": "View CRM contacts",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "name": "contacts.write",
        "description": "Manage CRM contacts",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "name": "companies.read",
        "description": "View CRM companies",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "name": "companies.write",
        "description": "Manage CRM companies",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "name": "deals.read",
        "description": "View CRM deals",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "name": "deals.write",
        "description": "Manage CRM deals",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "name": "notes.read",
        "description": "View CRM notes",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "name": "notes.write",
        "description": "Manage CRM notes",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "name": "attachments.read",
        "description": "View CRM attachments",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "name": "attachments.write",
        "description": "Manage CRM attachments",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "name": "pipeline.read",
        "description": "View pipeline configuration",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "name": "pipeline.write",
        "description": "Manage pipeline configuration",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "name": "tasks.write",
        "description": "Manage CRM tasks",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "name": "properties.write",
        "description": "Manage property records",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "name": "listings.write",
        "description": "Manage property listings",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "name": "showings.write",
        "description": "Manage property showings",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "name": "offers.write",
        "description": "Manage property offers",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "name": "transactions.write",
        "description": "Manage CRM transactions",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "name": "documents.write",
        "description": "Manage CRM documents",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "name": "commissions.write",
        "description": "Manage CRM commissions",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "name": "portal_connections.write",
        "description": "Manage portal connections",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "name": "portal_sync.write",
        "description": "Manage portal sync jobs",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "name": "portal_leads.write",
        "description": "Manage portal lead routing",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "name": "settings.write",
        "description": "Manage CRM settings",
        "resourcePattern": null,
        "kind": "api_key_scope"
      },
      {
        "name": "admin.keys",
        "description": "Manage CRM developer keys",
        "resourcePattern": null,
        "kind": "api_key_scope"
      }
    ],
    "service_permissions": [
      {
        "name": "contacts:read",
        "description": "View customer contacts and profiles",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "name": "contacts:write",
        "description": "Create and edit customer contacts",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "name": "deals:read",
        "description": "View sales deals and opportunities",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "name": "deals:write",
        "description": "Manage sales deals and pipeline",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "name": "activities:read",
        "description": "View customer activities and history",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "name": "activities:write",
        "description": "Log customer activities and notes",
        "resourcePattern": null,
        "kind": "permission"
      },
      {
        "name": "reports:read",
        "description": "View CRM reports and analytics",
        "resourcePattern": null,
        "kind": "permission"
      }
    ]
  },
  "runtime": {
    "primary_hosts": [
      "https://crm.topolo.app"
    ],
    "repo_entries": [
      "PlatformApplications/TopoloCRM/README.md",
      "PlatformApplications/TopoloCRM/all-contacts.csv",
      "PlatformApplications/TopoloCRM/app/",
      "PlatformApplications/TopoloCRM/backend.log",
      "PlatformApplications/TopoloCRM/docs/",
      "PlatformApplications/TopoloCRM/frontend.log",
      "PlatformApplications/TopoloCRM/infra/",
      "PlatformApplications/TopoloCRM/package-lock.json",
      "PlatformApplications/TopoloCRM/package.json",
      "PlatformApplications/TopoloCRM/packages/",
      "PlatformApplications/TopoloCRM/pnpm-lock.yaml",
      "PlatformApplications/TopoloCRM/postman-collection.json",
      "PlatformApplications/TopoloCRM/scripts/",
      "PlatformApplications/TopoloCRM/topolo.cloudcontrol.json"
    ],
    "wrangler_surfaces": [
      {
        "path": "PlatformApplications/TopoloCRM/app/wrangler.toml",
        "observabilityEnabled": false,
        "environments": [],
        "routes": [],
        "vars": [],
        "bindings": [],
        "cronTriggers": [],
        "workerName": "topolo-crm-frontend",
        "compatibilityDate": "2026-03-31"
      },
      {
        "path": "PlatformApplications/TopoloCRM/packages/backend/wrangler.toml",
        "observabilityEnabled": true,
        "environments": [
          "dev",
          "stg",
          "prod"
        ],
        "routes": [],
        "vars": [
          "API_KEY_HASH_ITERATIONS",
          "API_KEY_PREFIX",
          "ENVIRONMENT",
          "NODE_ENV",
          "SALT_ROUNDS",
          "SKIP_AUTH",
          "account_id"
        ],
        "bindings": [
          {
            "kind": "d1",
            "binding": "CRM_DB",
            "sourcePath": "PlatformApplications/TopoloCRM/packages/backend/wrangler.toml",
            "target": "00000000-0000-0000-0000-000000000000"
          },
          {
            "kind": "d1",
            "binding": "CRM_DB",
            "environment": "stg",
            "sourcePath": "PlatformApplications/TopoloCRM/packages/backend/wrangler.toml",
            "target": "cf93b0b6-8a56-4516-a0c7-4e2d8dee4157"
          },
          {
            "kind": "r2",
            "binding": "crm_attachments",
            "environment": "stg",
            "sourcePath": "PlatformApplications/TopoloCRM/packages/backend/wrangler.toml",
            "target": "edge-crm-attachments-staging"
          },
          {
            "kind": "d1",
            "binding": "CRM_DB",
            "environment": "prod",
            "sourcePath": "PlatformApplications/TopoloCRM/packages/backend/wrangler.toml",
            "target": "77e9aeb0-fb0d-48a7-adb1-e0ce6700ab89"
          },
          {
            "kind": "kv",
            "binding": "CRM_KV",
            "environment": "prod",
            "sourcePath": "PlatformApplications/TopoloCRM/packages/backend/wrangler.toml",
            "target": "2bf87302ccb04e43bda3c946a1d7f15b"
          },
          {
            "kind": "r2",
            "binding": "crm_attachments",
            "environment": "prod",
            "sourcePath": "PlatformApplications/TopoloCRM/packages/backend/wrangler.toml",
            "target": "edge-crm-attachments-production"
          }
        ],
        "cronTriggers": [],
        "workerName": "edge-crm",
        "main": "index.ts",
        "compatibilityDate": "2025-06-20",
        "assetsDirectory": "./public"
      }
    ],
    "packages": [
      {
        "path": "PlatformApplications/TopoloCRM/app/package.json",
        "name": "app",
        "scripts": [
          "dev",
          "build",
          "lint",
          "lint:fix",
          "format",
          "format:check",
          "typecheck",
          "test",
          "test:ui",
          "test:run",
          "test:coverage",
          "preview",
          "deploy:stg",
          "deploy:prod",
          "prepare"
        ],
        "scriptCommands": [
          {
            "name": "dev",
            "command": "vite"
          },
          {
            "name": "build",
            "command": "vite build"
          },
          {
            "name": "lint",
            "command": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 10000"
          },
          {
            "name": "lint:fix",
            "command": "eslint . --ext ts,tsx --fix"
          },
          {
            "name": "format",
            "command": "prettier --write \"src/**/*.{ts,tsx,json,css,md}\""
          },
          {
            "name": "format:check",
            "command": "prettier --check \"src/**/*.{ts,tsx,json,css,md}\""
          },
          {
            "name": "typecheck",
            "command": "tsc --noEmit"
          },
          {
            "name": "test",
            "command": "vitest"
          },
          {
            "name": "test:ui",
            "command": "vitest --ui"
          },
          {
            "name": "test:run",
            "command": "vitest run"
          },
          {
            "name": "test:coverage",
            "command": "vitest run --coverage"
          },
          {
            "name": "preview",
            "command": "vite preview"
          },
          {
            "name": "deploy:stg",
            "command": "VITE_API_URL=https://edge-crm-stg.topolo.workers.dev/api VITE_APP_NAME=NodoCRM VITE_APP_VERSION=1.0.0 npm run build && npx wrangler pages deploy dist --project-name=topolo-crm-frontend-staging"
          },
          {
            "name": "deploy:prod",
            "command": "VITE_API_URL=https://crm-api.topolo.app/api VITE_APP_NAME=NodoCRM VITE_APP_VERSION=1.0.0 npm run build && npx wrangler pages deploy dist --project-name=topolo-crm-frontend"
          },
          {
            "name": "prepare",
            "command": "husky"
          }
        ]
      },
      {
        "path": "PlatformApplications/TopoloCRM/package.json",
        "name": "nodo-crm",
        "description": "A lightweight, production-ready CRM built entirely on Cloudflare's edge platform",
        "scripts": [
          "dev",
          "dev:app",
          "dev:all",
          "dev:full",
          "dev:stg",
          "dev:shell",
          "dev:backend",
          "dev:frontend",
          "build",
          "build:app",
          "build:all",
          "deploy:stg",
          "deploy:prod",
          "deploy:app:stg",
          "deploy:app:prod",
          "deploy:all:stg"
        ],
        "scriptCommands": [
          {
            "name": "dev",
            "command": "npm run dev --workspace=packages/backend"
          },
          {
            "name": "dev:app",
            "command": "npm run dev --workspace=app"
          },
          {
            "name": "dev:all",
            "command": "concurrently \"npm run dev\" \"npm run dev:app\""
          },
          {
            "name": "dev:full",
            "command": "node scripts/dev.js"
          },
          {
            "name": "dev:stg",
            "command": "node scripts/dev.js --db stg"
          },
          {
            "name": "dev:shell",
            "command": "bash scripts/dev.sh"
          },
          {
            "name": "dev:backend",
            "command": "node scripts/dev.js --backend-only"
          },
          {
            "name": "dev:frontend",
            "command": "node scripts/dev.js --frontend-only"
          },
          {
            "name": "build",
            "command": "npm run build --workspace=packages/backend"
          },
          {
            "name": "build:app",
            "command": "npm run build --workspace=app"
          },
          {
            "name": "build:all",
            "command": "npm run build && npm run build:app"
          },
          {
            "name": "deploy:stg",
            "command": "npm run deploy:stg --workspace=packages/backend"
          },
          {
            "name": "deploy:prod",
            "command": "npm run deploy:prod --workspace=packages/backend"
          },
          {
            "name": "deploy:app:stg",
            "command": "npm run deploy:stg --workspace=app"
          },
          {
            "name": "deploy:app:prod",
            "command": "npm run deploy:prod --workspace=app"
          },
          {
            "name": "deploy:all:stg",
            "command": "npm run deploy:stg && npm run deploy:app:stg"
          }
        ]
      },
      {
        "path": "PlatformApplications/TopoloCRM/packages/backend/package.json",
        "name": "crm",
        "scripts": [
          "dev",
          "build",
          "build:deploy",
          "deploy:dry-run",
          "deploy:stg",
          "deploy:prod",
          "start",
          "test",
          "test:coverage",
          "cf-typegen",
          "seed",
          "seed:justcook",
          "lint",
          "lint:check",
          "lint:fix",
          "typecheck"
        ],
        "scriptCommands": [
          {
            "name": "dev",
            "command": "wrangler dev"
          },
          {
            "name": "build",
            "command": "tsc --noEmit && echo 'Build validation successful'"
          },
          {
            "name": "build:deploy",
            "command": "wrangler deploy --dry-run"
          },
          {
            "name": "deploy:dry-run",
            "command": "wrangler deploy --dry-run --outdir .wrangler/build"
          },
          {
            "name": "deploy:stg",
            "command": "wrangler deploy --env stg"
          },
          {
            "name": "deploy:prod",
            "command": "wrangler deploy --env prod"
          },
          {
            "name": "start",
            "command": "wrangler dev"
          },
          {
            "name": "test",
            "command": "vitest"
          },
          {
            "name": "test:coverage",
            "command": "vitest --coverage"
          },
          {
            "name": "cf-typegen",
            "command": "npx wrangler types"
          },
          {
            "name": "seed",
            "command": "wrangler d1 execute CRM_DB --local --file=scripts/seed-simple.sql"
          },
          {
            "name": "seed:justcook",
            "command": "echo 'JustCook seed data already created manually'"
          },
          {
            "name": "lint",
            "command": "eslint . --ext .ts,.js --config .eslint.cjs --ignore-path .gitignore"
          },
          {
            "name": "lint:check",
            "command": "eslint . --ext .ts,.js --config .eslint.cjs --ignore-path .gitignore"
          },
          {
            "name": "lint:fix",
            "command": "eslint . --ext .ts,.js --fix --config .eslint.cjs --ignore-path .gitignore"
          },
          {
            "name": "typecheck",
            "command": "tsc --noEmit"
          }
        ]
      }
    ]
  },
  "data": {
    "env_vars": [
      "API_KEY_HASH_ITERATIONS",
      "API_KEY_PREFIX",
      "ENVIRONMENT",
      "NODE_ENV",
      "SALT_ROUNDS",
      "SKIP_AUTH",
      "account_id"
    ],
    "bindings": [
      {
        "kind": "d1",
        "binding": "CRM_DB",
        "sourcePath": "PlatformApplications/TopoloCRM/packages/backend/wrangler.toml",
        "target": "00000000-0000-0000-0000-000000000000"
      },
      {
        "kind": "d1",
        "binding": "CRM_DB",
        "environment": "stg",
        "sourcePath": "PlatformApplications/TopoloCRM/packages/backend/wrangler.toml",
        "target": "cf93b0b6-8a56-4516-a0c7-4e2d8dee4157"
      },
      {
        "kind": "r2",
        "binding": "crm_attachments",
        "environment": "stg",
        "sourcePath": "PlatformApplications/TopoloCRM/packages/backend/wrangler.toml",
        "target": "edge-crm-attachments-staging"
      },
      {
        "kind": "d1",
        "binding": "CRM_DB",
        "environment": "prod",
        "sourcePath": "PlatformApplications/TopoloCRM/packages/backend/wrangler.toml",
        "target": "77e9aeb0-fb0d-48a7-adb1-e0ce6700ab89"
      },
      {
        "kind": "kv",
        "binding": "CRM_KV",
        "environment": "prod",
        "sourcePath": "PlatformApplications/TopoloCRM/packages/backend/wrangler.toml",
        "target": "2bf87302ccb04e43bda3c946a1d7f15b"
      },
      {
        "kind": "r2",
        "binding": "crm_attachments",
        "environment": "prod",
        "sourcePath": "PlatformApplications/TopoloCRM/packages/backend/wrangler.toml",
        "target": "edge-crm-attachments-production"
      }
    ],
    "queue_bindings": [],
    "storage_kinds": [
      "d1",
      "r2",
      "kv"
    ],
    "workflow_signals": []
  },
  "deployment": {
    "commands": [
      {
        "name": "build",
        "command": "PlatformApplications/TopoloCRM/app/package.json :: vite build"
      },
      {
        "name": "preview",
        "command": "PlatformApplications/TopoloCRM/app/package.json :: vite preview"
      },
      {
        "name": "deploy:stg",
        "command": "PlatformApplications/TopoloCRM/app/package.json :: VITE_API_URL=https://edge-crm-stg.topolo.workers.dev/api VITE_APP_NAME=NodoCRM VITE_APP_VERSION=1.0.0 npm run build && npx wrangler pages deploy dist --project-name=topolo-crm-frontend-staging"
      },
      {
        "name": "deploy:prod",
        "command": "PlatformApplications/TopoloCRM/app/package.json :: VITE_API_URL=https://crm-api.topolo.app/api VITE_APP_NAME=NodoCRM VITE_APP_VERSION=1.0.0 npm run build && npx wrangler pages deploy dist --project-name=topolo-crm-frontend"
      },
      {
        "name": "build",
        "command": "PlatformApplications/TopoloCRM/package.json :: npm run build --workspace=packages/backend"
      },
      {
        "name": "build:app",
        "command": "PlatformApplications/TopoloCRM/package.json :: npm run build --workspace=app"
      },
      {
        "name": "build:all",
        "command": "PlatformApplications/TopoloCRM/package.json :: npm run build && npm run build:app"
      },
      {
        "name": "deploy:stg",
        "command": "PlatformApplications/TopoloCRM/package.json :: npm run deploy:stg --workspace=packages/backend"
      },
      {
        "name": "deploy:prod",
        "command": "PlatformApplications/TopoloCRM/package.json :: npm run deploy:prod --workspace=packages/backend"
      },
      {
        "name": "deploy:app:stg",
        "command": "PlatformApplications/TopoloCRM/package.json :: npm run deploy:stg --workspace=app"
      },
      {
        "name": "deploy:app:prod",
        "command": "PlatformApplications/TopoloCRM/package.json :: npm run deploy:prod --workspace=app"
      },
      {
        "name": "deploy:all:stg",
        "command": "PlatformApplications/TopoloCRM/package.json :: npm run deploy:stg && npm run deploy:app:stg"
      },
      {
        "name": "build",
        "command": "PlatformApplications/TopoloCRM/packages/backend/package.json :: tsc --noEmit && echo 'Build validation successful'"
      },
      {
        "name": "build:deploy",
        "command": "PlatformApplications/TopoloCRM/packages/backend/package.json :: wrangler deploy --dry-run"
      },
      {
        "name": "deploy:dry-run",
        "command": "PlatformApplications/TopoloCRM/packages/backend/package.json :: wrangler deploy --dry-run --outdir .wrangler/build"
      },
      {
        "name": "deploy:stg",
        "command": "PlatformApplications/TopoloCRM/packages/backend/package.json :: wrangler deploy --env stg"
      }
    ],
    "routes": [],
    "environments": [
      "dev",
      "stg",
      "prod"
    ],
    "assets_directories": [
      "./public"
    ],
    "observability_enabled": true
  },
  "debugging": {
    "failure_modes": [],
    "entrypoints": [
      "PlatformApplications/TopoloCRM/app/wrangler.toml",
      "PlatformApplications/TopoloCRM/packages/backend/wrangler.toml",
      "PlatformApplications/TopoloCRM/packages/backend/openapi.yaml",
      "PlatformApplications/TopoloCRM/README.md",
      "PlatformApplications/TopoloCRM/app/package.json",
      "PlatformApplications/TopoloCRM/package.json",
      "PlatformApplications/TopoloCRM/packages/backend/package.json"
    ]
  }
}