{
  "id": "coaster",
  "name": "Coaster",
  "version": "0.1.2",
  "maturity": "first-release-local",
  "category": "expenses",
  "spine": {
    "id": "claim-to-reimbursement",
    "record": "Claim revision \u2192 Decision \u2192 Reimbursement batch \u2192 Accounting CSV"
  },
  "description": "Employee expense claims with receipt evidence, manager approval, duplicate-safe reimbursement batches, an accounting CSV and an Expensify move-in kit, on the owner's own Cloudflare account.",
  "capabilities": [
    {
      "id": "business-people",
      "clauses": [
        "COA-001"
      ]
    },
    {
      "id": "claims-receipts",
      "clauses": [
        "COA-002",
        "COA-003"
      ]
    },
    {
      "id": "policy-duplicates",
      "clauses": [
        "COA-004",
        "COA-005"
      ]
    },
    {
      "id": "approval-history",
      "clauses": [
        "COA-006",
        "COA-007"
      ]
    },
    {
      "id": "role-access",
      "clauses": [
        "COA-008"
      ]
    },
    {
      "id": "reimbursement-batches",
      "clauses": [
        "COA-009"
      ]
    },
    {
      "id": "agent-preparation",
      "clauses": [
        "COA-010"
      ]
    },
    {
      "id": "move-in-restore",
      "clauses": [
        "COA-011",
        "COA-012"
      ]
    },
    {
      "id": "native-runtime",
      "clauses": [
        "COA-013"
      ]
    }
  ],
  "nonGoals": [
    "Card issuing or card feeds",
    "Moving money or payment files",
    "Payroll and travel booking",
    "OCR or model receipt reading",
    "Accounting transaction posting",
    "Tax determination"
  ],
  "externals": [
    {
      "id": "cloudflare",
      "required": true,
      "why": "Worker hosting, D1 business records and R2 receipt originals in the owner\u2019s Cloudflare account",
      "data": [
        "HTTP requests",
        "Business records and receipt provenance in D1; original receipt-inbox bytes and exact inbound source mail in R2"
      ],
      "adapters": []
    },
    {
      "id": "mail-provider",
      "required": false,
      "requiredWhen": "MAIL_PROVIDER selects rer, resend, sendgrid or cloudflare",
      "why": "A hosted Coaster emails sign-in links, invitations, delegate-grant notices (ADMIN-005), questions about a claim (APPROVE-006), reminders and escalations (FOLLOWUP-001, FOLLOWUP-002), budget alerts (REPORT-004), bank-change notices (PAY-002) and scheduled reports (REPORT-002) through the Managed mail relay or the owner's own Resend, SendGrid or Cloudflare Email account; with no provider set nothing is sent, and Coaster on your own computer keeps mail in a local outbox.",
      "data": [
        "Private installation mail credential or direct provider API key, sender and recipient email addresses",
        "Message subject and text and HTML body: requested one-time receipt alias proof codes, single-use sign-in and invitation links, the delegate's name and access level, the question asked with the claim number and title, a scheduled report's name, period and sign-in link (REPORT-002), a reminder naming the claim number and title, the one thing to do and a link to it (FOLLOWUP-001), an escalation of the same naming who owes it (FOLLOWUP-002), a budget alert naming the budget, person, percentage reached and period (REPORT-004), or a bank-change notice to the person's own address naming the last four digits of the old and new account and when payments resume (PAY-002)",
        "Only on a budget the owner opts in: that budget's actual and amount in its alert, to the budget's owner and finance",
        "Only on a report schedule the owner opts in: that report's figures as a CSV attachment, to finance, auditors or the owner",
        "Delivery ID"
      ],
      "adapters": []
    },
    {
      "id": "identity-provider",
      "required": false,
      "requiredWhen": "IDENTITY_PROVIDER names an Auth installation",
      "why": "Optional sign-in through the owner's own Auth installation (OpenID Connect); a blank answer keeps email-link sign-in, and nothing is sent until the owner links one.",
      "data": [
        "Link handshake: Auth reads Coaster's public document (origin, name, callback, sector ID) and public signing key; Coaster redeems the one-use link code with its origin, callback, interface and a signed assertion",
        "OpenID Connect: metadata and signing-key reads, the browser's authorization request, and code redemption with the PKCE verifier and a signed client assertion; Auth returns the signed-in person's email and name",
        "No claim, expense, receipt, comment or member data is sent to Auth"
      ],
      "adapters": []
    },
    {
      "id": "ecb-reference-rates",
      "required": false,
      "requiredWhen": "The owner enables ECB currency conversion and a foreign-currency expense or history import requests conversion",
      "why": "CLAIM-003 downloads public ECB historical reference rates from one fixed HTTPS URL; optional and off by default. A person can instead supply an explicit rate entered by hand without any provider request. ECB reference rates are not card rates.",
      "data": [
        "GET https://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist.xml without a query, body, cookies, authorization or redirects",
        "No expense amount, currency, date, receipt, identity, claim or imported source data is sent; ECB receives only ordinary connection metadata"
      ],
      "adapters": []
    },
    {
      "id": "quickbooks-accounting-choices",
      "required": false,
      "requiredWhen": "A person allowed by ADMIN-001 explicitly connects their company through Intuit consent",
      "why": "Read accounting choices on the daily schedule; transaction posting is not implemented. Disconnect stops future requests.",
      "data": [
        "The Intuit app client id, callback, accounting OAuth scope and session-bound random state in the authorization request",
        "Authorization code, app credentials and rotating tokens exchanged with Intuit; tokens sealed in D1 and excluded from archives",
        "Authenticated metadata GET queries for accounts, classes, locations (QuickBooks Department), customers/projects and vendors; no expense, receipt, employee or payment payload is sent"
      ],
      "adapters": []
    },
    {
      "id": "public-api-webhooks",
      "required": false,
      "requiredWhen": "The owner explicitly consents to an exact public HTTPS IPv4 destination and selected event types",
      "why": "Signed notifications of native state changes, with persistent delivery attempts. No outbound notification without an owner-consented active subscription.",
      "data": [
        "HMAC-signed event id, event type, time, resource kind/id and state only",
        "No names, email addresses, amounts, receipt bytes, comments, expense bodies or secrets in event payloads; delivery retains HTTP status, never response bodies"
      ],
      "adapters": []
    },
    {
      "id": "expensify-source-export",
      "required": false,
      "requiredWhen": "The host operator explicitly invokes scripts/expensify/export.mjs with --consent; never from the native importer or a schedule",
      "why": "Read-only MOVE-001 source preparation, conservative explicit-consent default awaiting ct. No report updates, export marking or email actions.",
      "data": [
        "Partner user ID and secret from the private process environment, selected report/policy IDs and the chosen report template sent only to the fixed HTTPS Expensify Integration Server endpoint; redirects refused",
        "The generated CSV filename is sent back for download; returned reports and policy metadata are kept only in a new private local directory; credentials and provider error bodies are never retained or logged"
      ],
      "adapters": []
    },
    {
      "id": "bank-verification-providers",
      "required": false,
      "requiredWhen": "The owner explicitly connects Plaid sandbox or Stripe test mode and an employee adds a bank account",
      "why": "PAY-002 verifies an employee's bank account instantly through Plaid Link or by micro-deposits through Stripe. The person enters bank details with the provider; Coaster keeps only the provider token, sealed, and the last four digits. Disconnect stops new accounts.",
      "data": [
        "The owner's Plaid sandbox client credentials or Stripe test secret key, sent only to the fixed provider hosts and sealed in D1; redirects refused and no credential is ever exported",
        "Plaid: an opaque member identifier in the link token request, then the one-time public token Link returns and the resulting access token; Stripe: an opaque member identifier in a customer description and setup metadata, the setup identifier, and the person's name typed into Stripe.js, which Stripe.js sends from the browser",
        "No routing number, account number, claim, expense, receipt or address is sent by Coaster; the provider returns the last four digits and the bank or account name",
        "A change of bank account mails the notice described under the mail provider to the person's address on record"
      ],
      "adapters": []
    },
    {
      "id": "quickbooks-desktop-connector",
      "required": false,
      "requiredWhen": "An owner, admin or finance person explicitly authorizes the original company file and installs its Web Connector configuration",
      "why": "The scheduled Web Connector reads accounting catalogs and receives queued approved expenses, recorded payments and balanced statement journals. Disconnect stops future sessions.",
      "data": [
        "Generated configuration with installation URL and random connector identity; a one-time password is entered privately into Web Connector and stored only as a hash in Coaster",
        "Accounts, classes, customers, vendors and employees from the connected Desktop company",
        "Consented qbXML responses carry account references, expense dates, amounts and descriptions, employee vendor references, recorded payment references and journal entries; no private receipt original is sent",
        "Password hashes and live tickets are excluded from installation archives; request identities and ordered audit history are retained"
      ],
      "adapters": []
    },
    {
      "id": "plaid-sandbox-connections",
      "required": false,
      "requiredWhen": "The native owner configures the optional sandbox app and a current authorized person explicitly starts or disconnects a connection",
      "why": "FEED-001 sandbox Link and account verification only, at https://sandbox.plaid.com; off by default, with no transaction sync or payment authority.",
      "data": [
        "Installation-sealed app client id and sandbox secret, the transactions product scope, US country and credit-card or company-depository filters, and a random request identifier used as the Plaid client user id",
        "One-use public token exchanged for an installation-sealed item access token; authenticated account metadata retrieval and explicit item removal",
        "No Coaster member email, claim, receipt, expense, bank number or card number is sent. Only provider account identifiers, type and last four are retained; no returned names or balances. Execution custody is excluded from archives."
      ],
      "adapters": []
    }
  ],
  "env": [],
  "deploy": {
    "healthPath": "/health",
    "publicPaths": [
      "/",
      "/health",
      "/signin"
    ],
    "notes": "Native sessions guard /app and every /api/coaster route; agent keys reach only /api/coaster/agent; unknown paths return real 404s; the development outbox is local-only."
  },
  "extensionPoints": {
    "contributions": [],
    "policies": [],
    "events": [],
    "slots": [],
    "adapters": []
  },
  "limits": {
    "status": "unmeasured"
  },
  "accessibility": {
    "level": "WCAG 2.2 AA",
    "status": "target; unaudited"
  },
  "operatingCost": {
    "status": "unmeasured"
  },
  "composition": {
    "base": "base",
    "family": "expenses",
    "edition": "coaster",
    "modules": [
      "job-queue",
      "release",
      "deploy-kit",
      "container",
      "demo-host",
      "integrations",
      "mail",
      "ai",
      "portability",
      "erasure",
      "dependencies",
      "operator-auth",
      "owner-claim",
      "import-kit"
    ]
  },
  "replaces": [
    "Expensify",
    "SAP Concur Expense",
    "Emburse"
  ]
}
