Arclight is a modern RESTful Web API built with .NET 10 and Entity Framework Core, following Clean Architecture principles. This project demonstrates a professional setup including automated CI/CD pipelines, database migrations, and strict development workflows.
- Framework: .NET 10 (C# 12)
- ORM: Entity Framework Core
- Database: PostgreSQL (Production) / PostgreSQL (Dev)
- Testing: nUnit
- CI/CD: GitHub Actions
- Security: CodeQL, Dependabot
- Versioning: Semantic Versioning (Tag-based)
The solution is structured to enforce separation of concerns:
Arclight.Application: Contains enterprise logic via services, DTOs, and Interfaces.Arclight.Domain: Contains Entities and Enums. No dependencies on other projects.Arclight.Infrastructure: Handles data access (DbContext), migrations, and external service implementations.Arclight.Api: The entry point. Contains Controllers, Configuration, and Dependency Injection setup.
- .NET 10.0 SDK
- Entity Framework Core Tools (
dotnet tool install --global dotnet-ef) - PostgreSQL
-
Clone the repository
git clone [https://github.com/MaartenVanNimwegen/Arclight.git](https://github.com/MaartenVanNimwegen/Arclight.git) cd Arclight -
Restore dependencies
dotnet restore
-
Configuration Update
appsettings.jsoninArclight.Apiwith your connection string. -
Run the application
dotnet run
The API will be available at
https://localhost:7xxx.
This project uses EF Core Code-First migrations.
-
Apply migrations to local database:
dotnet ef database update --project Arclight.Infrastructure --startup-project Arclight.Api
-
Add a new migration:
dotnet ef migrations add NameOfMigration --project Arclight.Infrastructure --startup-project Arclight.Api
The application includes a DbInitializer that runs automatically in the Development environment.
- If the database is empty, it seeds test data (generated via Bogus) for debugging purposes.
- Check
Program.csandDbInitializer.csto customize this behavior.
We follow GitHub Flow and Conventional Commits.
- Create a Branch: Always branch off
master.feat/new-endpointfix/validation-error
- Commit Messages: Use the Conventional Commits format.
feat(users): add get-by-id endpointfix(db): correct column type in migration
- Pull Request:
- Push to origin.
- Open a PR to
master. - CI Checks: The
PR Validationpipeline must pass. - Merge: Squash & Merge is preferred.
This repository uses GitHub Actions for automation:
| Workflow | Trigger | Description |
|---|---|---|
| PR Validation | Pull Requests | Builds the solution and runs all Unit Tests. Prevents broken code from reaching master. |
| CodeQL Scan | PRs & Schedule | Scans the codebase for security vulnerabilities and code quality issues. |
| Production Release | Tags (v*) |
Triggered when a tag (e.g., v1.0.0) is pushed. Builds the Release artifact and attaches it to the GitHub Release. |
| Dependabot | Weekly | Automatically checks for NuGet package updates and opens PRs. |
To deploy a new version:
- Ensure
masteris up to date. - Create and push a tag:
git tag v1.0.0 git push origin v1.0.0
- The Production Release pipeline will build the artifact with version
1.0.0.