- Simplicity over complexity
- Modularity
- Taking a bet on the best "rising" libraries offering the best developer experience
See TODO.md for more details
Add Environment Variables:
Copy the .env.example
file to .env
and add your environment variables.
CLOUDFLARE_ACCOUNT_ID=<your-cloudflare-account-id>
Add new packages to the repo with Turborepo:
bun turbo gen workspace
# alternatively: `bun turbo gen workspace --type <app/package>` to specify the type of package to create
Update dependencies across the monorepo:
bunx taze -I -r
# or
bunx taze --interactive --recursive
bunx taze --include lodash,webpack # filter by package name
This Turborepo includes the following packages and apps:
Apps
- api: A Hono server compatible with Cloudflare Workers
- astro: A Astro for content-driven websites
- spa: A Tanstack Router SPA
Packages
- ui: React UI library initialized with Shadcn common components, tsconfig, and globals.css, which are exported to the spa app
- typescript-config: tsconfig.json's used throughout the monorepo
- core: Core package for business logic
- db: Database package for Drizzle ORM
Each package and app is 100% TypeScript.
This Turborepo has some additional tools already setup for you:
- SST for Infrastructure as Code
- Bun for package management, monorepo workspace, test runner
- Biome for formatting & linting
- TypeScript for static type checking
- taze for updating dependencies across the monorepo
- Knip - Find unused code
- date-fns - Date utilities
- mattpocock/ts-reset: A 'CSS reset' for TypeScript, improving types for common JavaScript API's
- ts-essentials/ts-essentials: All essential TypeScript types in one place 🤙
- Auth
- WorkOS
- Clerk
- Supabase
- Email
- Resend - Transaction & Marketing Emails
Refer to AndreasAugustin/actions-template-sync for a github action to sync the template. This repo uses the .github/workflows/template-sync.yml file to sync the template, which you can manually trigger the action from the Actions tab in Github. You can configure this to automatically sync with a cron schedule if you'd like.
-
Example Monorepos
-
best monorepo with turbo midday-ai/midday - a monorepo for my personal website and projects, built with Turborepo + pnpm 📚
- mattpocock/total-typescript-monorepo / total-typescript-monorepo-template
- byCedric/expo-monorepo-example Expo + Web
- saasfly/saasfly - Next.JS template
- enjidev/enji.dev - a monorepo for my personal website and projects, built with Turborepo + pnpm 📚
- Misc
- hamlim/template-monorepo - A quick and simple monorepo starter template (Bun, Next.js, Turbo) / Biome
- breezemm/breeze-web - Monorepo for Breeze Web - init with Shadcn in UI package, consumed elsewhere
- dangvanthanh/nuxt-turborepo-boilerplate - review biome config
- SST
- sst/ion/tree/dev/examples/aws-monorepo
- sayandedotcom/refhired.com - SST + Turborepo
- marcotheo/qwik-sst-deployments - see example of SST + Cloudflare Pages deployment with Pulumi
- Pulumi
- martypenner/surface-2-air-site - example of Pulumi usage
- ginetta/ginetta-tonic-festival - see Pulumi usage
-
Turborepo Generators
- turbo-generator - example generators for a Next.JS app
- turborepo-template - example templates with various app packages
-
tsup
- GitHub templates and repository sync | 0xDC.me
- actions-template-sync - seems most used
- template-sync
- coopTilleuls/template-sync
- Package.json settings
- Refer to Live Types in a TypeScript Monorepo and treeshaking-with-tsup - either use
exports
to export theindex.tsx/ts
file or use baseUrl/paths in base tsconfig.json to point to theindex.tsx/ts
file
- Refer to Live Types in a TypeScript Monorepo and treeshaking-with-tsup - either use