Skip to content

Feat/api integration layer#261

Merged
A6dulmalik merged 4 commits intoMindBlockLabs:devfrom
mijinummi:feat/245-api-integration-layer
Feb 24, 2026
Merged

Feat/api integration layer#261
A6dulmalik merged 4 commits intoMindBlockLabs:devfrom
mijinummi:feat/245-api-integration-layer

Conversation

@mijinummi
Copy link
Contributor

@mijinummi mijinummi commented Feb 23, 2026

Objective

  • Create centralized API client with consistent error handling, interceptors, and type safety.

Changes

  • Added client.ts with base Axios config and SSR guard.
  • Added interceptors.ts for JWT attachment, 401 handling, and retry logic.
  • Added error-handler.ts for standardized error responses.
  • Added types.ts for common API response and error interfaces.

Acceptance Criteria

  • ✅ Base client configured with env BASE_URL.
  • ✅ JWT auto-attached.
  • ✅ 401 redirects to login.
  • ✅ Errors standardized.
  • ✅ Retry logic implemented.
  • ✅ Type safety via generics.
  • ✅ No API calls during SSR.

Closes #245

@mijinummi mijinummi changed the title Feat/245 api integration layer Feat/api integration layer Feb 23, 2026
@A6dulmalik A6dulmalik changed the base branch from main to dev February 24, 2026 13:56
@A6dulmalik A6dulmalik merged commit ae90d12 into MindBlockLabs:dev Feb 24, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FRONTEND - API INTEGRATION LAYER

2 participants