Task 1
Better Auth
Use verified human identities for web access and scoped API or MCP credentials for machine access.
Steps
- 1Human users verify their email before onboarding or application access.
- 2Web sessions identify the User; Organization membership and permissions are resolved separately.
- 3API keys and MCP client secrets are scoped machine credentials and must not be stored in source control.
Authentication proves identity. It does not grant Organization, Workspace, billing, or platform-administration access.
Task 2
Roles and permissions
Resolve custom RBAC and contextual ABAC at the Organization or Workspace boundary for every operation.
Steps
- 1Identify the authenticated Actor and requested Organization and Workspace.
- 2Resolve active membership, Role, and Permission assignments.
- 3Apply contextual restrictions such as Workspace grants.
- 4Fail closed and distinguish permission denial from missing data.
Route parameters, slugs, headers, and client-supplied Actor identifiers are context—not authorization proof.
Task 3
Deployment controls
Promote verified commits through Preview and production while keeping credentials and tenant data environment-scoped.
Steps
- 1Validate static analysis, unit, database, browser, Storybook, and production-build checks.
- 2Exercise an authenticated Preview smoke with dedicated non-customer credentials.
- 3Match the production deployment to the merged commit SHA.
- 4Check readiness and runtime errors before declaring the release complete.
Production health
curl --fail https://www.decisionlog.ai/api/health
curl --fail https://www.decisionlog.ai/api/ready