{"id":16039983,"url":"https://github.com/sonofmagic/monorepo-template","last_synced_at":"2026-05-03T18:06:03.845Z","repository":{"id":104058606,"uuid":"560956355","full_name":"sonofmagic/monorepo-template","owner":"sonofmagic","description":"icebreaker's monorepo template","archived":false,"fork":false,"pushed_at":"2026-02-22T00:27:34.000Z","size":5697,"stargazers_count":44,"open_issues_count":1,"forks_count":7,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-22T02:26:30.670Z","etag":null,"topics":["action","changesets","docker","husky","monorepo","pnpm","turbo","turborepo","vscode"],"latest_commit_sha":null,"homepage":"https://monorepo.icebreaker.top","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sonofmagic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":["sonofmagic"],"custom":["https://github.com/sonofmagic/sponsors"]}},"created_at":"2022-11-02T16:18:16.000Z","updated_at":"2026-02-22T00:27:38.000Z","dependencies_parsed_at":"2024-01-14T13:30:42.239Z","dependency_job_id":"2c0a6dc7-de71-4277-afef-8c2fd12c7589","html_url":"https://github.com/sonofmagic/monorepo-template","commit_stats":null,"previous_names":["sonofmagic/monorepo-template"],"tags_count":224,"template":true,"template_full_name":null,"purl":"pkg:github/sonofmagic/monorepo-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonofmagic%2Fmonorepo-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonofmagic%2Fmonorepo-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonofmagic%2Fmonorepo-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonofmagic%2Fmonorepo-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sonofmagic","download_url":"https://codeload.github.com/sonofmagic/monorepo-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sonofmagic%2Fmonorepo-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29810416,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T03:30:18.102Z","status":"ssl_error","status_checked_at":"2026-02-25T03:30:17.799Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["action","changesets","docker","husky","monorepo","pnpm","turbo","turborepo","vscode"],"created_at":"2024-10-08T23:09:20.281Z","updated_at":"2026-05-03T18:06:03.839Z","avatar_url":"https://github.com/sonofmagic.png","language":"TypeScript","funding_links":["https://github.com/sponsors/sonofmagic","https://github.com/sonofmagic/sponsors"],"categories":[],"sub_categories":[],"readme":"# monorepo-template\n\n[![codecov](https://codecov.io/gh/sonofmagic/monorepo-template/branch/main/graph/badge.svg?token=mWA3D53rSl)](https://codecov.io/gh/sonofmagic/monorepo-template)\n\nEnglish | [中文版本](README.zh-CN.md)\n\n\u003e A modern pnpm + Turbo Repo + Changesets starter that helps you bootstrap production-ready monorepos quickly.\n\n## Overview\n\nmonorepo-template is a production-oriented pnpm + Turbo monorepo template. It ships with unified build, test, release, linting, and commit conventions, making it ideal for teams maintaining multiple deployable apps alongside reusable packages.\n\n## Key Features\n\n- **Modular Architecture**: Template sources live under `templates/` while reusable tooling lives in `packages/`, keeping responsibilities clear.\n- **Centralized Scaffolding Assets**: `@icebreakers/monorepo-templates` packages templates and assets for both `monorepo` and `create-icebreaker`.\n- **Unified Toolchain**: pnpm workspaces, Turbo task pipelines, Vitest, and Changesets streamline the entire lifecycle from development to release.\n- **Engineering Standards**: ESLint, Stylelint, Husky, and Commitlint keep code quality high and commit messages consistent.\n- **Extensible Template**: Helper scripts (`script:init`, `script:sync`, `script:clean`, etc.) from `repoctl` keep dependencies and scaffolding aligned. `repo` is the primary command, while `repoctl`, `rc`, and `@icebreakers/monorepo` remain compatibility entrypoints.\n- **CI/CD Ready**: Sample GitHub Actions configuration, Codecov integration, and `secrets.NPM_TOKEN` support automated publishing and coverage reporting.\n\n## Quick Start\n\n1. **Prepare environment**: Ensure Node.js \u003e= 20 and run `corepack enable` so pnpm is available.\n2. **Install dependencies**: Run `pnpm install` to fetch every workspace dependency.\n3. **Bootstrap repo defaults**: Run `pnpm setup` to apply the recommended workspace metadata and tooling setup.\n4. **Create the next package or app**: Run `pnpm new my-package` for the guided flow.\n5. **Local development**: Use `pnpm dev` to launch Turbo parallel dev scripts and iterate within each app.\n6. **Build and verify**: Run `pnpm check`, `pnpm build`, `pnpm test`, and `pnpm lint`.\n7. **Template cleanup (optional)**: Use `pnpm clean:repo` to prune sample packages when personalising the template.\n\n### Bootstrap shortcuts\n\n- Guided repo setup:\n  - `pnpm setup`\n  - `pnpm new my-package`\n  - `pnpm check`\n- Direct CLI equivalents:\n  - `pnpm exec repo setup`\n  - `pnpm exec repo new my-package`\n  - `pnpm exec repo check`\n- Zero-install cleanup on a fresh clone: `pnpm dlx repo@latest clean --yes` (add `--include-private` to keep private packages in scope).\n  `repoctl` is still supported, but `repo` is now the primary recommendation. `rc` is intentionally not the primary recommendation because short global commands are easier to collide with other CLIs.\n- One-liner scaffold: `pnpm create icebreaker` or `npm create icebreaker@latest` enters interactive mode, asks for the target directory, and lets you select which templates to keep. Use `--templates tsdown,vue-hono` or `--templates 1,3` to preselect.\n\n## Repository Layout\n\n```text\ntemplates/\n  cli/          # CLI application scaffold\n  client/       # Web client (e.g., Vue/React)\n  server/       # Server or API layer\n  vitepress/    # Static site or documentation portal\n  tsdown/       # Library template powered by tsdown\n  vue-lib/      # Vue component library template\npackages/\n  monorepo/           # @icebreakers/monorepo compatibility package\n  repoctl/            # package name, exports the recommended `repo` command\n  create-icebreaker/  # npm create flow\n  monorepo-templates/ # template and asset bundle for npm\n```\n\n- `templates/cli`: Sample CLI app scaffold.\n- `templates/client`: Sample rich web client application.\n- `templates/server`: Entry point for server or API services.\n- `templates/vitepress`: Static marketing or documentation site starter.\n- `templates/tsdown`: Library template powered by tsdown.\n- `templates/vue-lib`: Vue component library template.\n- `packages/*`: Reusable packages and scaffolding shared across apps.\n- Root configuration files (`turbo.json`, `tsconfig.json`, `eslint.config.js`, etc.) enforce consistent settings across the monorepo.\n\n## Common Scripts\n\n| Command                       | Description                                                          |\n| ----------------------------- | -------------------------------------------------------------------- |\n| `pnpm install`                | Install workspace dependencies.                                      |\n| `pnpm dev`                    | Run every workspace exposing a `dev` script in parallel.             |\n| `pnpm build`                  | Execute a repository-wide build through Turbo.                       |\n| `pnpm test` / `pnpm test:dev` | Run Vitest once or in watch mode.                                    |\n| `pnpm lint`                   | Apply ESLint and Stylelint checks across the monorepo.               |\n| `pnpm changeset`              | Create an interactive Changeset for version bumps.                   |\n| `pnpm publish-packages`       | Build, lint, test, then version and publish changed packages.        |\n| `pnpm setup`                  | Bootstrap recommended workspace metadata and tooling.                |\n| `pnpm new \u003cname\u003e`             | Create a new package or app with the guided flow.                    |\n| `pnpm check`                  | Run recommended local verification.                                  |\n| `pnpm exec repo setup`        | Direct CLI equivalent of `pnpm setup`.                               |\n| `pnpm exec repo new`          | CLI entrypoint for package/app creation.                             |\n| `pnpm exec repo check`        | CLI entrypoint for local verification.                               |\n| `pnpm script:init`            | Initialise template settings via the `repoctl` compatibility script. |\n| `pnpm script:sync`            | Synchronise repo assets and helper scripts via `repoctl`.            |\n| `pnpm script:clean`           | Remove sample packages and generated artifacts.                      |\n| `pnpm script:mirror`          | Apply the VS Code binary mirror compatibility shortcut.              |\n\n## Template Workflow\n\n- Use `pnpm create icebreaker` to scaffold a trimmed workspace in a new directory.\n- In an existing workspace, use `pnpm setup`, `pnpm new`, and `pnpm check` as the default maintenance path.\n- Install dependencies and start development with `pnpm install` and `pnpm dev`.\n- Add or remove apps/packages as your workspace evolves.\n\n## Release \u0026 Versioning\n\nLeverage Changesets plus GitHub Actions for automated versioning:\n\n1. Capture changes with `pnpm changeset`, marking each update as patch, minor, or major.\n2. After merging, run `pnpm publish-packages` locally or let CI publish from the `main` branch.\n3. Configure `secrets.NPM_TOKEN` in GitHub to allow npm publishing.\n\n## Quality Assurance\n\n- **Code style**: `.editorconfig` enforces two-space indentation and LF line endings, while ESLint and Stylelint maintain consistency across packages.\n- **Commit hooks**: Husky and lint-staged run staged-file ESLint/Stylelint autofixes before commits.\n- **Testing \u0026 coverage**: Run `pnpm test -- --coverage` to export coverage reports into the `coverage/` directory.\n- **Staying current**: Use `npx repo@latest` to upgrade this template when new features ship. `npx repoctl@latest` remains supported for compatibility.\n\n## More Resources\n\n- Documentation: https://monorepo.icebreaker.top/\n- Contributing guide: See `CONTRIBUTING.md` for workflow details.\n- Code of Conduct: Review `CODE_OF_CONDUCT.md` to understand community expectations.\n- Security policy: Follow `SECURITY.md` to report security issues.\n- License: Refer to `LICENSE` for the full open-source license text.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonofmagic%2Fmonorepo-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsonofmagic%2Fmonorepo-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsonofmagic%2Fmonorepo-template/lists"}