Skip to content

[REFACTOR] Extract external API calls into a Services layer #406

Description

@github-actions

Problem Statement

Data fetching logic (GitHub API, Supabase queries) is scattered directly inside React components and Page files, making it hard to test and reuse.

Proposed Solution

Create a src/services directory. Move all fetch calls to GitHub into services/github.ts and Supabase queries into services/db.ts. Export clean asynchronous functions that the UI can consume.

Alternatives Considered

Leaving it as is, but separation of concerns improves maintainability.

Additional Context

Ensure types are strongly defined for the return values of these service functions.

Metadata

Metadata

Labels

ADVENTURERIntermediate — 25 ptsELUSOCELUSOC project submissionrefactor

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions