Files
superlist/README.md
2026-10-15 15:30:22 -03:00

2.4 KiB

Superlist

Monorepo with a Bun + Hono API and a React + Vite admin app.

Workspace What it is
apps/api Bun + Hono backend, Prisma (Postgres), Zod validation, Pino logging
apps/web React + Vite + TypeScript frontend, shadcn/ui, TanStack Router + Query
packages/shared @superlist/shared — Result pattern and RFC 9457 Problem Details types

See STACK.md for the stack and AGENTS.md for the architecture conventions.

Requirements

  • Bun (workspace package manager and API runtime)
  • Postgres (only needed once you run migrations)

Getting started

bun install

# API
cp apps/api/.env.example apps/api/.env      # then edit DATABASE_URL / BETTER_AUTH_SECRET
bun run db:generate                          # prisma generate
bun run db:migrate                           # requires a reachable Postgres

# Web
cp apps/web/.env.example apps/web/.env

Run everything in parallel:

bun run dev            # turbo run dev → api on :3000, web on :5173

Or a single workspace: bun run dev --filter=@superlist/web.

Verification

bun run build          # turbo run build
bun run lint           # biome check (per package)
bun run typecheck      # tsc
bun run test           # bun test (api) / vitest (web, shared)

Useful scripts

Command Effect
bun run lint:fix Apply Biome's safe fixes across the repo
bun run lint:ci biome ci — lint the whole repo exactly as CI would
bun run format Format the repo with Prettier
bun run db:generate Regenerate the Prisma client into apps/api/src/generated
bun run db:migrate Create and apply a migration (development)
bun run db:studio Open Prisma Studio

Auth

BetterAuth is mounted by the API under /api/auth/* and uses the Prisma adapter. The web app talks to it through apps/web/src/lib/auth-client.ts; the _authenticated route layout redirects to /sign-in when there is no session.