-
Notifications
You must be signed in to change notification settings - Fork 0
feat(shared): create Shared class library (#2) #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| # Decision — Shared Library Structure | ||
|
|
||
| **Date:** 2026-02-17 | ||
| **By:** Aragorn | ||
| **Decision:** Design of the IssueManager.Shared library | ||
|
|
||
| ## Context | ||
|
|
||
| Issue #2 required creation of a new `Shared` class library to serve as a common dependency across vertical slices. The library needed to follow the same conventions as existing projects (ServiceDefaults, Api, Web). | ||
|
|
||
| ## Decision | ||
|
|
||
| ### Project Structure | ||
|
|
||
| **Location:** `src/Shared/` | ||
| **Name:** `IssueManager.Shared` | ||
| **Target Framework:** `.NET 10.0` | ||
| **Language Version:** `C# 14.0` | ||
|
|
||
| ### Configuration | ||
|
|
||
| The Shared project uses standard .NET conventions: | ||
| - `Nullable` enabled for null-safety | ||
| - `ImplicitUsings` enabled for cleaner code | ||
| - Root namespace: `IssueManager.Shared` | ||
| - No external NuGet dependencies (uses only .NET BCL) | ||
|
|
||
| ### Content Strategy | ||
|
|
||
| The library begins with a placeholder `Utilities.cs` class. As features are built, the Shared library will contain: | ||
|
|
||
| 1. **Common DTOs** — Shared request/response types across vertical slices | ||
| 2. **Extensions** — Extension methods for common operations | ||
| 3. **Constants** — Application-wide configuration constants | ||
| 4. **Validation Rules** — Reusable FluentValidation rules | ||
| 5. **Domain Types** — Shared enums (e.g., IssueStatus, IssuePriority) | ||
| 6. **Result Types** — Standard Result<T> or OneOf<T> for consistent error handling | ||
|
|
||
| ### Dependency Management | ||
|
|
||
| The Shared library has **zero external dependencies**. It depends only on: | ||
| - .NET 10.0 runtime | ||
| - C# 14.0 language features | ||
|
|
||
| This keeps the library lightweight and ensures no dependency bloat for consuming projects. | ||
|
|
||
| ### No Structure Enforcement Yet | ||
|
|
||
| Subdirectories (Extensions/, Validators/, Models/, Constants/) can be created as needed per feature. Premature structure causes friction; we'll organize organically as code grows. | ||
|
|
||
| ## Rationale | ||
|
|
||
| 1. **Vertical Slice Safety** — Shared library does NOT enforce cross-slice dependencies. Slices use only what they need. | ||
| 2. **No Bloat** — Zero external dependencies makes Shared fast and reliable. | ||
| 3. **Growth Path** — Structure will emerge naturally as patterns appear. | ||
| 4. **Convention Consistency** — Uses same csproj conventions as ServiceDefaults, Api, and Web. | ||
|
|
||
| ## Status | ||
|
|
||
| ✅ **Accepted** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <TargetFramework>net10.0</TargetFramework> | ||
| <LangVersion>14.0</LangVersion> | ||
| <Nullable>enable</Nullable> | ||
| <ImplicitUsings>enable</ImplicitUsings> | ||
| <RootNamespace>IssueManager.Shared</RootNamespace> | ||
| </PropertyGroup> | ||
| </Project> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| namespace IssueManager.Shared; | ||
|
|
||
| /// <summary> | ||
| /// Placeholder utilities class for the Shared library. | ||
| /// This class serves as an entry point for shared utilities and extensions across the IssueManager project. | ||
| /// </summary> | ||
| public static class Utilities | ||
| { | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/Shared/Shared.csproj is missing the
ProjectCapability Include="CanEvaluateItemsWithTargetFramework"item group that exists in the other projects (e.g., src/Api/Api.csproj:18-20, src/ServiceDefaults/ServiceDefaults.csproj:17-19). If this capability is required for consistent tooling/solution evaluation in this repo, please add the sameProjectCapabilityitem group here as well.