A TypeScript monorepo for a CRM product.
This repository contains:
apps/web: Next.js frontendapps/api: Hono API serverpackages/validators: shared Zod schemas and typespackages/ui: shared UI componentspackages/eslint-configandpackages/typescript-config: shared tooling
The app is centered around a CRM with:
- People management
- Organization management
- Deals pipeline
- Workspace switching and invitations
The web app uses:
- Next.js
- React
- TanStack Query for server state
- TanStack Table for CRM list views
- React Hook Form + Zod for forms
- shadcn/ui and Radix components
- Tailwind CSS
Main UI patterns:
- People and Orgs use server-driven tables with sorting, filtering, pagination, row selection, and row actions.
- Deals use a Kanban board with drag-and-drop stage updates.
- Create/edit/view flows use shared sheet components.
- Workspace switching updates all CRM caches immediately.
The API uses:
- Hono
- Drizzle ORM
- PostgreSQL
- Better Auth for authentication and organizations
The API handles:
- CRM CRUD
- Pagination, sorting, and filtering
- Workspace-scoped access
- Invitation and member management
packages/validators: shared schemas for auth, workspace, and CRM entitiespackages/ui: shared design system componentspackages/eslint-config: shared lint rulespackages/typescript-config: shared TS config
From the repo root:
pnpm dev
pnpm build
pnpm lint
pnpm check-typesDatabase commands:
pnpm db:push
pnpm db:generate
pnpm db:migrate
pnpm db:studio
pnpm db:resetDocker:
pnpm docker:up
pnpm docker:down
pnpm docker:clean- Node 20+
- pnpm
- Turborepo
- Next.js
- Hono
- Drizzle ORM
- PostgreSQL
- Better Auth
- TanStack Query
- TanStack Table
- The repo is organized as a monorepo with app and package boundaries.
- CRM list pages are server-driven, not client-filtered.
- Deals are rendered as a pipeline instead of a table.