{"id":49817580,"url":"https://github.com/zeroalloc-net/zeroalloc.templates","last_synced_at":"2026-05-17T12:01:15.340Z","repository":{"id":357068333,"uuid":"1234863788","full_name":"ZeroAlloc-Net/ZeroAlloc.Templates","owner":"ZeroAlloc-Net","description":"dotnet new Clean Architecture Web API template for the ZeroAlloc.* ecosystem. Source-generated, AOT-safe, zero-allocation through the hot path. Bundles 10 ZA packages + EF Core SQLite + JWT + OpenTelemetry + NetArchTest boundary rules + BDN/NBomber benchmarks.","archived":false,"fork":false,"pushed_at":"2026-05-15T01:57:10.000Z","size":445,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-15T10:13:03.412Z","etag":null,"topics":["aspnetcore","clean-architecture","cqrs","csharp","dotnet","dotnet-new","dotnet-template","native-aot","source-generator","web-api","zero-allocation","zeroalloc"],"latest_commit_sha":null,"homepage":null,"language":"C#","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/ZeroAlloc-Net.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"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":["MarcelRoozekrans","ZeroAlloc-Net"]}},"created_at":"2026-05-10T18:33:09.000Z","updated_at":"2026-05-14T07:45:17.000Z","dependencies_parsed_at":"2026-05-16T11:00:34.934Z","dependency_job_id":null,"html_url":"https://github.com/ZeroAlloc-Net/ZeroAlloc.Templates","commit_stats":null,"previous_names":["zeroalloc-net/zeroalloc.templates"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/ZeroAlloc-Net/ZeroAlloc.Templates","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeroAlloc-Net%2FZeroAlloc.Templates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeroAlloc-Net%2FZeroAlloc.Templates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeroAlloc-Net%2FZeroAlloc.Templates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeroAlloc-Net%2FZeroAlloc.Templates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZeroAlloc-Net","download_url":"https://codeload.github.com/ZeroAlloc-Net/ZeroAlloc.Templates/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZeroAlloc-Net%2FZeroAlloc.Templates/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33100319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["aspnetcore","clean-architecture","cqrs","csharp","dotnet","dotnet-new","dotnet-template","native-aot","source-generator","web-api","zero-allocation","zeroalloc"],"created_at":"2026-05-13T08:10:43.663Z","updated_at":"2026-05-16T11:00:58.603Z","avatar_url":"https://github.com/ZeroAlloc-Net.png","language":"C#","funding_links":["https://github.com/sponsors/MarcelRoozekrans","https://github.com/sponsors/ZeroAlloc-Net"],"categories":[],"sub_categories":[],"readme":"# ZeroAlloc.Templates\n\n`dotnet new` Clean Architecture Web API template for the [ZeroAlloc.\\*](https://github.com/ZeroAlloc-Net) ecosystem. Source-generated, AOT-safe, zero-allocation through the framework hot path.\n\nOne template ships today — `za-clean` — scaffolding a working Web API + EF Core SQLite + JWT + OpenTelemetry, wired with 10 ZA packages (Mediator, Mapping, Validation, Inject, Rest, Resilience, Authorization, Telemetry, ValueObjects, Results), plus NetArchTest boundary rules and BenchmarkDotNet + NBomber benchmark scaffolds.\n\n## Install\n\n```bash\ndotnet new install ZeroAlloc.Templates\n```\n\n## Use\n\n```bash\ndotnet new za-clean -o MyApp\ncd MyApp\ndotnet run --project src/MyApp.Api\n# In another shell:\ncurl http://localhost:5000/healthz\n# → {\"status\":\"ok\"}\n```\n\nThe scaffold ships with:\n- Four layered projects (`Domain`, `Application`, `Infrastructure`, `Api`) with NetArchTest-enforced boundaries\n- 18 passing tests (10 unit + 5 architecture + 3 integration)\n- A BenchmarkDotNet write-pipeline scenario (~2 ms / ~157 KB per request through the full middleware stack on a 2022 i9)\n- An NBomber read-RPS scenario for load testing under sustained concurrency\n- An `AGENTS.md` that orients Claude Code, Cursor, GitHub Copilot, Codex, and Aider to the codebase\n\nFull tour and rationale: [docs/za-clean.md](https://github.com/ZeroAlloc-Net/ZeroAlloc.Templates/blob/main/docs/za-clean.md).\n\n## What's in the box\n\n| Concern | Package | Where it lives |\n|---|---|---|\n| CQRS dispatch | ZA.Mediator | `MyApp.Application` (handlers return `ValueTask\u003cT\u003e`) |\n| Source-generated mapping | ZA.Mapping | `MyApp.Api/Mappings/` |\n| Validation | ZA.Validation (decorative until generator nupkg fix); template ships a hand-rolled validator | `MyApp.Application/CreateOrder/` |\n| Source-generated DI | ZA.Inject | `[Scoped]` / `[Singleton]` / `[Transient]` on services |\n| Typed HTTP client | ZA.Rest + ZA.Rest.SystemTextJson | `MyApp.Infrastructure/External/` |\n| Resilience | ZA.Resilience + ZA.Rest.Resilience | Bridged into the shipping client |\n| Smart-ctor IDs/money | ZA.ValueObjects | `MyApp.Domain/ValueObjects/` |\n| `Result\u003cT, Error\u003e` | ZA.Results | Across Domain + Application boundaries |\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n\n---\n\n## Development\n\nFor maintainers of this repo (not for adopters of the template).\n\n### Required GitHub repo secrets\n\nThe release pipeline requires two secrets at `Settings → Secrets and variables → Actions`. Both are configured at org level so they inherit:\n\n- `RELEASE_PLEASE_TOKEN` — Personal Access Token with `contents:write` + `pull-requests:write` + `workflow:write`. Needed because the default `GITHUB_TOKEN` can't trigger downstream workflows from release-please PRs.\n- `NUGET_API_KEY` — push-only API key from nuget.org, scoped to `ZeroAlloc.Templates`.\n\n### Drift-guard for duplicated config\n\nThree files are duplicated at the repo root and under `content/za-clean/`:\n\n- `Directory.Build.props`\n- `Directory.Packages.props`\n- `global.json`\n\nThe root copies serve the template-tooling projects; the `content/` copies serve the scaffolded app standalone. **CI enforces they stay identical** via a drift-guard step. When bumping a package version or SDK pin, edit both copies.\n\n### Build + test\n\n```bash\ndotnet build content/za-clean/MyApp.slnx\ndotnet test content/za-clean/MyApp.slnx\ndotnet pack ZeroAlloc.Templates.csproj -o ./nupkg\n\n# Full smoke test (install + scaffold + build + test, ~25 s):\ndotnet test tests/ZeroAlloc.Templates.SmokeTests\n\n# Skip the slow smoke test during inner-loop dev:\ndotnet test --filter \"Category!=Slow\"\n```\n\nSee [AGENTS.md](AGENTS.md) for the AI-agent orientation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeroalloc-net%2Fzeroalloc.templates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeroalloc-net%2Fzeroalloc.templates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeroalloc-net%2Fzeroalloc.templates/lists"}