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.
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/servicesdirectory. Move allfetchcalls to GitHub intoservices/github.tsand Supabase queries intoservices/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.