Initial commit: code as received (Create/Anything export)

Insole-production time tracker exported from the Create/Anything AI
platform. Baseline snapshot before any reverse-engineering or cleanup.

- apps/mobile: Expo Router app (iOS/Android/web), the only workspace
- publisher/: standalone OpenNext/AWS deploy tooling for the web side
- Backend (/api/tasks, /api/logs + DB) lives remotely, not in this repo
This commit is contained in:
Bas van Rossem
2026-06-17 10:19:33 +02:00
commit d94d0b188b
192 changed files with 50705 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
import { serializeError } from "serialize-error";
export const sendLogsToRemote = async (logs) => {
if (
!process.env.EXPO_PUBLIC_LOGS_ENDPOINT ||
!process.env.EXPO_PUBLIC_PROJECT_GROUP_ID ||
!process.env.EXPO_PUBLIC_CREATE_TEMP_API_KEY
) {
return { success: false };
}
try {
const response = await fetch(process.env.EXPO_PUBLIC_LOGS_ENDPOINT, {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.EXPO_PUBLIC_CREATE_TEMP_API_KEY}`,
},
body: JSON.stringify({
projectGroupId: process.env.EXPO_PUBLIC_PROJECT_GROUP_ID,
logs,
}),
});
if (!response.ok) {
return { success: false };
}
} catch (fetchError) {
return { success: false, error: fetchError };
}
return { success: true };
};
export const reportErrorToRemote = async ({ error }) => {
if (
!process.env.EXPO_PUBLIC_LOGS_ENDPOINT ||
!process.env.EXPO_PUBLIC_PROJECT_GROUP_ID ||
!process.env.EXPO_PUBLIC_CREATE_TEMP_API_KEY
) {
console.debug(
"reportErrorToRemote: Missing environment variables for logging endpoint, project group ID, or API key.",
error,
);
return { success: false };
}
return sendLogsToRemote([
{
message: JSON.stringify(serializeError(error)),
timestamp: new Date().toISOString(),
level: "error",
source: "BUILDER",
devServerId: process.env.EXPO_PUBLIC_DEV_SERVER_ID,
},
]);
};