beeja-io / beeja

Open-Source Solution for Seamless Organizational Operations!
Apache License 2.0
46 stars 5 forks source link

[BE] [ENHANCEMENT] Centralize Shared Code with a Common Gradle Dependency for Beeja Backend Microservices #258

Open swathidevarapalli opened 1 month ago

swathidevarapalli commented 1 month ago

Description: Currently, multiple microservices in the Beeja backend contain duplicate code such as utility functions, constants, DTOs, custom exceptions, and shared configurations. This redundancy increases maintenance overhead and violates the DRY (Don't Repeat Yourself) principle.


To improve code reusability and manageability, we need to create a shared Gradle module (e.g., beeja-commons) that can be imported as a dependency across all backend microservices.

Acceptance Criteria:

  1. A new Gradle project/module named beeja-commons is created.
  2. All common code (e.g., utility classes, constants, DTOs, exceptions, annotations) is moved to this module.
  3. The beeja-commons module is published to a private Maven/Nexus/Artifactory repository (or included via local multi-module Gradle setup).
  4. All microservices are updated to remove duplicated code and include the new dependency.
  5. Documentation is updated to show how to use and update beeja-commons.

Technical Tasks:

  1.  Initialize a new Gradle module for common backend code.
  2.  Refactor and migrate shared code from microservices.
  3.  Configure publishing (local or remote repository).
  4.  Integrate the dependency into all existing microservices.
  5.  Test all dependent services after integration.
Sampathpabha commented 1 month ago

@swathidevarapalli , @kirannani168 PR Link: https://github.com/beeja-io/beeja/pull/259