Skip to main content

Documentation 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.

The /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

http://localhost:8080/api/db

GET /db/list

List the names of all project databases available in the backup/ directory. Response200 OK — JSON array of sanitised project name strings, sorted case-insensitively.
curl http://localhost:8080/api/db/list
["Aethermoor", "ElCronistaDeSol", "ProjectDusk"]

GET /db/download/{projectName}

Download the raw .sqlite file for a project as a binary stream.
projectName
string
required
The name of the project whose database file should be downloaded. Matched against backup/{projectName}.sqlite with fuzzy diacritic folding.
Response200 OKapplication/octet-stream — the .sqlite binary file.
curl -O http://localhost:8080/api/db/download/Aethermoor

GET /db/download?projectName={name}

Identical to the path-parameter variant above; accepts projectName as a query string instead.
curl -O "http://localhost:8080/api/db/download?projectName=Aethermoor"

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.
projectName
string
required
The target project name. The file will be saved as backup/{projectName}.sqlite.
file
multipart/form-data
required
The .sqlite binary file to upload.
Response200 OK — plain text success message.
curl -X POST \
  -F "file=@Aethermoor.sqlite" \
  http://localhost:8080/api/db/upload/Aethermoor

POST /db/upload?projectName={name}

Identical to the path-parameter variant above.
curl -X POST \
  -F "file=@Aethermoor.sqlite" \
  "http://localhost:8080/api/db/upload?projectName=Aethermoor"

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}_.
projectName
string
required
The project to export.
Response200 OKapplication/octet-stream — a .zip file with the following structure:
{projectName}.zip
├── {projectName}.sqlite
└── assets/
    ├── {projectName}_map1.png
    └── {projectName}_map2.png
curl -O http://localhost:8080/api/db/export/Aethermoor
# saves Aethermoor.zip

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.
projectName
string
required
The target project name for the import.
file
multipart/form-data
required
The .zip archive produced by GET /db/export.
Response200 OKapplication/octet-stream — the extracted .sqlite file.
curl -X POST \
  -F "file=@Aethermoor.zip" \
  http://localhost:8080/api/db/import/Aethermoor \
  -o Aethermoor_restored.sqlite

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.
projectName
string
required
The target project name.
file
multipart/form-data
required
The .zip archive to import.
Response202 Accepted
{
  "jobId": "3f1a9c7e-84b2-41cc-a910-2d5f0e6b3c12",
  "status": "queued",
  "message": "Importación iniciada en segundo plano."
}
curl -X POST \
  -F "file=@Aethermoor.zip" \
  http://localhost:8080/api/db/import/async/Aethermoor

GET /db/import/status/{jobId}

Poll the progress of an async import job.
jobId
string
required
The UUID returned by POST /db/import/async/{projectName}.
Response200 OK
jobId
string
The unique job identifier.
projectName
string
The sanitised project name for this import.
status
string
One of queued, running, completed, or failed.
progress
number
Integer from 0 to 100 representing completion percentage.
message
string
Human-readable status description.
error
string | null
Error detail string if status is failed; otherwise null.
curl http://localhost:8080/api/db/import/status/3f1a9c7e-84b2-41cc-a910-2d5f0e6b3c12
{
  "jobId": "3f1a9c7e-84b2-41cc-a910-2d5f0e6b3c12",
  "projectName": "Aethermoor",
  "status": "running",
  "progress": 65,
  "message": "Importando archivos del respaldo...",
  "error": 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.
jobId
string
required
The UUID of a completed import job.
Response200 OKapplication/octet-stream — the imported .sqlite file.
curl http://localhost:8080/api/db/import/result/3f1a9c7e-84b2-41cc-a910-2d5f0e6b3c12 \
  -o Aethermoor_imported.sqlite

Error Responses

StatusCondition
400 Bad RequestEmpty file or malformed URL
404 Not FoundProject database not found on disk
500 Internal Server ErrorDisk I/O failure

Build docs developers (and LLMs) love