TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Fixius50/WorlBuilding-Writting-App/llms.txt
Use this file to discover all available pages before exploring further.
/sync endpoint provides a lightweight archiving mechanism that lets the Chronos Atlas frontend persist a JSON snapshot of the current project state to the local filesystem. This is used primarily to archive the SyncRealtimePayload — a typed snapshot containing the project record, all folders, all entities, and all relationships — as a human-readable .sync.json file on disk alongside the SQLite backups.
The endpoint is intentionally minimal: it accepts any JSON object and writes it as a pretty-printed file, making it useful both for automated snapshot archiving and for manual inspection of project state.
projectName is strictly validated server-side against the pattern ^[a-zA-Z0-9._-]+$. Names containing spaces, accented characters, or any other special characters will be rejected with a 400 Bad Request. Use URL encoding for path construction but ensure the decoded name matches the pattern.Base URL
POST /sync/payload/{projectName}
Archive a JSON payload to disk as backup/{projectName}.sync.json. If the file already exists it is overwritten. The backup/ directory is created automatically on server startup if absent.
The project identifier. Must match
^[a-zA-Z0-9._-]+$ exactly (alphanumeric characters plus ., _, and -). Spaces, accents, and Unicode outside ASCII are not permitted.Any valid JSON object. The server serialises it with indented pretty-print formatting. The canonical payload shape used by the frontend
syncService is the SyncRealtimePayload structure shown below, but the endpoint accepts any map of string keys to values.200 OK
true when the file was written successfully.Human-readable confirmation:
"Payload archivado correctamente."The resolved path of the written file, e.g.
backup/Aethermoor.sync.json.400 Bad Request
false"projectName inválido." — returned when the name fails regex validation.500 Internal Server Error
false"No se pudo archivar payload: ..." with the underlying IO error message.Example
The following example archives aSyncRealtimePayload snapshot for the project Aethermoor:
Frontend Integration
ThesyncService in src/infrastructure/network/syncService.ts calls this endpoint through archiveRealtimePayload():
SyncRealtimePayload type includes: