Skip to content

try.hotcrm.ai: zero-friction try lane needs tenant provisioning API #1275

Description

@xuyushun441-sys

Context

The HotCRM v1 launch plan (W7) included a 'try.hotcrm.ai' surface — a
zero-friction lane where a visitor clicks 'Try it' and lands inside a
pre-seeded HotCRM tenant within ~10s, no signup required, expiring after
60 minutes.

We deferred W7 from the launch because the platform does not yet expose
a tenant-provisioning API a CRM app can call to spin one up
programmatically.

What we need from the platform

A signed HTTP endpoint (or kernel method) that:

  1. Creates a fresh tenant with a generated id and a default driver
    (sqlite-memory is fine for the trial lane).
  2. Loads a named seed bundle into it — same shape as our existing
    build artifact (dist/objectstack.json).
  3. Returns a short-lived (≤60 min) session token the caller can
    redirect the visitor into.
  4. Self-evicts when the TTL expires, tearing down the kernel and
    the driver.

Bonus: a webhook tenant.expired so the calling app can show a
'Trial expired, install for real?' page.

Why this can't live in the CRM

  • Kernel creation is a platform-level concern (driver wiring, plugin
    registration, route mounting).
  • The token issuance needs the same trust anchor as the rest of auth,
    and CRM apps shouldn't be minting tokens.
  • TTL eviction needs to be in the kernel manager, not in a peer app.

Acceptance

  • Reference impl in @objectstack/runtime or a dedicated
    @objectstack/service-trial package.
  • HotCRM can call it from a static landing page with no server of its
    own.
  • A CLI command objectstack trial create --seed dist/objectstack.json --ttl 60m for local testing.

Related

  • HotCRM v1 launch plan, todo w7-try-tenant.
  • ADR-0010 (NL→Flow authoring) — same pattern: feature too
    platform-shaped to live in an app.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions