Sahilll94/Travel-Book

Refactor API Calls into a Centralized `src/services` Directory

Aperta

#90 aperta il 23 gen 2026

 (4 commenti) (0 reazioni) (1 assegnatario)JavaScript (46 fork)auto 404
ECWoC26documentationgood first issue

Metriche repository

Star
 (9 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Documentation Type

Other

Current Issue

Currently, API fetch logic appears to be directly embedded within various components, leading to potential duplication and tightly coupled code.

Proposed Improvement

To improve maintainability, reusability, and separation of concerns, all API related calls should be extracted from components into a dedicated src/services directory. This pattern centralizes API logic, making it easier to manage, mock for testing, and update backend endpoints or authentication headers.

Affected Sections

authService.js, travelService.js, otpverification, travel card and app...

Target Audience

New contributors

Additional Context

@Sahilll94 I would like to be assigned to this Issue, I have read Codeof Conduct and I m under ECWoC 26.

Implementation

  • I can write the documentation changes myself
  • I can provide review and feedback
  • I prefer to let others handle the implementation

Confirmation

  • I have checked that this improvement isn't already covered elsewhere
  • I have searched for existing documentation issues before creating this one

Guida contributor