A modern monorepo project built with pnpm workspaces featuring two React applications (User and Admin) with shared packages and Docker support.
basic-monorepo/
├── frontend/ # User-facing application
├── frontend-admin/ # Admin application
├── packages/ # Shared UI components and utilities
├── docker/ # Docker configurations
├── makefile # Development automation scripts
└── pnpm-workspace.yaml # Workspace configuration
- Runtime: React 19.2.1 with TypeScript
- Build Tool: Vite (Rolldown)
- Package Manager: pnpm with workspaces & catalogs
- Styling: TailwindCSS 4.x
- UI Components: Shadcn + Radix UI
- Forms: React Hook Form + Zod
- Routing: React Router 7.x
- Code Quality: Biome for linting & formatting
- Container: Docker & Docker Compose
- Docker & Docker Compose
- Make (for automation commands)
-
Copy environment configuration (if
example.envexists)cp example.env .env
-
Run the setup command
make setup
This will:
- Install all dependencies
- Build Docker containers
- Start the development environment
-
Access the applications
- User App: http://localhost:3000
- Admin App: http://localhost:3001
Run the automated deployment script:
./deploy-local.shScript Features:
- ✓ Checks if Docker is running
- ✓ Validates environment configuration
- ✓ Builds Docker images
- ✓ Installs all dependencies
- ✓ Starts services
- ✓ Displays service URLs
Script Options:
./deploy-local.sh --clean # Clean up before deployment
./deploy-local.sh --help # Show help messageRun make help to see all available commands. Here are the most common ones:
make dev # Start development environment
make stop # Stop all services
make restart # Restart all containers
make logs # View logs from all services# Add a package to frontend
make add-pkg-frontend PKG=axios
# Add a dev dependency to frontend
make add-pkg-frontend PKG=@types/lodash DEV=1make check-fe # Run type checking, linting, and format checks
make fix-fe # Auto-fix linting and formatting issuesmake shell-fe # Open shell in frontend container
make clean # Clean up containers, volumes, and node_modulesThis project uses pnpm workspaces with catalog feature for centralized dependency management.
frontend- User-facing React applicationfrontend-admin- Admin dashboard React applicationpackages/*- Shared packages (e.g.,@basic-monorepo/ui)
Common dependencies are managed in pnpm-workspace.yaml under the catalog section:
- React, React DOM, TypeScript
- TailwindCSS, Radix UI components
- Development tools (Vite, ESLint, etc.)
Packages reference catalog dependencies using:
{
"dependencies": {
"react": "catalog:",
"tailwindcss": "catalog:"
}
}The project uses Docker Compose with:
- Shared volumes for node_modules and pnpm store
- Hot reloading in development
- Separate services for frontend and frontend-admin
- Dependency installation services for each app
- Adding New Workspaces - Complete guide for adding new apps/packages
- Frontend Packages - Detailed package documentation
If ports 3000 or 3001 are already in use, update the port mappings in docker-compose.yml.
Run make clean followed by make setup to reset the environment.
make stop
docker system prune -f
make setupPrivate repository - All rights reserved.