Ready for production projects

Launch your next .NET service with structure and confidence.

This layout captures proven patterns from the .NET ecosystem and blends them with modern engineering practices. Fork it, adapt it, and ship services that scale without wrestling your repository.

📁

Curated layout

Incorporates battle-tested conventions for API, worker, CLI, and library projects.

⚙️

Automation ready

Scripts, build, and deployment folders keep pipelines organized and reproducible.

🧪

Testing first

Separate `tests` solutions simplify unit vs. integration boundaries and CI orchestration.

Repository Blueprint

Every directory is intentional. Use this map as a reference while you onboard teammates or start a new service.

/src

Product code

Where your production code lives. Keep each app or service in its own folder. Companion README documents upcoming features and architectural decisions.

/tests

Quality gate

Housing for unit, integration, and acceptance suites. Split your test projects by domain to keep feedback loops focused.

/build

Automation

Custom MSBuild targets, packaging steps, and CI configuration land here. Keep build logic close to the repo and versioned with code.

/scripts

Tooling

Utilities for bootstrapping environments, linting, database tasks, or developer ergonomics. Good scripts save hours every sprint.

/deployments

Operations

Infrastructure-as-code for Kubernetes, Terraform, Docker Compose, and other delivery targets. Parameterize environments but keep a single source of truth.

/docs

Knowledge base

Product specs, ADRs, onboarding guides, and user manuals. Document once, reuse everywhere.

/examples

Showcase

Optional sample apps illustrating best practices or demonstrating your library’s API. Great for quick smoke tests.

/packages

Dependencies

Versions of NuGet packages, local feeds, or binary drops that must be checked in for reproducibility. Use sparingly.

Getting Started

Whether you are bootstrapping a new microservice or contributing to a monorepo, these tips accelerate your first commits.

Install prerequisites

Make sure the latest .NET SDK, Node (for SPA backends), and Docker (if needed) are ready to go. The `scripts` folder includes helper shell scripts to bootstrap environments.

  • Install the .NET SDK version pinned in `global.json`.
  • Restore tools: run `dotnet tool restore` at repo root.
  • Configure secrets locally with your team’s guidance.

Clone the layout

Use this repository as a template. Update project names under `src` and corresponding test projects to match your solution naming conventions.

  • Clone or `Use this template` on GitHub.
  • Run `dotnet restore` to pull dependencies.
  • Adjust solution files inside `example.sln` or create new ones.

Automate early

Keep build and deploy reproducible. Populate `build/` with custom MSBuild targets or Cake scripts and wire them into CI.

  • Add GitHub Actions or Azure DevOps pipelines under `.github`.
  • Use `deployments/` to codify infrastructure.
  • Run smoke tests (`tests/`) on every PR.

Helpful references

.NET SDK multi-targeting GitHub Actions for .NET ADR templates Docker multi-stage builds Infrastructure as Code

Build resilient services with a thoughtful foundation.

Start with a clean layout, evolve with your team, and share improvements back with the community. Contributions are welcome—PRs that document real workflows are especially valuable.