Skip to content

Platform (self-hosting)

The StrideAI platform is the optional service behind plans, StrideAI Models, organization keys, seats, per-person budgets and the Free/Premium/Disabled policies for role packs. Teams that use StrideAI with their own models never need it. Organizations that want to run it themselves, for example for a private deployment on Azure DevOps Server, can: it is a Node 24 service on PostgreSQL 17 with Stripe as the payment adapter.

  • Workspaces and wallets. Monthly or annual plans contribute expiring included-credit lots to one wallet per organization; purchased top-ups never expire and are consumed after included credits. Credits are integer microcredits, not tokens or cash.
  • Reservations and settlement. A bounded amount is reserved before each inference request, the real usage is settled exactly once, with partial refunds, immutable accounting entries, product attribution, concurrency limits and visible reconciliation holds.
  • Entitlements. Paid-through feature entitlements per product (the role packs); a funded wallet alone never unlocks subscription-only features.
  • Payments. Stripe Quotes with clickwrap acceptance, Checkout and Customer Portal, raw-body webhook signature verification, a durable webhook inbox with retry and back-off, idempotent fulfilment, and refund processing.
  • Inference gateway. Text-only OpenAI-compatible chat with SSE streaming and tools, server-side usage settlement, model allow-lists, and upstream credentials that never leave the server.
  • Identity. Verified Azure DevOps app-token sessions (15 minutes) bound to a project, organization keys bound to one Azure DevOps collection, trusted project bindings and memberships, per-project feature and model policy, UTC-month hard caps.
  • Operations. npm run manage -- pending lists queues; npm run manage -- security-status reports old holds, failed webhook events and frozen wallets as JSON for your alerting.

Requires Node 24 and PostgreSQL 17 or newer. Use a dedicated database.

Terminal window
npm ci
export DATABASE_URL='postgresql://USER:PASSWORD@127.0.0.1:5432/strideai_platform'
export PLATFORM_CATALOG_PATH='./catalog.disabled.json'
npm run migrate
npm run build
npm start

The service binds to 127.0.0.1:3001; GET /health checks database connectivity. .env.local is loaded automatically (keep it chmod 600). Migrations are transactional and tracked in platform_migrations; never edit an applied migration, add a new version.

On Docker Desktop, save a rotated Stripe sk_test_ key in .env.local, then:

Terminal window
npm run sandbox -- setup # PostgreSQL 17 container, migrations, platform, Stripe CLI webhooks
npm run sandbox -- account # local browser test account without OIDC
npm run sandbox -- checkout sandbox-monthly
npm run sandbox -- status

To test the website purchase flow end to end, serve a copy of aistride.dev locally with its platformUrl pointing at the sandbox, then:

Terminal window
npm run sandbox -- quotes http://127.0.0.1:51736 # quote page URL, terms URL, allowed origin
npm run sandbox -- setup
npm run sandbox -- quotes-status # quotes, organizations, credits, pending webhooks

Configure a plan, create the quote, accept it, and pay the first invoice with card 4242 4242 4242 4242; quotes-status then lists the quote as provisioned and the organization with its credits and features. Quote creation is rate-limited to 5 per hour per address.

  • Run one or more service processes; the webhook worker claims inbox rows with PostgreSQL locking.
  • Put ingress, body and rate limits in front of it, and set exact HTTPS PLATFORM_ALLOWED_ORIGINS (comma-separated); CORS is not authentication.
  • Live Stripe keys additionally require PLATFORM_ENABLE_LIVE_PAYMENTS. Quote and terms URLs may use plain http only on loopback.
  • Version rate cards rather than editing live ones; enable only model deployments whose tokenizer and limits you validated.

Continue with the API reference.