mirror of
https://github.com/hanzo-apps/dispatch-newsletter.git
synced 2026-10-30 19:23:26 +00:00
A real Hanzo-stack starter template: public newsprint masthead + subscribe, signed-in archive/issue reader, and a Studio composer over org-scoped Base collections (issues + subscribers). Vite + React 19 + @hanzo/gui + @hanzo/iam + @hanzo/base; PKCE against hanzo.id; provisioned from schema.sql. tsc + vite build green.
22 lines
980 B
TypeScript
22 lines
980 B
TypeScript
/**
|
|
* The app's environment contract, in ONE place. Every value has a sensible
|
|
* default so the starter runs against live Hanzo (hanzo.id + api.hanzo.ai) with
|
|
* zero config; the deploy pipeline overrides them per environment.
|
|
*/
|
|
|
|
const origin = typeof window !== 'undefined' ? window.location.origin : ''
|
|
|
|
/** OIDC issuer (Hanzo IAM). */
|
|
export const IAM_URL = import.meta.env.VITE_HANZO_IAM_URL || 'https://hanzo.id'
|
|
|
|
/** IAM application (client) id, `<org>-<app>`. Per-app clients are provisioned
|
|
* at deploy; falls back to the shared `hanzo-app` client for local dev. */
|
|
export const CLIENT_ID = import.meta.env.VITE_IAM_CLIENT_ID || 'hanzo-app'
|
|
|
|
/** PKCE redirect URI — this origin's callback route unless overridden. */
|
|
export const REDIRECT_URI =
|
|
import.meta.env.VITE_HANZO_REDIRECT_URI || `${origin}/auth/callback`
|
|
|
|
/** Browser-reachable Hanzo Base data plane (IAM-native). */
|
|
export const BASE_URL = import.meta.env.VITE_HANZO_BASE_URL || 'https://api.hanzo.ai'
|