Migrate API to Elysia and switch runtime to Bun
This commit is contained in:
16
README.md
16
README.md
@@ -5,18 +5,20 @@ Turbopack-first rebuild of a fiscal.ai-style terminal with OpenClaw integration.
|
||||
## Stack
|
||||
|
||||
- Next.js 16 App Router
|
||||
- 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)
|
||||
- PostgreSQL adapter for Better Auth
|
||||
- Internal API routes (`app/api/*`)
|
||||
- Internal API routes via Elysia catch-all (`app/api/[[...slugs]]/route.ts`)
|
||||
- Durable local task engine and JSON data store
|
||||
- OpenClaw/ZeroClaw analysis via OpenAI-compatible chat endpoint
|
||||
|
||||
## Run locally
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npm run dev
|
||||
bun install
|
||||
bun run dev
|
||||
```
|
||||
|
||||
Open [http://localhost:3000](http://localhost:3000).
|
||||
@@ -27,8 +29,8 @@ Auth tables are migrated automatically on first authenticated request.
|
||||
## Production build
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
npm run start
|
||||
bun run build
|
||||
bun run start
|
||||
```
|
||||
|
||||
## Docker deployment
|
||||
@@ -43,7 +45,7 @@ The base Docker Compose now includes an internal PostgreSQL service (`postgres`)
|
||||
For Coolify/remote Docker Compose, only app container port `3000` is exposed internally (no fixed host port bind), avoiding host port collisions.
|
||||
If you use an external Postgres instance, set `DATABASE_URL` explicitly.
|
||||
Runtime data persists in the `app_data` volume (`/app/data` in container).
|
||||
Docker builds install the npm version from `NPM_VERSION` (default `latest`).
|
||||
Docker images use Bun (`oven/bun:1.3.5-alpine`) for build and runtime.
|
||||
|
||||
## Environment
|
||||
|
||||
@@ -71,6 +73,8 @@ If OpenClaw is unset, the app uses local fallback analysis so task workflows sti
|
||||
|
||||
## API surface
|
||||
|
||||
All endpoints below are handled by Elysia in `app/api/[[...slugs]]/route.ts`.
|
||||
|
||||
- `GET|POST|PATCH|PUT|DELETE /api/auth/*` (Better Auth handler)
|
||||
- `GET /api/health`
|
||||
- `GET /api/me`
|
||||
|
||||
Reference in New Issue
Block a user