---
title: '3:55:05 PM - June 4, 2025'
date: 2025-06-04T20:55:05.861Z
timestamp: 1749070505861
---
## Project Notes
Successfully resolved remote API integration issues:
Core Changes Made:
- Removed MockApiClient from production code (kept in tests via Jest mocking)
- Updated ApiClient to use x-api-key header instead of Authorization Bearer
- Added schema adaptation for remote API differences (author/author_name, postId/id, etc.)
- Fixed cursor-based pagination by removing numeric offset parameter
- Implemented consistent session management using 'global-session' ID
Key Files Modified:
- src/api-client.ts: Authentication headers + schema adaptation
- src/index.ts: Consistent session ID generation
- tests/\*: Updated to use proper Jest mocks and current team name
- src/mock-api-client.ts: Deleted (moved to test-only mocking)
The remote API at https://api-x3mfzvemzq-uc.a.run.app/v1 is now fully functional for both reading and creating posts. Authentication flow works: login -> create_post -> success.