🔖 Title
Set up API client and HTTP layer with automatic JWT handling
📄 Description
All existing hooks (`use-sign-in`, `use-create-account`, `use-invest`) use `setTimeout` simulations or `console.log` instead of real API calls. There is no HTTP client configured in the project. This is the foundational piece that every other backend integration depends on.
✅ Tasks to complete
📚 Documentation/context for AI
(This link never should removed)
https://github.com/TrustUp-app/TrustUp-API/tree/main/docs
🗒️ Additional notes
- All API response shapes are documented in `TrustUp-API/docs/api/endpoints.md`
- Use TypeScript interfaces to type all API responses — no `any`
- The refresh token endpoint is `POST /auth/refresh` (body: `{ refreshToken }`)
- On refresh failure (expired refresh token), clear storage and redirect user to sign in
- Default base URL for local dev: `http://localhost:4000\`
🔖 Title
Set up API client and HTTP layer with automatic JWT handling
📄 Description
All existing hooks (`use-sign-in`, `use-create-account`, `use-invest`) use `setTimeout` simulations or `console.log` instead of real API calls. There is no HTTP client configured in the project. This is the foundational piece that every other backend integration depends on.
✅ Tasks to complete
📚 Documentation/context for AI
(This link never should removed)
https://github.com/TrustUp-app/TrustUp-API/tree/main/docs
🗒️ Additional notes