-
Notifications
You must be signed in to change notification settings - Fork 8
Implement Frontend API Layer (Axios) Based on API Docs #25
Description
Create a frontend API abstraction layer using Axios, strictly based on the existing API documentation.
path : /frontend/src/api
Contributors must not invent endpoints, they must derive everything from the API docs.
Context -->
1 ) We want all frontend → backend communication to go through a centralized API layer so:
2 ) Business logic is not scattered across components
3 ) API usage is consistent
4 ) Refactors and backend changes are easier to manage
Expected Folder Structure --
api/
├── axios.ts # axios instance (baseURL, interceptors)
├── auth.api.ts # auth-related API calls
├── project.api.ts # project-related API calls
├── deploy.api.ts # deployment-related API calls
└── index.ts # barrel exports
Tasks -->
1 ) Read the API documentation thoroughly
2 ) Identify all usable endpoints
3 ) Create typed functions that wrap Axios calls
4 ) Ensure no Axios calls exist outside /api folder
5 ) Export reusable methods (e.g. getProjects(), createDeployment())