How abdulmumin1/owostack works
Owostack is a billing engine for AI SaaS: applications define a catalog, then use its runtime to attach plans, check feature access, and record usage. The API handles billing and usage, with provider adapters for payment gateways and analytics/event handling alongside it. The dashboard manages organizations and billing configuration; the CLI syncs catalog configuration. The README documents Durable Objects and Workflows as infrastructure, but sampled excerpts do not establish their detailed call paths.
Main entry points: api Runtime API routes · src/index.ts TypeScript SDK · src/index.ts Workers API · dashboard Dashboard routes
Components 22
SDK and catalog
- TypeScript SDK
packages/core/src/index.ts - Catalog definitions
packages/core/src/catalog.ts
Billing API
- Workers API
apps/api/src/index.ts - Runtime API routes
apps/api/src/routes/api - Dashboard routes
apps/api/src/routes/dashboard - Usage metering
apps/api/src/lib/usage-meter.ts - Entitlements and plans
apps/api/src/lib/entitlements.ts - Billing workflows
apps/api/src/lib/workflows - Webhook processing
apps/api/src/lib/webhooks/index.ts - Provider integration logic
apps/api/src/lib/providers.ts
State and analytics
- Usage ledger
apps/api/src/lib/usage-ledger.ts - Billing database schema
packages/db/src/schema - Analytics events
packages/analytics/src/index.ts
Provider integrations
- Payment adapters
packages/adapters/src/index.ts
Product interfaces
- Catalog CLI
packages/cli/src/index.ts - Admin dashboard
apps/dashboard/src/lib/auth-client.ts - Billing demo app
apps/demo-app/src/lib/server/owo.ts
Other components
- Application developer
- Customer application
- Payment gateways
- Analytics pipeline
- Cloudflare runtime
Connections 24
- Application developer → Catalog definitions: defines catalog
- Catalog definitions → TypeScript SDK: configures
- Customer application → TypeScript SDK: calls runtime
- TypeScript SDK → Runtime API routes: requests billing
- Catalog CLI → Catalog definitions: loads config
- Catalog CLI → Runtime API routes: syncs catalog
- Admin dashboard → Dashboard routes: manages billing
- Billing demo app → TypeScript SDK: calls runtime
- Runtime API routes → Entitlements and plans: checks access
- Runtime API routes → Usage metering: tracks usage
- Runtime API routes → Billing workflows: handles billing
- Runtime API routes → Provider integration logic: uses providers
- Dashboard routes → Entitlements and plans: manages plans
- Dashboard routes → Usage metering: reads usage
- Workers API → Webhook processing: dispatches events
- Webhook processing → Billing workflows: updates billing
- Provider integration logic → Payment adapters: selects adapter
- Payment adapters → Payment gateways: calls gateway
- Usage metering → Usage ledger: records usage
- Billing workflows → Billing database schema: persists billing
- Entitlements and plans → Billing database schema: reads configuration
- Workers API → Analytics events: records events
- Analytics events → Analytics pipeline: sends events
- Workers API → Cloudflare runtime: runs on