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.
/db endpoints manage the full lifecycle of a project’s SQLite database file on the local server filesystem. They expose operations for listing available backups, downloading a project database to the browser, uploading a new or restored database to disk, and ZIP-based export/import that bundles the SQLite file together with its associated map assets. All paths are served under /api/db when accessed through the Vite dev-server proxy.
projectName is sanitised and normalised server-side on every request: UTF-8 mojibake is detected and repaired, Unicode is normalised to NFC, and diacritics are folded for fuzzy lookup. You may pass an accented project name and the server will find the correct file.Base URL
GET /db/list
List the names of all project databases available in the backup/ directory.
Response — 200 OK — JSON array of sanitised project name strings, sorted case-insensitively.
GET /db/download/{projectName}
Download the raw .sqlite file for a project as a binary stream.
The name of the project whose database file should be downloaded. Matched against
backup/{projectName}.sqlite with fuzzy diacritic folding.200 OK — application/octet-stream — the .sqlite binary file.
GET /db/download?projectName={name}
Identical to the path-parameter variant above; accepts projectName as a query string instead.
POST /db/upload/{projectName}
Upload (backup or restore) a .sqlite file to the server’s backup/ directory. Overwrites any existing file for the same project name.
The target project name. The file will be saved as
backup/{projectName}.sqlite.The
.sqlite binary file to upload.200 OK — plain text success message.
POST /db/upload?projectName={name}
Identical to the path-parameter variant above.
GET /db/export/{projectName}
Export a project as a ZIP archive containing the .sqlite database file plus all associated map assets from maps_assets/ whose filename starts with {projectName}_.
The project to export.
200 OK — application/octet-stream — a .zip file with the following structure:
POST /db/import/{projectName}
Import a ZIP archive synchronously. Extracts the .sqlite file to backup/ and all assets/ entries to maps_assets/. Returns the imported .sqlite file immediately as a download.
The target project name for the import.
The
.zip archive produced by GET /db/export.200 OK — application/octet-stream — the extracted .sqlite file.
POST /db/import/async/{projectName}
Start an asynchronous import job. The ZIP is processed in a background thread pool (db-import- threads, core size 2, max 6). Returns immediately with a job ID.
The target project name.
The
.zip archive to import.202 Accepted
GET /db/import/status/{jobId}
Poll the progress of an async import job.
The UUID returned by
POST /db/import/async/{projectName}.200 OK
The unique job identifier.
The sanitised project name for this import.
One of
queued, running, completed, or failed.Integer from
0 to 100 representing completion percentage.Human-readable status description.
Error detail string if
status is failed; otherwise null.GET /db/import/result/{jobId}
Download the imported .sqlite file once a job has reached completed status. Returns 202 Accepted if the job is still running, and 404 Not Found if the job ID is unknown.
The UUID of a completed import job.
200 OK — application/octet-stream — the imported .sqlite file.
Error Responses
| Status | Condition |
|---|---|
400 Bad Request | Empty file or malformed URL |
404 Not Found | Project database not found on disk |
500 Internal Server Error | Disk I/O failure |