Edulume icon indicating copy to clipboard operation
Edulume copied to clipboard

refactor: reduce repeated code and improve overall maintainability

Open palchhinparihar opened this issue 10 months ago • 1 comments

Hi, Palchhin here,

Description

The current codebase contains a significant amount of repeated and duplicated logic across multiple files, which makes the project harder to maintain, scale, and debug over time. Similar patterns, such as API calls, state handling, UI structures, utility logic, and configurations, appear in several components instead of being abstracted into reusable modules.

As the project grows, this repetition increases the risk of:

  • Bugs caused by inconsistent updates
  • Difficulty in onboarding new contributors
  • Larger file sizes and reduced readability
  • Slower development velocity due to repetitive changes

Proposed Refactoring Goals

The aim of this refactor is to centralize shared logic, improve code organization, and make the codebase more modular and maintainable.

Suggested Improvements

  • Extract repeated logic into:
    • Reusable components
    • Custom hooks
    • Utility/helper functions
    • Shared constants and configuration files
  • Standardize patterns for:
    • API calls and error handling
    • State management
    • Layout and UI components
  • Reduce file complexity by separating concerns (UI, logic, services)
  • Improve folder structure for better scalability

Benefits

  • Cleaner and more readable code
  • Easier future feature additions
  • Reduced bugs due to single-source logic
  • Improved developer experience and collaboration
  • Better long-term maintainability

Scope

This refactor should not change existing functionality or UI behavior. The focus should strictly be on improving internal structure, reducing duplication, and enhancing code quality.

Will start working on this once I get the go-ahead.

Thank you.

palchhinparihar avatar Jan 06 '26 15:01 palchhinparihar

@palchhinparihar You can proceed!!

tarinagarwal avatar Jan 06 '26 18:01 tarinagarwal