simplify better-auth integration in elysia routes

This commit is contained in:
2026-02-24 21:04:06 -05:00
parent 122030e487
commit ae9f081f90
6 changed files with 53 additions and 160 deletions

View File

@@ -8,7 +8,7 @@ Turbopack-first rebuild of a fiscal.ai-style terminal with OpenClaw integration.
- Bun runtime/tooling
- Elysia route layer mounted in Next Route Handlers
- Turbopack for `dev` and `build`
- Better Auth (email/password, magic link, admin, organization plugins)
- Better Auth (email/password + magic link)
- Drizzle ORM (PostgreSQL) + Better Auth Drizzle adapter
- Internal API routes via Elysia catch-all (`app/api/[[...slugs]]/route.ts`)
- Durable local task engine and JSON data store
@@ -66,7 +66,6 @@ POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
BETTER_AUTH_SECRET=replace-with-a-long-random-secret
BETTER_AUTH_BASE_URL=http://localhost:3000
BETTER_AUTH_ADMIN_USER_IDS=
BETTER_AUTH_TRUSTED_ORIGINS=http://localhost:3000
OPENCLAW_BASE_URL=http://localhost:4000
@@ -81,7 +80,7 @@ If OpenClaw is unset, the app uses local fallback analysis so task workflows sti
All endpoints below are handled by Elysia in `app/api/[[...slugs]]/route.ts`.
- `GET|POST|PATCH|PUT|DELETE /api/auth/*` (Better Auth handler)
- `ALL /api/auth/*` (Better Auth handler)
- `GET /api/health`
- `GET /api/me`
- `GET|POST /api/watchlist`