Chronos Atlas persists all worldbuilding data in a single SQLite file per project, stored in the browser’s Origin Private File System (OPFS) and accessed through the SQLocal Web Worker. The schema follows a hybrid design: first-class tables for structural concerns (projects, folders, events, relationships) and an Entity-Attribute-Value (EAV) pattern for dynamic, user-defined fields on entities. Every TypeScript interface in the domain layer maps directly to a SQLite table.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.
Each project has its own isolated SQLite database file. There is no shared global database between projects. Switching projects in the UI loads a different OPFS file into the SQLocal worker.
Core Interfaces
Proyecto
The top-level container. Every piece of content in Chronos Atlas belongs to exactly one Proyecto.
FolderType
A union type representing the semantic role of a folder. Used by the Carpeta interface to determine which module owns a folder and how it is rendered in the sidebar.
Carpeta
A folder node in the hierarchical content tree. Supports unlimited nesting via padre_id and soft deletion via the borrado flag.
Entidad
The universal entity record. Characters, locations, factions, items, creatures, and any other worldbuilding concept are all stored as Entidad rows differentiated by tipo. Rich content is serialised to contenido_json.
Word (extends Entidad)
A specialised entity subtype for constructed-language dictionary entries. It extends Entidad with linguistic-specific fields and includes SVG glyph data for the Glyph Foundry module.
Plantilla
An attribute template — the schema definition for a custom field. Plantillas are user-created and scoped to a project. They form the “schema” side of the EAV triad.
Valor
An EAV value record — one row per (entity, template) pair. Stores the actual user-entered value as a string. Optionally carries the Plantilla definition when joined.
Evento
A timeline event. Each event belongs to a project and a timeline folder, and may be assigned to a parallel dimension line (linea_id) for multiverse branching.
EAV Pattern
TheEntidad + Plantilla + Valor trio implements a flexible Entity-Attribute-Value model that lets users define custom fields for any entity type without requiring schema migrations.
Define a template (Plantilla)
A user creates a
Plantilla such as “Alignment” (type: select) scoped to tipo_objetivo = "PERSONAJE".Attach values (Valor)
When a character entity is saved, a
Valor row is written linking entidad_id + plantilla_id + the chosen option string.contenido_json
The contenido_json column on Entidad stores arbitrary structured data as a JSON string. This field is the escape hatch for module-specific rich data that does not fit a fixed relational schema:
| Module | What contenido_json holds |
|---|---|
| World Bible entities | Tiptap editor document JSON (rich text blocks, marks, nodes) |
| Glyph Foundry glyphs | { svgPathData, layers, ... } — layered SVG canvas state |
| Map editor | Map canvas viewport and annotation state |
| Whiteboards | { nodos_json, aristas_json, viewport_json } — React Flow graph state |
Always type
contenido_json as unknown and cast safely after parsing. Never assume its shape without a runtime type guard — the field stores heterogeneous data across different feature modules.Full SQLite Schema Reference
The schema is initialised and migrated bysrc/infrastructure/localDB/client.ts on application startup. Key tables and their primary relationships: