{"id":24813521,"url":"https://github.com/coderixc/triangleapp","last_synced_at":"2026-04-28T21:34:25.498Z","repository":{"id":274908365,"uuid":"924112064","full_name":"Coderixc/TriangleApp","owner":"Coderixc","description":"Dotnet core with DI , MVC , Validation","archived":false,"fork":false,"pushed_at":"2025-01-30T03:30:36.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-30T04:23:12.083Z","etag":null,"topics":["apsi","asp-net-core","cplusplus","csharp","dotnet","dotnet-core","dotnet-coredotnet","dotnet-framework","mvc","restful-api","web","winforms"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Coderixc.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-29T12:46:04.000Z","updated_at":"2025-01-30T03:30:39.000Z","dependencies_parsed_at":"2025-01-30T04:33:20.959Z","dependency_job_id":null,"html_url":"https://github.com/Coderixc/TriangleApp","commit_stats":null,"previous_names":["coderixc/triangleapp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Coderixc%2FTriangleApp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Coderixc%2FTriangleApp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Coderixc%2FTriangleApp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Coderixc%2FTriangleApp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Coderixc","download_url":"https://codeload.github.com/Coderixc/TriangleApp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245509254,"owners_count":20626941,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apsi","asp-net-core","cplusplus","csharp","dotnet","dotnet-core","dotnet-coredotnet","dotnet-framework","mvc","restful-api","web","winforms"],"created_at":"2025-01-30T15:25:50.141Z","updated_at":"2026-04-28T21:34:25.469Z","avatar_url":"https://github.com/Coderixc.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Triangle Type Determination Program\n\n## Project Overview\nThis project is a simple yet structured program to determine the type of a triangle based on its three side lengths. The solution follows clean and maintainable code practices with a focus on readability, error handling, and scalability.\n\n## Problem Statement\n![image](https://github.com/user-attachments/assets/e512ac96-bf11-4cdd-943b-d55ce4a1861f)\n\n\n### Key Features\n- **Triangle Classification:** Identifies if a triangle is Equilateral, Isosceles, or Scalene.\n- **Input Validation:** Ensures that user inputs form a valid triangle.\n- **Clean Architecture:** Follows the MVC (Model-View-Controller) design pattern for clear separation of responsibilities.\n- **Testable Code:** will add this .\n\n---\n\n## How to Run the Project\n1. Clone this repository to your local machine.\n2. Open the project in **Visual Studio**.\n3. Build the solution.\n4. Run the application from the terminal using the console.\n\n\n---\n\n## Project Structure\n\n![image](https://github.com/user-attachments/assets/81545525-b792-4d55-bc22-4189eb54d12a)\n\n\n\n### Explanation of Each Component\n- **Controllers:** Manages the flow between user input, validation, and business logic.\n  - `TriangleController.cs`: Handles interactions between the view and services.\n\n- **Models:** Encapsulates triangle data.\n  - `TriangleModel.cs`: Holds the side lengths of a triangle.\n\n- **Services:** Contains business logic and validation rules.\n  - `TriangleService.cs`: Classifies triangles as Equilateral, Isosceles, or Scalene.\n  - `ValidationService.cs`: Ensures valid input and checks triangle inequality.\n\n- **Views:** Manages user interactions.\n  - `ConsoleView.cs`: Reads input and displays output in the console.\n\n- **Interfaces:** Defines contracts for services and views to keep the system flexible and testable.\n  - `ITriangleService.cs`: Interface for triangle classification.\n  - `IValidationService.cs`: Interface for input validation.\n  - `IConsoleView.cs`: Interface for console interactions.\n\n- **Program.cs:** The entry point of the application.\n\n\n## ## Example Console Interaction\n![image](https://github.com/user-attachments/assets/609f044b-11cb-415c-bf42-bc625656fabb)\n\n\n---\n\n\n### Error Handling\n- If the sides do not form a valid triangle, the program will show an error.\n\n---\n\n\n\n## Future Enhancements\n- Unit testing using **xUnit**.\n- ASP.NET Core Web API integration for web-based interactions.\n- GUI-based interface using **WinForms** or **WPF**.\n\n---\n\n## Key Takeaways\n- Simple and clean project structure.\n- MVC design pattern for maintainability.\n- Separation of concerns for easier testing and code changes.\n- Well-documented code and directory structure for better understanding.\n\nIf you have any suggestions or improvements, feel free to fork this repository and contribute!\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderixc%2Ftriangleapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderixc%2Ftriangleapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderixc%2Ftriangleapp/lists"}