A monorepo with a React client, Express server, and shared lib — powered by pnpm workspaces.
-
Clone the repo
git clone <repo-url> && cd DocLab
-
Create a
.envfile from the examplecp .env.example .env
Edit
.envwith your values:DB_USER=doclab DB_PASSWORD=changeme DB_NAME=doclab
-
Build and start all services
docker compose up --build
This starts:
Service URL Client http://localhost:5173 Server http://localhost:3000 Postgres localhost:5432 -
Stop services
docker compose down
To also remove the database volume:
docker compose down -v
pnpm install
pnpm dev
docker compose up db -dThis runs all packages in parallel:
- client — Vite dev server with HMR
- server — tsx watch (auto-restarts on changes)
- lib — tsc watch (recompiles shared code)
With Postgres running (docker compose up db -d):
# Generate migrations from schema changes
pnpm --filter @doclab/server db:generate
# Apply migrations
pnpm --filter @doclab/server db:migrate
# Open Drizzle Studio
pnpm --filter @doclab/server db:studioDocLab/
├── client/ # React + Vite frontend
├── server/ # Express API server
├── lib/ # Shared TypeScript library
├── docker-compose.yml
└── .env