Skip to content

Refactor Greenlight application by implementing clean architecture and SOLID principles

License

Notifications You must be signed in to change notification settings

jessicatarra/refactoring-greenlight

Repository files navigation

Go Coverage

Refactoring Greenlight application

This project aims to refactor the Greenlight application by implementing clean architecture and SOLID principles. The goal is to improve the codebase's maintainability, scalability, and testability while increasing test coverage.

To understand the initial state of the project, please refer to the previous README file or check the API Docs from V1 application version.

Diagram

graph LR
  subgraph ModularMonolith
    subgraph AuthModule
      subgraph DomainLayer
        D1[Entities]
        D2[Value Objects]
      end
      subgraph ApplicationLayer
        A1[Use Cases]
      end
      subgraph InfrastructureLayer
        I1[Repositories]
        I2[REST API External Services]
        I3[GRPC Internal Service]
      end
    end
    subgraph Legacy Module
      subgraph RestServer
        RS1[Controllers]
        RS2[Handlers]
        subgraph Middleware
          RS3[Auth GRPC Client]
        end
      end
      subgraph Data Models
      end
    end
  end
Loading

The diagram represents the initial phase of the refactor process, focusing on separating the auth module from the existing codebase and applying a clean architecture to enhance its maintainability to each new module. The main objective is to isolate the auth module's functionality and ensure that other modules access user-related information and authentication through the internal GRPC auth service.

TODO

  • Implement a modular monolith architecture style
  • Refactor initial implementation into separate modules
    • Add an authentication module
      • Implement the create user feature
      • Implement the activate user feature
      • Implement the create authentication token feature
      • Create auth gRPC methods
    • Add a movies module
    • Add a healthcheck module
  • Refactor multiple functionalities into internal packages
    • Add support for background tasks
    • Add log/slog package
    • Add mailer package
    • Add utils package
      • Add validator v2 package
      • Add validator helpers utilities
      • Add general helpers utilities
    • Add response package
    • Add request package
    • Add errors package
    • Add config package
    • Add shared middleware package

References

About

Refactor Greenlight application by implementing clean architecture and SOLID principles

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages