This is a TanStack Start project with tRPC API running on Start's server functions so it's easily deployable to many hosting platforms.
All reads from the Postgres database are done via tRPC queries which populate TanStack DB query collections.
We sync normalized data from tables into TanStack DB collections in the client & then write client-side queries for displaying data in components.
Before you started, all necessary package install is done via pnpm install and a dev server is started with pnpm dev.
Human devs have IDEs that autoformat code on every file save. After you edit files, you must do the equivalent by running pnpm lint.
This command will also report linter errors that were not automatically fixable. Use your judgement as to which of the linter violations should be fixed.
pnpm run dev- Start development server with Docker servicespnpm run build- Build for productionpnpm run test- Run all Vitest testsvitest run <test-file>- Run single test filepnpm run start- Start production server
- Frontend: TanStack Start (SSR framework for React and other frameworks) with file-based routing in
src/routes/ - Database: PostgreSQL with Drizzle ORM, schema in
src/db/schema.ts - Services: Docker Compose setup (Postgres on 54321)
- Styling: Tailwind CSS v4
- Authentication: better-auth
- API: tRPC for full e2e typesafety.
- TypeScript: Strict mode, ES2022 target, bundler module resolution
- Imports: Use
@/*path aliases forsrc/directory imports - Components: React 19 with JSX transform, functional components preferred
- Server DB: Drizzle ORM with PostgreSQL dialect, schema-first approach
- Client DB: TanStack DB with Query Collections
- Routing: File-based with TanStack Router, use
Linkcomponent for navigation - Testing: Vitest with @testing-library/react for component tests
- file names should always use kebab-case