Note
Carpooling management platform for organizations β connecting drivers and passengers within a shared workspace.
Cowat is a full-stack TypeScript web application that lets organizations coordinate daily commutes. Drivers post their routes and available seats; passengers request bookings. Admins manage users, monitor activity, and configure notification channels all within a multi-tenant, role-based workspace.
- Commute posting Drivers create one-way or round-trip commutes with customizable stops, departure times, and available seats
- Commute templates Save recurring routes as templates to speed up daily commute creation
- Booking requests Passengers request a spot on a commute; drivers accept or decline
- Location management Save and reuse personal pickup/dropoff locations
- Notification preferences Choose how and when to receive updates (email, Slack)
- Organization management Create and manage organizations, invite users by email
- User management View, create, update, and ban users within an organization
- Stats dashboard Monitor commute activity and usage over time
- Slack integration Configure org-level Slack channels for automated notifications
- Multi-tenancy Full organization isolation with role-based access control (
admin,user) - Internationalization English and French supported throughout the UI and emails
- OpenAPI Auto-generated API documentation available in development
| Layer | Technology |
|---|---|
| Framework | TanStack Start + TanStack Router |
| UI | React 19, Tailwind CSS 4, shadcn/ui |
| Data fetching | TanStack Query |
| Forms | React Hook Form + Zod |
| State | Zustand |
| API | oRPC (TypeScript RPC with OpenAPI support) |
| ORM | Prisma |
| Auth | Better Auth |
| Database | PostgreSQL |
| Storage | MinIO (S3-compatible) |
| Emails | React Email + Resend |
| Notifications | Slack Bolt + jsx-slack |
| i18n | i18next |
| Unit tests | Vitest |
| E2E tests | Playwright |
| Component dev | Storybook |
| Runtime | Node.js >= 24 |
git clone <repo-url>
cd cowat
pnpm installcp .env.example .envKey variables to review (defaults work out-of-the-box with Docker):
| Variable | Description |
|---|---|
DATABASE_URL |
PostgreSQL connection string |
AUTH_SECRET |
Secret key for session signing change in production |
EMAIL_SERVER |
SMTP server (defaults to maildev for local dev) |
RESEND_API_KEY |
Resend API key (required in production) |
S3_* |
MinIO/S3 credentials for file uploads |
Note
Do not change EMAIL_SERVER for local development the default points to the maildev container which catches all outgoing emails.
pnpm dk:init # Start Docker (PostgreSQL + MinIO)
pnpm db:init # Push schema + seed initial datapnpm devThe application is available at http://localhost:3000.
Note
No Docker? Set up a PostgreSQL database manually and update DATABASE_URL, then run pnpm db:push && pnpm db:seed.
VS Code
cp .vscode/settings.example.json .vscode/settings.jsonZed
cp .zed/settings.example.json .zed/settings.json| Command | Description |
|---|---|
pnpm dev |
Start the dev server (app + SMTP watcher) |
pnpm storybook |
Open Storybook component explorer at localhost:6006 |
| Command | Description |
|---|---|
pnpm dk:init |
Initialize Docker services (first time) |
pnpm dk:start |
Start Docker services |
pnpm dk:stop |
Stop Docker services |
pnpm dk:clear |
Remove Docker volumes (destructive) |
pnpm db:init |
Push schema + seed data |
pnpm db:push |
Sync Prisma schema to the database |
pnpm db:seed |
Seed the database |
pnpm db:reset |
Full reset (destructive) |
pnpm db:seed:week |
Re-seed commutes for the current week |
pnpm db:ui |
Open Prisma Studio |
| Command | Description |
|---|---|
pnpm lint |
Run all linters (oxlint + TypeScript) |
pnpm format |
Format code with oxfmt |
| Command | Description |
|---|---|
pnpm gen:prisma |
Regenerate Prisma client |
pnpm gen:icons |
Generate icon components from SVG sources |
pnpm gen:build-info |
Generate build metadata |
All emails are intercepted locally by maildev.
- Maildev UI: http://localhost:1080
- Preview a template:
http://localhost:3000/api/dev/email/{template} - Preview in a specific language: append
?language=fr(oren) - Pass props to a template: append
?propName=valueas query parameters
Email templates are built with React Email and live in src/emails/templates/.
OpenAPI documentation is auto-generated from oRPC router definitions and accessible at:
http://localhost:3000/api/openapi/app
Place SVG files in src/components/icons/svg-sources/ and run:
pnpm gen:iconsWarning
SVG files must be named with the icon- prefix (e.g. icon-external-link.svg), be square, and use #000 as the fill color (it will be replaced with currentColor).
Display a labeled banner in non-production environments by setting:
VITE_ENV_NAME="staging"
VITE_ENV_EMOJI="π¬"
VITE_ENV_COLOR="teal"pnpm test # Run tests in headless mode
pnpm test:ui # Open interactive test UIE2E tests use Playwright. A summary of all test scenarios is available in the repository.
pnpm e2e # Run all tests headlessly (CI mode)
pnpm e2e:setup # Generate auth context (required once, and after DB changes)
pnpm e2e:ui # Open Playwright UI to run and debug specific testsWarning
The generated E2E context files contain authentication state. Re-run pnpm e2e:setup after any local database changes. This step runs automatically in CI.
pnpm install
pnpm build
pnpm startOptionally build Storybook to expose it at /storybook:
pnpm storybook:build
pnpm build
pnpm startsrc/
βββ app/ # Client-side app entry, providers, global styles
βββ components/ # Shared UI components and icons
βββ emails/ # React Email templates
βββ features/ # Feature modules (auth, commute, booking, β¦)
β βββ account/
β βββ auth/
β βββ booking/
β βββ build-info/
β βββ commute/
β βββ commute-request/
β βββ commute-template/
β βββ dashboard/
β βββ devtools/
β βββ location/
β βββ notification/
β βββ organization/
β βββ push/
β βββ slack/
β βββ stats/
β βββ user/
βββ locales/ # i18n translation files (en, fr)
βββ routes/ # TanStack Router file-based routes
β βββ api/ # Server API routes (RPC, REST, uploads, dev tools)
β βββ app/ # User-facing routes (/app/$orgSlug/β¦)
β βββ invitations/ # Invitation acceptance flow
β βββ login/ # Auth / login pages
β βββ manager/ # Manager routes (/manager/$orgSlug/β¦)
βββ server/
β βββ db/ # Prisma client + middleware (soft-delete)
β βββ routers/ # oRPC procedure definitions
βββ utils/ # Shared utilities and helpers
