A playground for building web app auth on top of SurrealDB's built-in authentication. The goal is to see how far you can get with SurrealDB alone, and where npm packages actually help.
- Nx monorepo with pnpm
- TypeScript 7:
tscis TypeScript 7 (native), while tools that need the compiler API get TypeScript 6 via thetypescriptalias (tsc6) - oxlint + oxfmt
apps/web: TanStack Start + HeroUI v3 + next-themes, prerendered and deployed to Cloudflare Workers with@cloudflare/vite-plugin
pnpm install
cp apps/web/.env.example apps/web/.env # then fill in SURREALDB_PASSWORD and JWT_SECRET
pnpm nx run @surrealauth/web:dev # http://localhost:3000pnpm nx run @surrealauth/web:build # vite build + static prerender
pnpm nx run @surrealauth/web:preview # preview the build in workerd
pnpm nx run @surrealauth/web:deploy # build + wrangler deploy (worker: surrealauth)
pnpm nx run @surrealauth/web:db:sync # apply apps/web/database/schema with SurrealKit
pnpm lint # oxlint (@nx/oxlint, batched)
pnpm typecheck # tsc (TypeScript 7)
pnpm format # nx format:write (oxfmt)
pnpm format:checkEvery push to main deploys apps/web to the surrealauth Cloudflare Worker via
Workers Builds
(https://surrealauth.daveycodez.workers.dev).