A clear mind, a clear path forward.
ClarusMens is a .NET-based API project that generates structured answers (MVP), learning questions with answers, and quizzes based on user input.
This project is designed to serve as a template for future .NET API projects. It includes:
- Production-ready architecture following modern .NET API best practices
- Comprehensive test infrastructure with unit, integration, and functional tests
- Documentation patterns that ensure maintainability
- Solutions for common .NET 9 issues (such as serialization workarounds)
- CI/CD pipeline configuration ready for enterprise development
To use this project as a template:
- Clone or download this repository
- Rename the solution and projects to match your new API
- Update namespaces, API information, and configuration
- Customize endpoints and models for your specific requirements
- Retain the testing structure and documentation patterns
See Using ClarusMens as a Template for detailed instructions.
- .NET 9.0 SDK or later
- Visual Studio 2022, Visual Studio Code, or Cursor (with C# extensions)
-
Clone the repository
git clone https://github.com/pstackebrandt/clarus-mens.git
-
Navigate to the project directory
cd clarus-mens
-
Build the solution
dotnet build
-
Run the API
cd ClarusMensAPI dotnet run
The API will be available at http://localhost:5209.
Run the full test suite with the Testing configuration:
dotnet test -c Testing
The Testing
configuration is a specialized build configuration optimized for test execution, with separate output directories and test-specific settings.
Note: You may see a warning about no tests in the IntegrationTests project - this is expected and can be ignored.
If you need to configure test execution, you can set environment variables:
$env:CLARUSMENS_TEST_TIMEOUT = 60000 # Set longer timeout (in ms)
dotnet test -c Testing
For more detailed testing options, CI/CD integration details, and environment variables, see the tests README.
This project includes .http
files for testing API endpoints with the REST Client VS Code extension.
- Install the REST Client extension in VS Code/Cursor
- Open
ClarusMensAPI/ClarusMensAPI.http
- Click "Send Request" above any request definition
- View the response in the split window
Example request:
GET http://localhost:5209/api/question?query=hello
You can also test the API using your browser or tools like Postman:
- Question-answer endpoint: http://localhost:5209/api/question?query=hello
- ClarusMensAPI/ - Main API project
- Controllers for API endpoints
- Service implementations
- Data models
For faster development, use:
dotnet watch run
This enables hot reload so you can see changes without manually restarting the application.
This project uses Semantic Versioning. For version update instructions and processes, see VERSIONING.md.
This project is licensed under the Apache 2.0 file in the repository.