Skip to content

docs: update the readme file #19

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

docs: update the readme file #19

wants to merge 1 commit into from

Conversation

osm-Jatin
Copy link
Contributor

@osm-Jatin osm-Jatin commented Apr 29, 2025

Task ID

REST-1343

Description

  • Update the README file.

Summary by CodeRabbit

  • Documentation
    • Completely overhauled and expanded the README with a detailed project overview, setup instructions, feature descriptions, technology stack, configuration guidance, API documentation access, logging and health check endpoints, contribution guidelines, and licensing information.

Copy link

coderabbitai bot commented Apr 29, 2025

Walkthrough

The README.md file was entirely rewritten, evolving from a single-line title to a detailed documentation resource. The new version introduces the project, outlines its features, lists technologies and dependencies, and provides step-by-step setup instructions. It explains the project structure, configuration, API documentation, logging, health checks, contribution guidelines, and licensing. No changes were made to the codebase or exported entities; only the documentation was updated.

Changes

File(s) Change Summary
README.md Replaced the minimal placeholder with comprehensive documentation covering features, setup, architecture, configuration, and more.

Poem

In the warren of code, a README grew tall,
From a whisper of text to a guide for us all.
With features and steps, it charts out the way,
For every new hopper who wishes to play.
Now, setup is simple, the structure is clear—
A rabbit’s delight for all who come near! 🐇📚


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@osm-Jatin osm-Jatin self-assigned this Apr 29, 2025
@osm-Jatin osm-Jatin requested a review from sameer-s-b April 29, 2025 04:02
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (5)
README.md (5)

1-4: Consider adding project badges and a Table of Contents
Including badges (build status, license, NuGet version) at the top will improve visibility and credibility. A Table of Contents just below the title would help users quickly navigate this comprehensive README.


39-52: Normalize code block indentation
The bash commands under Getting Started include leading spaces, which can introduce unwanted whitespace when users copy-paste. Removing those spaces makes the commands cleaner:

@@ Getting Started (bash snippet)
-  git clone https://github.com/OsmosysSoftware/dotnet-foundation-v2.git
-  cd dotnet-foundation-v2
+git clone https://github.com/OsmosysSoftware/dotnet-foundation-v2.git
+cd dotnet-foundation-v2

118-124: Fix missing article in Logging section
The bullet point is missing “the” before “console”:

- Logs are written to console and also to a **file** (`Logs/log-.txt`)
+ Logs are written to the console and also to a **file** (`Logs/log-.txt`)
🧰 Tools
🪛 LanguageTool

[uncategorized] ~122-~122: You might be missing the article “the” here.
Context: ...uctured logging: - Logs are written to console and also to a file (Logs/log-.txt...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


99-103: Include a sample .env file
Under Configuration, it would be helpful to provide an .env.example snippet or link to one. This spares users from guessing required environment variable names:

# .env.example
DB_CONNECTION_STRING=mysql://user:pass@localhost:3306/dbname
JWT_SECRET=your_jwt_secret_here

153-157: Remove trailing horizontal rule
The final --- after the License section is unnecessary and can be removed to keep the document tidy.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c0fc6ed and 326581c.

📒 Files selected for processing (1)
  • README.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md

[uncategorized] ~122-~122: You might be missing the article “the” here.
Context: ...uctured logging: - Logs are written to console and also to a file (Logs/log-.txt...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

🔇 Additional comments (1)
README.md (1)

130-134: Verify Health Checks UI endpoint
You mention the Health Checks UI at /health. If you’re using the default HealthChecks UI package, it might be exposed at /healthchecks-ui or another path. Please confirm the correct URL in your code or update the README accordingly.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (4)
README.md (4)

67-71: Database Migration Step Enhancement
Consider adding a note that contributors may need to install the EF Core CLI globally if it’s not already available:

+# If you haven't installed the EF Core CLI yet:
+dotnet tool install --global dotnet-ef

79-79: Clarify Default Hosting URLs
By default, .NET serves HTTPS on port 5001. It may be helpful to mention both HTTP (http://localhost:5000) and HTTPS (https://localhost:5001) endpoints or direct users to check launchSettings.json.


85-91: Project Structure Formatting
Ensure consistent indentation in the code block under src/ for better readability. For example:

src/
  ├── Api/   # ...
  └── Core/  # ...

122-122: Grammar Improvement in Logging Section
Include the definite article “the” before “console” for grammatical correctness:

- Logs are written to console and also to a **file** (`Logs/log-.txt`)
+ Logs are written to the console and to a **file** (`Logs/log-.txt`)
🧰 Tools
🪛 LanguageTool

[uncategorized] ~122-~122: You might be missing the article “the” here.
Context: ...uctured logging: - Logs are written to console and also to a file (Logs/log-.txt...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 326581c and 6f5554e.

📒 Files selected for processing (1)
  • README.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md

[uncategorized] ~122-~122: You might be missing the article “the” here.
Context: ...uctured logging: - Logs are written to console and also to a file (Logs/log-.txt...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

🔇 Additional comments (6)
README.md (6)

1-4: Strong Introduction
The introduction and project tagline are concise and effectively communicate the purpose of the boilerplate.


9-22: Features Section is Well-Structured
The checkmarks and bold highlights make the feature list easy to scan and understand.


25-36: Technologies & Packages Clarity
The list of frameworks and NuGet packages provides a clear overview of the tech stack dependencies.


43-53: Prerequisites & Clone Instructions
Commands for cloning and navigating to the repo are accurate and straightforward.


138-147: Clear Contribution Guidelines
The contributing section follows standard practices and is easy for new contributors to follow.


151-154: License Declaration
The MIT license is correctly referenced and formatted.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
README.md (1)

122-122: Minor grammar fix – add the definite article.

- Logs are written to console and also to a **file** (`Logs/log-.txt`)
+ Logs are written to the console and also to a **file** (`Logs/log-.txt`)
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6f5554e and a75c2dd.

📒 Files selected for processing (1)
  • README.md (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#1
File: src/Api/Program.cs:33-35
Timestamp: 2025-03-11T04:19:59.613Z
Learning: The null checking for database connection strings in src/Api/Program.cs is intentionally handled in PR #2 (https://github.com/OsmosysSoftware/dotnet-foundation-v2/pull/2) rather than in the initial base setup PR.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#19
File: README.md:99-103
Timestamp: 2025-07-07T03:19:14.506Z
Learning: In the dotnet-foundation-v2 project README, DotNetEnv was incorrectly listed as a technology being used when it's not actually implemented. The project uses standard ASP.NET Core configuration with appsettings.json files instead.
README.md (16)
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#19
File: README.md:99-103
Timestamp: 2025-07-07T03:19:14.506Z
Learning: In the dotnet-foundation-v2 project README, DotNetEnv was incorrectly listed as a technology being used when it's not actually implemented. The project uses standard ASP.NET Core configuration with appsettings.json files instead.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#8
File: src/Api/appsettings.Development.json:19-19
Timestamp: 2025-03-05T07:10:16.015Z
Learning: In the .NET Foundation project, JWT key placeholders with clear instructions (like "PLACEHOLDER_REPLACE_WITH_STRONG_KEY_MIN_32CHARS_BEFORE_USE") are intentionally kept in development configuration files (appsettings.Development.json) to guide developers on required replacements.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#17
File: src/Api/Models/Common/BaseResponse.cs:1-4
Timestamp: 2025-04-22T11:39:59.897Z
Learning: The dotnet-foundation-v2 project has ImplicitUsings enabled in the project file (`<ImplicitUsings>enable</ImplicitUsings>`), which automatically includes common namespaces like System.Linq throughout the project, making explicit imports unnecessary.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#17
File: src/Api/appsettings.json:18-23
Timestamp: 2025-04-22T11:43:11.562Z
Learning: In the .NET Foundation V2 project, JWT key placeholders in configuration files are handled through separate issues rather than being addressed directly in feature PRs.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#7
File: src/Api/Controllers/UserController.cs:21-47
Timestamp: 2025-03-04T06:15:30.305Z
Learning: In the dotnet-foundation-v2 project, stack traces are currently being kept in API responses for development purposes, though they should be removed before production deployment.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#3
File: src/Api/Migrations/20250220183440_InitialCreate.cs:0-0
Timestamp: 2025-03-01T10:38:51.061Z
Learning: For the dotnet-foundation-v2 project, the suggestion to add a unique constraint on the email field in migrations is outdated according to the user.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#2
File: src/Api/Filters/CustomExceptionFilter.cs:43-47
Timestamp: 2025-03-11T04:53:23.826Z
Learning: In the DotNet Foundation project, complete error messages should not be displayed in API responses for security reasons. Generic error messages should be used instead.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#17
File: src/Api/Models/Common/BaseResponse.cs:1-4
Timestamp: 2025-04-22T11:39:59.897Z
Learning: In the dotnet-foundation-v2 project, implicit usings are enabled, making explicit import of System.Linq unnecessary, as the project builds successfully without it.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#15
File: src/Api/appsettings.json:18-23
Timestamp: 2025-04-22T08:36:40.853Z
Learning: In the .NET Foundation project, sensitive configuration values like JWT keys should be stored securely using secret files or environment variables instead of configuration files, especially for production environments.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#2
File: src/Core/DataContext/DatabaseContext.cs:0-0
Timestamp: 2025-03-11T13:28:33.599Z
Learning: In the dotnet-foundation-v2 project, CreatedAt properties in entity models like User.cs and Role.cs are initialized with DateTime.UtcNow by default and have private setters, so they don't need to be set in the DatabaseContext.UpdateTimestamps() method.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#8
File: src/Api/Controllers/UserController.cs:108-118
Timestamp: 2025-03-05T07:08:56.930Z
Learning: In the DotNetFoundation project, error handling is centralized using the CustomExceptionFilter, which catches exceptions like NotFoundException and returns appropriate HTTP status codes, rather than handling them individually in each controller method.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#1
File: src/Api/Program.cs:33-35
Timestamp: 2025-03-11T04:19:59.613Z
Learning: The null checking for database connection strings in src/Api/Program.cs is intentionally handled in PR #2 (https://github.com/OsmosysSoftware/dotnet-foundation-v2/pull/2) rather than in the initial base setup PR.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#8
File: src/Api/Filters/CustomExceptionFilter.cs:18-56
Timestamp: 2025-03-05T07:16:33.909Z
Learning: In the DotNet Foundation project, stack traces should only be included in 500 (Internal Server Error) responses, not in other error responses like 401, 404, 400, or 409.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#2
File: src/Api/Filters/CustomExceptionFilter.cs:51-55
Timestamp: 2025-03-01T05:12:01.689Z
Learning: In this project, exception details should be fully displayed in API responses as per the developer's preference, rather than using generic error messages.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#1
File: src/Api/Api.csproj:0-0
Timestamp: 2025-03-11T06:14:46.705Z
Learning: For the dotnet-foundation-v2 project, .NET 8 should be used as the target framework as it is the Long Term Support (LTS) version.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#16
File: src/Api/Controllers/RoleController.cs:31-50
Timestamp: 2025-04-22T10:33:39.358Z
Learning: In the DotNet Foundation V2 project, validation like checking pagination parameters (pageNumber, pageSize) is handled at the service layer rather than in controllers. The service layer throws appropriate exceptions (e.g., BadRequestException) that are caught by the centralized exception handling mechanism.
🪛 LanguageTool
README.md

[uncategorized] ~122-~122: You might be missing the article “the” here.
Context: ...uctured logging: - Logs are written to console and also to a file (Logs/log-.txt...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

🔇 Additional comments (3)
README.md (3)

34-34: 👍 DotNetEnv entry correctly replaced with appsettings.json.
The technologies list now matches the actual implementation, removing the earlier inconsistency.


79-79: Verify the documented base URL / port.
The template launchSettings.json often maps HTTPS to https://localhost:5001 and HTTP to http://localhost:5000. If your project runs on a different port (e.g., 5176), update this line to avoid setup confusion.


132-134: Confirm the Health Check UI endpoint.
Many setups expose the UI at /healthchecks-ui; the path /health is typically the raw JSON probe. Double-check the configured route in Program.cs and Serilog/HealthChecks configuration to ensure the README is accurate.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
README.md (2)

101-103: Tighten wording around configuration overrides
The phrase “override values per-environment with appsettings.json files” can read ambiguously. Consider explicitly naming the pattern (appsettings.{Environment}.json) so newcomers don’t wonder where the overrides live.

-The project relies on **appsettings.json** for hierarchical configuration settings (override values per-environment with `appsettings.json` files).
+The project relies on **appsettings.json** for hierarchical configuration settings (e.g., `appsettings.Development.json`, `appsettings.Production.json`).

122-123: Minor grammar polish for logging bullet
Insert the determiner “the” for smoother reading.

-Logs are written to console and also to a **file** (`Logs/log-.txt`)
+Logs are written to **the** console and also to a **file** (`Logs/log-.txt`)
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a75c2dd and b6374f1.

📒 Files selected for processing (1)
  • README.md (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#1
File: src/Api/Program.cs:33-35
Timestamp: 2025-03-11T04:19:59.613Z
Learning: The null checking for database connection strings in src/Api/Program.cs is intentionally handled in PR #2 (https://github.com/OsmosysSoftware/dotnet-foundation-v2/pull/2) rather than in the initial base setup PR.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#19
File: README.md:99-103
Timestamp: 2025-07-07T03:19:14.506Z
Learning: In the dotnet-foundation-v2 project README, DotNetEnv was incorrectly listed as a technology being used when it's not actually implemented. The project uses standard ASP.NET Core configuration with appsettings.json files instead.
README.md (17)
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#19
File: README.md:99-103
Timestamp: 2025-07-07T03:19:14.506Z
Learning: In the dotnet-foundation-v2 project README, DotNetEnv was incorrectly listed as a technology being used when it's not actually implemented. The project uses standard ASP.NET Core configuration with appsettings.json files instead.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#8
File: src/Api/appsettings.Development.json:19-19
Timestamp: 2025-03-05T07:10:16.015Z
Learning: In the .NET Foundation project, JWT key placeholders with clear instructions (like "PLACEHOLDER_REPLACE_WITH_STRONG_KEY_MIN_32CHARS_BEFORE_USE") are intentionally kept in development configuration files (appsettings.Development.json) to guide developers on required replacements.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#17
File: src/Api/Models/Common/BaseResponse.cs:1-4
Timestamp: 2025-04-22T11:39:59.897Z
Learning: The dotnet-foundation-v2 project has ImplicitUsings enabled in the project file (`<ImplicitUsings>enable</ImplicitUsings>`), which automatically includes common namespaces like System.Linq throughout the project, making explicit imports unnecessary.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#17
File: src/Api/appsettings.json:18-23
Timestamp: 2025-04-22T11:43:11.562Z
Learning: In the .NET Foundation V2 project, JWT key placeholders in configuration files are handled through separate issues rather than being addressed directly in feature PRs.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#7
File: src/Api/Controllers/UserController.cs:21-47
Timestamp: 2025-03-04T06:15:30.305Z
Learning: In the dotnet-foundation-v2 project, stack traces are currently being kept in API responses for development purposes, though they should be removed before production deployment.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#2
File: src/Api/Filters/CustomExceptionFilter.cs:43-47
Timestamp: 2025-03-11T04:53:23.826Z
Learning: In the DotNet Foundation project, complete error messages should not be displayed in API responses for security reasons. Generic error messages should be used instead.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#3
File: src/Api/Migrations/20250220183440_InitialCreate.cs:0-0
Timestamp: 2025-03-01T10:38:51.061Z
Learning: For the dotnet-foundation-v2 project, the suggestion to add a unique constraint on the email field in migrations is outdated according to the user.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#17
File: src/Api/Models/Common/BaseResponse.cs:1-4
Timestamp: 2025-04-22T11:39:59.897Z
Learning: In the dotnet-foundation-v2 project, implicit usings are enabled, making explicit import of System.Linq unnecessary, as the project builds successfully without it.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#15
File: src/Api/appsettings.json:18-23
Timestamp: 2025-04-22T08:36:40.853Z
Learning: In the .NET Foundation project, sensitive configuration values like JWT keys should be stored securely using secret files or environment variables instead of configuration files, especially for production environments.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#2
File: src/Core/DataContext/DatabaseContext.cs:0-0
Timestamp: 2025-03-11T13:28:33.599Z
Learning: In the dotnet-foundation-v2 project, CreatedAt properties in entity models like User.cs and Role.cs are initialized with DateTime.UtcNow by default and have private setters, so they don't need to be set in the DatabaseContext.UpdateTimestamps() method.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#8
File: src/Api/Controllers/UserController.cs:108-118
Timestamp: 2025-03-05T07:08:56.930Z
Learning: In the DotNetFoundation project, error handling is centralized using the CustomExceptionFilter, which catches exceptions like NotFoundException and returns appropriate HTTP status codes, rather than handling them individually in each controller method.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#1
File: src/Api/Program.cs:33-35
Timestamp: 2025-03-11T04:19:59.613Z
Learning: The null checking for database connection strings in src/Api/Program.cs is intentionally handled in PR #2 (https://github.com/OsmosysSoftware/dotnet-foundation-v2/pull/2) rather than in the initial base setup PR.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#8
File: src/Api/Filters/CustomExceptionFilter.cs:18-56
Timestamp: 2025-03-05T07:16:33.909Z
Learning: In the DotNet Foundation project, stack traces should only be included in 500 (Internal Server Error) responses, not in other error responses like 401, 404, 400, or 409.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#2
File: src/Api/Filters/CustomExceptionFilter.cs:51-55
Timestamp: 2025-03-01T05:12:01.689Z
Learning: In this project, exception details should be fully displayed in API responses as per the developer's preference, rather than using generic error messages.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#8
File: src/Core/Services/UserService.cs:144-152
Timestamp: 2025-03-05T08:12:34.130Z
Learning: In the UserService class, the BCrypt cost/work factor should be parameterized and made configurable through application settings rather than using the default value (10). This can be done by:
1. Injecting IConfiguration in the UserService constructor
2. Reading the work factor from configuration (e.g., "PasswordSecurity:BCryptWorkFactor")
3. Using this value in the HashPassword method: BCrypt.Net.BCrypt.HashPassword(password, workFactor)
4. Adding the appropriate configuration in appsettings.json

This approach provides flexibility to adjust password hashing security requirements without recompiling the application.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#1
File: src/Api/Api.csproj:0-0
Timestamp: 2025-03-11T06:14:46.705Z
Learning: For the dotnet-foundation-v2 project, .NET 8 should be used as the target framework as it is the Long Term Support (LTS) version.
Learnt from: osm-Jatin
PR: OsmosysSoftware/dotnet-foundation-v2#16
File: src/Api/Controllers/RoleController.cs:31-50
Timestamp: 2025-04-22T10:33:39.358Z
Learning: In the DotNet Foundation V2 project, validation like checking pagination parameters (pageNumber, pageSize) is handled at the service layer rather than in controllers. The service layer throws appropriate exceptions (e.g., BadRequestException) that are caught by the centralized exception handling mechanism.
🪛 LanguageTool
README.md

[uncategorized] ~122-~122: You might be missing the article “the” here.
Context: ...uctured logging: - Logs are written to console and also to a file (Logs/log-.txt...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)

🔇 Additional comments (2)
README.md (2)

34-36: Configuration section now accurately reflects reality – nice cleanup
Removing the DotNetEnv reference and explicitly calling out appsettings.json avoids the confusion we discussed earlier.


79-80: Verify HTTPS port in the sample URL
https://localhost:5000 is unusual—Kestrel’s default HTTPS port is 5001 (with 5000 for plain HTTP). Double-check your launchSettings.json or ASPNETCORE_URLS to ensure the documented URL actually matches the out-of-box experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant