Skip to content
mathzdsPublic

About

James da Salada de Frutas

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

james

pnpm monorepo: Next.js 16 + shadcn/ui (Tailwind v4) + Drizzle ORM (Postgres) + WebSocket server (ws).

Add UI components: pnpm dlx shadcn@latest add <component> -c apps/web.

apps/web      Next.js (App Router). Page reads DB in a Server Component, client connects to WS.
apps/ws       WebSocket server on :3001. Saves each message via Drizzle and broadcasts it.
packages/db   Drizzle schema + client (`@repo/db`), shared by both apps.

Run

pnpm install
docker compose up -d   # Postgres on :5432
pnpm db:push           # create tables from the schema
pnpm dev               # web :3000 + ws :3001

Env (optional): DATABASE_URL (defaults to the compose DB), NEXT_PUBLIC_WS_URL (defaults to ws://<host>:3001), PORT for the ws server.

Schema change: edit packages/db/index.ts, run pnpm db:push.

About

James da Salada de Frutas

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages