@@ -24,12 +24,11 @@ dotnet test test/Altinn.App.Core.Tests/ -v m
2424```
2525
2626** Format code (required before commits):**
27- ``` bash
28- dotnet tool restore
29- dotnet csharpier .
30- ```
27+
28+ Formatting happens automatically when building due to ` CSharpier.MSBuild ` .
3129
3230** Check code formatting:**
31+ Can check formatting manually if a project build is not needed (project build will format code automatically).
3332``` bash
3433dotnet csharpier check .
3534```
@@ -47,6 +46,7 @@ The solution follows a **layered architecture** with feature-based organization:
4746- ** Altinn.App.Core** - Core business logic organized by features
4847- ** Altinn.App.Api** - Web API controllers and HTTP layer
4948- ** Altinn.App.Analyzers** - Code analyzers for consuming applications
49+ - ** Altinn.App.Internal.Analyzers** - Custom code analyzers for Core/Api library development
5050
5151### Key Features (` /src/Altinn.App.Core/Features/ ` )
5252- ** Authentication** - OAuth2, JWT, Maskinporten integration
@@ -63,6 +63,10 @@ The solution follows a **layered architecture** with feature-based organization:
6363- ** OpenTelemetry** for observability
6464- ** xUnit** with FluentAssertions and Moq for testing
6565
66+ ### ADR
67+
68+ We have Architecture Decision Records in the ` /doc/adr/ ` folder.
69+
6670## Development Guidelines
6771
6872### Code Quality
@@ -79,7 +83,7 @@ The solution follows a **layered architecture** with feature-based organization:
7983
8084### Versioning
8185- Uses ** semantic versioning** with MinVer
82- - Avoid breaking changes when possible
86+ - Avoid breaking changes (we plan to release major versions yearly. Some breaking changes can be done inbetween but must be manually verified)
8387- PR titles become release notes
8488
8589### Platform Integrations
@@ -92,6 +96,14 @@ The libraries integrate with:
9296
9397## Common Development Patterns
9498
99+ - Use internal accessibility on types by default
100+ - Use sealed for classes unless we consider inheritance a valid use-case
101+ - Use Nullable Reference Types
102+ - Remember to dispose ` IDisposable ` /` IAsyncDisposable ` instances
103+ - We want to minimize external dependencies
104+ - For HTTP APIs we should have ` ...Request ` and ` ...Response ` DTOs (see ` LookupPersonRequest.cs ` and the corresponding response as an example)
105+ - Types meant to be implemented by apps should be marked with the ` ImplementableByApps ` attribute
106+
95107### Feature Implementation
96108New features should follow the established pattern in ` /src/Altinn.App.Core/Features/ ` :
97109- Feature-specific folder with clear responsibility
@@ -101,11 +113,11 @@ New features should follow the established pattern in `/src/Altinn.App.Core/Feat
101113
102114### Testing
103115- Test projects mirror source structure
104- - Use FluentAssertions for readable assertions
116+ - Prefer xUnit asserts over FluentAssertions
105117- Mock external dependencies with Moq
106118- Include integration tests for platform service interactions
107119
108120### Configuration
109121- Use strongly-typed configuration classes
110122- Register services in DI container properly
111- - Follow existing patterns for options configuration
123+ - Follow existing patterns for options configuration
0 commit comments