Skip to content

Conversation

@PianoNic
Copy link
Owner

@PianoNic PianoNic commented Aug 2, 2025

resolve #14

@PianoNic PianoNic requested a review from Copilot August 2, 2025 12:37
@PianoNic PianoNic self-assigned this Aug 2, 2025
@PianoNic PianoNic added the refactor Rewrite of a code label Aug 2, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR migrates the codebase to an onion architecture pattern with dynamic controller loading. The refactoring separates concerns by organizing code into distinct layers: API (endpoints), application (services), and introduces a dynamic router registry system for automatic controller discovery.

  • Restructured codebase from flat controller structure to layered onion architecture
  • Implemented dynamic controller loading via RouterRegistry for automatic route discovery
  • Split monolithic controller into focused, single-responsibility controllers

Reviewed Changes

Copilot reviewed 13 out of 23 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/api/router_registry.py New dynamic router discovery system for automatic controller registration
src/api/controllers/static_controller.py Extracted static route handlers (index, about) into dedicated controller
src/api/controllers/application_controller.py Extracted app info endpoint into dedicated controller
src/api/controllers/image_processing_controller.py Refactored to focus solely on image processing endpoints
src/application/services/image_service.py Cleaned up unused import
src/api/app.py Updated to use dynamic router registry and corrected file paths
asgi.py Updated import path for new application structure

PianoNic and others added 4 commits August 2, 2025 14:48
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ays added and prevent duplicate logs; add __init__.py for services package.
@PianoNic PianoNic merged commit 8085de5 into main Aug 2, 2025
@PianoNic PianoNic deleted the refactor/14_fastApiOnionArchitecture branch August 2, 2025 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Rewrite of a code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor FastAPI Application to Implement Onion Architecture

2 participants