This a monorepo template for Typescript projects.
- 📦 pnpm for fast, disk space efficient package management
- 🏗️ Turborepo for efficient build system and task running
- 🔷 TypeScript for type safety
- 🔨 Biome for fast consistent code formatting and linting
- 🎨 Tailwind CSS support with VS Code integration
- 📱 Workspace structure for apps and packages
- 🔄 Automated dependency version synchronization
- 🛠️ VS Code configuration for optimal developer experience
The monorepo is organized into two main directories:
apps/
: Contains all the applications that can be deployed independentlypackages/
: Contains shared packages/libraries used across applications
- Clone this repository
- Install dependencies:
pnpm i
- Replace all occurrences of
monorepo-template
by your own project name
The repository includes automated preview deployment workflows that manage preview environments for pull requests:
When a PR is opened, reopened, synchronized, or marked ready for review, the workflow:
- Builds a Docker image of the application
- Deploys it to Dokploy with a unique preview URL
- Comments on the PR with the preview URL
When a PR is closed (merged or abandoned), the workflow automatically:
- Removes the preview deployment from Dokploy
- Cleans up associated resources
The following secrets need to be configured in your repository settings:
Docker Hub Authentication:
DOCKER_USERNAME
: Your Docker registry usernameDOCKER_PASSWORD
: A Docker registry password
if using a different registry than docker hub, change
registry
input for action./.github/actions/build-docker
inpreview-up.yml
AWS Cache (Optional):
AWS_ACCESS_KEY_ID
: AWS access key for S3 cacheAWS_SECRET_ACCESS_KEY
: AWS secret key for S3 cache
Dokploy Deployment:
DOKPLOY_BASE_URL
: The base URL of your Dokploy instanceDOKPLOY_TOKEN
: Authentication token for Dokploy API access
The workflows use these secrets to:
- Push built images to Docker Hub
- Store build cache in AWS S3 (if configured)
- Deploy and manage preview environments in Dokploy