{
  "snapi_template": 1,
  "name": "CRM Lite",
  "description": "A lightweight CRM: companies, contacts linked to companies, and deals on a pipeline board.",
  "root": "$f1",
  "forms": [
    {
      "token": "$f1",
      "name": "CRM",
      "description": "Sales hub — companies, contacts, and the pipeline",
      "icon": "fas fa-address-book",
      "color": "#2551ed",
      "is_public": false,
      "auth_required": false,
      "success_message": "Submitted successfully.",
      "config": {
        "fields": [
          {
            "name": "hub_title",
            "label": "CRM",
            "type": "title"
          },
          {
            "name": "hub_intro",
            "label": "Add companies and contacts, then work deals across the pipeline.",
            "type": "subtitle"
          },
          {
            "name": "add_company",
            "label": "Add company",
            "type": "button",
            "buttonActionType": "navigate",
            "buttonTargetKind": "form",
            "buttonTargetEntityId": "$f2",
            "buttonIcon": "fas fa-building",
            "buttonStyle": "primary"
          },
          {
            "name": "add_contact",
            "label": "Add contact",
            "type": "button",
            "buttonActionType": "navigate",
            "buttonTargetKind": "form",
            "buttonTargetEntityId": "$f3",
            "buttonIcon": "fas fa-user-plus",
            "buttonStyle": "secondary"
          },
          {
            "name": "add_deal",
            "label": "New deal",
            "type": "button",
            "buttonActionType": "navigate",
            "buttonTargetKind": "form",
            "buttonTargetEntityId": "$f4",
            "buttonIcon": "fas fa-handshake",
            "buttonStyle": "secondary"
          },
          {
            "name": "pipeline_link",
            "label": "Pipeline board",
            "type": "link",
            "linkAction": "navigate",
            "linkTargetKind": "board",
            "linkTargetBoardId": "$b1",
            "linkIcon": "fas fa-columns"
          }
        ]
      },
      "persist_records": false
    },
    {
      "token": "$f2",
      "name": "Companies",
      "description": "Organizations you sell to",
      "icon": "fas fa-building",
      "color": "#0ea5e9",
      "is_public": false,
      "auth_required": false,
      "success_message": "Company saved.",
      "config": {
        "fields": [
          {
            "name": "company_name",
            "label": "Company name",
            "type": "text",
            "required": true
          },
          {
            "name": "website",
            "label": "Website",
            "type": "text"
          },
          {
            "name": "industry",
            "label": "Industry",
            "type": "select",
            "options": [
              "Technology",
              "Manufacturing",
              "Retail",
              "Services",
              "Other"
            ]
          },
          {
            "name": "notes",
            "label": "Notes",
            "type": "textarea"
          }
        ]
      }
    },
    {
      "token": "$f3",
      "name": "Contacts",
      "description": "People at your companies",
      "icon": "fas fa-user",
      "color": "#10b981",
      "is_public": false,
      "auth_required": false,
      "success_message": "Contact saved.",
      "config": {
        "fields": [
          {
            "name": "full_name",
            "label": "Full name",
            "type": "text",
            "required": true
          },
          {
            "name": "company",
            "label": "Company",
            "type": "reference",
            "refEntityId": "$f2",
            "internal": true
          },
          {
            "name": "email",
            "label": "Email",
            "type": "email"
          },
          {
            "name": "phone",
            "label": "Phone",
            "type": "text"
          },
          {
            "name": "role",
            "label": "Role / title",
            "type": "text"
          }
        ]
      }
    },
    {
      "token": "$f4",
      "name": "Deals",
      "description": "Opportunities on the pipeline",
      "icon": "fas fa-handshake",
      "color": "#f59e0b",
      "is_public": false,
      "auth_required": false,
      "success_message": "Deal created — it's on the pipeline.",
      "default_board": "$b1",
      "default_column": "$c1",
      "config": {
        "fields": [
          {
            "name": "deal_name",
            "label": "Deal name",
            "type": "text",
            "required": true
          },
          {
            "name": "company",
            "label": "Company",
            "type": "reference",
            "refEntityId": "$f2",
            "internal": true
          },
          {
            "name": "contact",
            "label": "Primary contact",
            "type": "reference",
            "refEntityId": "$f3",
            "internal": true
          },
          {
            "name": "amount",
            "label": "Amount ($)",
            "type": "number"
          },
          {
            "name": "expected_close",
            "label": "Expected close",
            "type": "date"
          },
          {
            "name": "notes",
            "label": "Notes",
            "type": "textarea"
          }
        ]
      }
    }
  ],
  "boards": [
    {
      "token": "$b1",
      "name": "Pipeline",
      "description": "Deals move left to right — new deals land in Lead.",
      "nav_items": [
        {
          "name": "nav_new_deal",
          "label": "New deal",
          "type": "button",
          "buttonActionType": "navigate",
          "buttonTargetKind": "form",
          "buttonTargetEntityId": "$f4",
          "buttonIcon": "fas fa-plus",
          "buttonStyle": "primary"
        }
      ],
      "columns": [
        {
          "token": "$c1",
          "name": "Lead",
          "color": "#0ea5e9",
          "position": 0
        },
        {
          "token": "$c2",
          "name": "Qualified",
          "color": "#f59e0b",
          "position": 1
        },
        {
          "token": "$c3",
          "name": "Proposal",
          "color": "#2551ed",
          "position": 2
        },
        {
          "token": "$c4",
          "name": "Won",
          "color": "#10b981",
          "position": 3
        },
        {
          "token": "$c5",
          "name": "Lost",
          "color": "#64748b",
          "position": 4
        }
      ]
    }
  ],
  "sequences": []
}
