Bun/TypeScript workspace with a React/Three.js frontend and a Fastify + Prisma API backend. Docker compose is available for local stack spins.
-
apps/www.k3h4.io – Bun + React + R3F frontend
-
apps/api.k3h4.io – Fastify API with Prisma/Postgres
-
scripts/ – shared scripts and tooling
-
sidecars/ollama – Ollama-based LLM sidecar for
api.k3h4.io(Docker Compose + Fly)
- Bun (for both apps)
- Docker + Docker Compose (for local Postgres and API via compose)
- Node-compatible toolchain (for editor/TS)
- Frontend:
apps/www.k3h4.io/.envwithAPI_URL,GITHUB_CLIENT_ID,LINKEDIN_CLIENT_ID - Backend:
apps/api.k3h4.io/.envwithDATABASE_URL,GITHUB_CLIENT_ID/SECRET,LINKEDIN_CLIENT_ID/SECRET,JWT_SECRET,CORS_ORIGIN
- Install deps
bun install
- Run via Docker Compose (API + DB)
docker compose up --build
- Start frontend (from repo root)
cd apps/www.k3h4.io
bun run dev
API docs available at ${API_URL}/docs.
docker compose up --buildnow also brings upsidecars/ollama. The Fastify server hitsOLLAMA_URL=http://ollama:11434, so the stacking works locally without extra networking.- Docker Compose now binds the host-side
./sidecars/ollama/datadirectory so the mount exists automatically and caches the models that the entrypoint pulls fromsidecars/ollama/preload-models.txt. - Production deploys the sidecar as its own Fly app (
api-k3h4-io-ollama) using the configuration insidecars/ollama/fly.toml, which currently targets a shared-cpu-1x slice with 2 GB of RAM. - Point the API app at
http://api-k3h4-io-ollama.internal:11434(e.g. viafly secrets set OLLAMA_URL=...) to reach the sidecar over Fly’s internal network.
- compose:up / compose:down – bring stack up/down
- bun:dev (frontend) – run web dev server
- OAuth callbacks expected at
http://localhost:5173/auth/callback/{provider}. - API exposes
/auth/{provider}/urland/auth/{provider}/callbackfor GitHub/LinkedIn. - Prisma schema is under
apps/api.k3h4.io/prisma/; migrations tracked there.
