feat(backend): add standalone data plane

Replace the Supabase application data plane with the Node/PostgreSQL API, migrate mobile, admin, web, and MCP callers, add controlled cutover tooling, and define hardened Dokploy infrastructure.
This commit is contained in:
jjbrunton committed 2026-08-28 14:42:11 +01:00
1 parent 01bb8225ae
commit 006761d3b0
294 files changed
+16259 -6138

No files matched your search

@@ -0,0 +1,30 @@
import { apiClient } from '../../lib/apiClient';
import { profileSettingsApi } from '../../lib/profileSettingsApi';
jest.mock('../../lib/apiClient', () => ({
apiClient: {
get: jest.fn(),
post: jest.fn(),
patch: jest.fn(),
},
}));
describe('profileSettingsApi', () => {
it('routes profile, activity, preference, and feedback operations through the standalone API', async () => {
await profileSettingsApi.updateProfile({ name: 'Alice' });
await profileSettingsApi.updateLastActive();
await profileSettingsApi.getNotificationPreferences();
await profileSettingsApi.updateNotificationPreference('messages_enabled', false);
await profileSettingsApi.submitFeedback({ type: 'bug', title: 'Title', description: 'Details' });
expect(apiClient.patch).toHaveBeenNthCalledWith(1, '/v1/me/profile', { name: 'Alice' });
expect(apiClient.post).toHaveBeenNthCalledWith(1, '/v1/me/activity');
expect(apiClient.get).toHaveBeenCalledWith('/v1/me/notification-preferences');
expect(apiClient.patch).toHaveBeenNthCalledWith(2, '/v1/me/notification-preferences', {
key: 'messages_enabled', value: false,
});
expect(apiClient.post).toHaveBeenNthCalledWith(2, '/v1/feedback', {
type: 'bug', title: 'Title', description: 'Details',
});
});
});