T. Narantuya a95ec60859 Refactor address management and update related services for improved clarity and functionality
- Updated address retrieval in user service to replace billing info with a dedicated address method.
- Adjusted API endpoints to use `PATCH /api/me/address` for address updates instead of billing updates.
- Enhanced documentation to reflect changes in address management processes and API usage.
- Removed deprecated types and services related to billing address handling, streamlining the codebase.
2025-09-17 18:43:43 +09:00

6.1 KiB

Codebase Refactoring Review Requirements

Introduction

This document outlines the requirements for reviewing and fixing the recent codebase refactoring to ensure it truly follows atomic design principles, has properly consolidated components, removed redundant legacy files, and achieved the clean architecture goals outlined in the original spec.

Requirements

Requirement 1

User Story: As a developer, I want the atomic design structure to be properly implemented, so that components are correctly categorized and organized according to their complexity and reusability.

Acceptance Criteria

  1. WHEN examining the components directory THEN it SHALL have clear separation between atoms (ui/), molecules (common/), and organisms (layout/)
  2. WHEN looking at catalog components THEN they SHALL be properly categorized as molecules or moved to appropriate feature modules
  3. WHEN checking component exports THEN they SHALL be properly organized and not have disabled TODO comments
  4. WHEN reviewing component structure THEN each component SHALL follow the established folder pattern with proper index files
  5. IF components are in the wrong category THEN they SHALL be moved to the correct atomic design level

Requirement 2

User Story: As a developer, I want all legacy and duplicate components to be removed, so that the codebase is clean and maintainable without redundant code.

Acceptance Criteria

  1. WHEN searching for legacy components THEN there SHALL be no duplicate button, input, or loading implementations
  2. WHEN examining layout components THEN legacy exports and backward compatibility code SHALL be removed
  3. WHEN checking for deprecated components THEN they SHALL be completely removed from the codebase
  4. WHEN looking at component imports THEN they SHALL all use the new centralized design system
  5. IF legacy components exist THEN they SHALL be identified and removed completely

Requirement 3

User Story: As a developer, I want proper feature module organization, so that business logic is correctly encapsulated and feature boundaries are clear.

Acceptance Criteria

  1. WHEN examining feature modules THEN they SHALL have complete implementations, not just TODO placeholders
  2. WHEN looking at catalog functionality THEN it SHALL be properly organized within the catalog feature module
  3. WHEN checking feature exports THEN they SHALL expose complete APIs without disabled exports
  4. WHEN reviewing component placement THEN business-specific components SHALL be in feature modules, not shared components
  5. IF feature modules are incomplete THEN they SHALL be properly implemented or removed

Requirement 4

User Story: As a developer, I want consistent component structure and naming, so that the codebase follows established patterns throughout.

Acceptance Criteria

  1. WHEN examining component files THEN they SHALL follow consistent naming conventions (PascalCase for components, kebab-case for files)
  2. WHEN looking at component organization THEN they SHALL have proper folder structure with index files
  3. WHEN checking imports and exports THEN they SHALL be consistent and properly typed
  4. WHEN reviewing file structure THEN there SHALL be no mixed naming patterns or inconsistent organization
  5. IF naming inconsistencies exist THEN they SHALL be standardized according to the design system patterns

Requirement 5

User Story: As a developer, I want all TODO comments and incomplete implementations to be resolved, so that the refactoring is truly complete and production-ready.

Acceptance Criteria

  1. WHEN searching for TODO comments THEN critical functionality SHALL be implemented, not left as placeholders
  2. WHEN examining disabled exports THEN they SHALL either be implemented or removed completely
  3. WHEN looking at legacy compatibility code THEN it SHALL be removed after proper migration
  4. WHEN checking component implementations THEN they SHALL be complete and functional
  5. IF TODO items remain THEN they SHALL be either implemented or documented as future enhancements

Requirement 6

User Story: As a developer, I want proper separation of concerns between shared components and feature-specific components, so that the architecture is clean and maintainable.

Acceptance Criteria

  1. WHEN examining catalog components THEN business-specific ones SHALL be moved to the catalog feature module
  2. WHEN looking at shared components THEN they SHALL only contain truly reusable, generic functionality
  3. WHEN checking component dependencies THEN feature-specific logic SHALL not leak into shared components
  4. WHEN reviewing component usage THEN shared components SHALL be used consistently across features
  5. IF components are misplaced THEN they SHALL be moved to the appropriate location based on their purpose

Requirement 7

User Story: As a developer, I want the component library to be complete and properly exported, so that all components are easily discoverable and usable.

Acceptance Criteria

  1. WHEN examining the main components index THEN it SHALL export all available component categories
  2. WHEN looking at UI component exports THEN they SHALL be complete and properly typed
  3. WHEN checking layout component exports THEN they SHALL not have legacy compatibility exports
  4. WHEN reviewing feature component exports THEN they SHALL be properly organized and accessible
  5. IF component exports are incomplete THEN they SHALL be properly implemented and documented

Requirement 8

User Story: As a developer, I want consistent styling and theming implementation, so that the design system is properly applied throughout the application.

Acceptance Criteria

  1. WHEN examining component styles THEN they SHALL use the established design tokens and CSS custom properties
  2. WHEN looking at component variants THEN they SHALL be implemented using class-variance-authority consistently
  3. WHEN checking for hardcoded styles THEN they SHALL be replaced with design system tokens
  4. WHEN reviewing responsive design THEN it SHALL use the established breakpoint system
  5. IF styling inconsistencies exist THEN they SHALL be standardized to use the design system