HomeIntegrationsContact
Sign in
← Home/Docs/Backend split

Service ownership and migration boundaries.

Backend split: kulanz-online ↔ kulanz-backend

Ownership

ConcernOwner
Drizzle schema + migrationskulanz-online (src/server/db/schema/)
SQLAlchemy mirrorskulanz-backend (src/kulanz_backend/db/models/) — update in the same PR as Drizzle changes
Dashboard UIkulanz-online — calls backend with apiClient + Bearer JWT
Agents + Python RESTkulanz-backend only
Browser authSupabase session in the browser → Authorization: Bearer on api.kulanz.audla.ai
iOS native appkulanz-app → https://api.kulanz.audla.ai /api/v1/...

Client API pattern (web)

import { createOrgApi } from '@/lib/org-api'

const orgApi = createOrgApi(organizationSlug)
await orgApi.get('/journal-entries?limit=50')

window.__KULANZ_CONFIG__.backendUrl is set from NEXT_PUBLIC_KULANZ_BACKEND_URL in the root layout.

The dashboard calls kulanz-backend for org domain APIs, auth profile/password/bootstrap, members, uploads, and expense journal export. Remaining kulanz-online /api/* route handlers are webhook proxies only (prefer backend URLs in production).

iOS (kulanz-app)

  • Production: https://api.kulanz.audla.ai
  • Debug: http://127.0.0.1:8000
  • Contract: docs/api-contracts/ios-v1.md

Local development

  1. cd kulanz-backend && uv run kulanz-api (port 8000)
  2. In kulanz-online/.env.local:
    • KULANZ_BACKEND_URL=http://127.0.0.1:8000 (server/scripts if needed)
    • NEXT_PUBLIC_KULANZ_BACKEND_URL=http://127.0.0.1:8000
    • NEXT_PUBLIC_SUPABASE_URL / NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY
    • KULANZ_BACKEND_SERVICE_TOKEN (service-to-service only)

Framework: Next.js App Router (app/). UI code lives in app/**, src/components, src/lib, src/views.

Production

SettingValue
Web/iOS API basehttps://api.kulanz.audla.ai
Accounting webhookshttps://api.kulanz.audla.ai/api/v1/webhooks/accounting/transactions
Stripe webhookshttps://api.kulanz.audla.ai/api/v1/webhooks/stripe (preferred); online proxy may still exist)
Sales webhooksPrefer backend; online /api/webhooks/sales/:source until fully migrated
Contact formPOST https://api.kulanz.audla.ai/api/v1/contact

Agents

Web UI calls POST /api/v1/organizations/{slug}/agents/{name}/run (and COA sessions under /api/v1/.../agents/coa_assistant/sessions) directly on the Python API.

Import scripts

Historical import and maintenance scripts under kulanz-online/scripts/ may still use Drizzle/Postgres locally; new posting logic belongs in kulanz-backend.

Public pages
HomeIntegrationsContact
Docs
AccountingPaymentsSalesSee all →
Company
Brandkit

Kulanz, a division of Audla Inc.