-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Create .NET 8 Web API with Clean Architecture #3
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
base: main
Are you sure you want to change the base?
Conversation
This commit marks the completion of the migration from a Python application to a new .NET 8 Web API. The new solution follows the principles of Clean Architecture, with a clear separation of concerns into four distinct projects: - `Core`: Contains the domain entities. - `Application`: Holds the business logic, services, and DTOs. - `Infrastructure`: Manages data persistence with Entity Framework Core and SQLite. - `Api`: Exposes the functionality through RESTful endpoints. Key features: - All original entities (Pokemon, Trainer, Battle, Admin, etc.) have been translated into C# classes. - Services and repositories have been implemented to handle business logic and data access. - API controllers have been created for `Pokemon` and `Trainer`, with endpoints for CRUD operations. - The entire codebase is documented with detailed XML comments, which are integrated into the Swagger UI for easy exploration and testing of the API. - The project is fully configured, buildable, and includes database migrations to set up the initial schema.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. |
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Comment |
|
Excelente |
¡Gracias! Me alegra que estés satisfecho con el resultado. |
This commit addresses feedback by replacing the simplistic battle simulation with a complete, turn-based combat system. Key changes: - **Turn-Based Simulation:** The `BattleService` now contains a turn-based loop where Pokémon attack each other until one team is defeated. - **Attack Order:** The Pokémon with the higher Speed stat attacks first in each turn. - **Damage Calculation:** Implemented a formula to calculate damage based on the attacker's Attack and the defender's Defense. - **Battle Logging:** A new `BattleLog` entity was created to record every action of the fight. The results returned by the API now include this detailed log. - **Domain Model Update:** The `Pokemon` entity was updated to track `CurrentHp` during battles. - **Database Schema Update:** A new migration has been added to create the `BattleLogs` table and update the schema accordingly. The application now features a robust battle system, fulfilling the core requirements of the project.
This change delivers a complete .NET 8 Web API that replaces the previous Python application. It is built using Clean Architecture principles, ensuring a scalable and maintainable codebase. The API provides endpoints for managing Pokémon and Trainers, is fully documented, and uses Entity Framework Core for data persistence with SQLite.
PR created automatically by Jules for task 9781794890671351151