Chronos Atlas is built as a local-first thick client: all worldbuilding data lives in the user’s browser via the Origin Private File System (OPFS), and the React frontend is the authoritative runtime for reading, writing, and rendering that data. The stack combines React 19, TypeScript 5.7, and Vite 6 with SQLite WASM (via SQLocal) executing inside a dedicated Web Worker — delivering zero-latency persistence with no cloud dependency.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.
Tech Stack
| Layer | Technology | Version |
|---|---|---|
| UI Framework | React | 19.2.4 |
| Language | TypeScript (strict mode) | 5.7 |
| Build Tool | Vite | 6 |
| Local State | Zustand | 5.x |
| Async State / Caching | TanStack Query | v5 |
| Data Tables | TanStack Table | v8 |
| Client-Side Routing | React Router | v7 |
| Map Rendering | MapLibre GL | 5.x |
| Rich Text Editor | Tiptap | v2 |
| Styling | Tailwind CSS | v3 |
| Local Database | SQLocal (SQLite WASM over OPFS) | 0.17.0 |
Feature-Sliced Architecture
The frontend is organised around Feature-Sliced Architecture (Vertical Slice). Every product capability — World Bible, Timeline, Maps, Linguistics, Graph, Writing, Shell — lives in its own self-contained feature directory undersrc/features/. Features own all their layers internally and expose a single public contract through a root index.ts. Cross-feature communication happens through those public APIs only; deep imports into another feature’s internals are forbidden.
The standard folder structure for every feature is:
- A hook used by a single screen lives next to that screen in
pages/. - A hook shared across two or more components or pages moves to
hooks/. use*hooks must never reside insidecomponents/; they always belong inhooks/orpages/.
The Shared Kernel
src/features/Shared is the transversal UI utility layer. It provides primitive components, navigation helpers, modals, panels, feedback toasts, visual tokens, and adapter bridges — but it must never import business features directly. It is a pure utility kernel, not a container for domain logic.
Temporary integrations that must cross the boundary (such as feature-aware adapters) are the only permitted exception. These must be declared explicitly inside
src/features/Shared/adapters/ to keep the violation isolated and trackable.@components and @components/* aliases. There is no additional ui/ segment in the import path.
Path Aliases
All path aliases are declared infrontend/vite.config.ts (and mirrored in frontend/tsconfig.json) and are the canonical way to navigate the codebase. Never use relative ../../../ traversals across feature or infrastructure boundaries.
| Alias | Resolves To | Purpose |
|---|---|---|
@ | src | Repository root shorthand |
@features | src/features | Feature directory root |
@features/* | src/features/* | Any feature root or public export |
@components | src/features/Shared/index | Shared kernel barrel export |
@components/* | src/features/Shared/* | Shared kernel sub-paths |
@context | src/features/App/context | App-level React contexts |
@context/* | src/features/App/context/* | Individual context files |
@database | src/infrastructure/localDB/client | SQLocal client instance |
@network | src/infrastructure/network | Network service layer |
@network/* | src/infrastructure/network/* | Individual network services |
@assets | src/assets | Static assets |
@assets/* | src/assets/* | Individual asset files |
@domain/database | src/features/App/domain/database | Core database type contracts |
@domain/maps | src/features/Maps/domain/maps | Map feature domain types |
@domain/timeline | src/features/Timeline/domain/timeline | Timeline domain types |
@domain/writing | src/features/Writing/domain/writing | Writing feature domain types |
@domain/linguistics | src/features/Linguistics/domain/linguistics | Linguistics domain types |
@domain/canvas | src/features/Linguistics/domain/canvas | Canvas/glyph domain types |
@domain/hierarchy | src/features/WorldBible/domain/hierarchy | World Bible hierarchy types |
@domain/graph | src/features/Graph/domain/graph | Graph feature domain types |
@domain/ui | src/features/Shell/domain/ui | Shell/UI domain types |
@infrastructure | src/infrastructure | Infrastructure root |
@infrastructure/* | src/infrastructure/* | Individual infrastructure modules |
@repositories | src/infrastructure/localDB/repositories | Repository layer |
@repositories/* | src/infrastructure/localDB/repositories/* | Individual repository services |
@utils | src/infrastructure/utils | Shared utility functions |
@utils/* | src/infrastructure/utils/* | Individual utility files |
@locales | src/locales | i18n locale files |
@locales/* | src/locales/* | Individual locale files |
Infrastructure Layer
All database access is mediated through a dedicated repository layer atsrc/infrastructure/localDB/repositories/. This layer wraps every SQL operation and exposes typed, domain-aware service functions (e.g., projectService, folderService, entityService, settingsService). Components, hooks, and use-cases import from @repositories/* — they never call sql or sqlocal directly.
The SQLocal client in src/infrastructure/localDB/client.ts initialises the SQLite WASM Web Worker and exports the sql tagged-template function and sqlocal instance. The Vite build explicitly excludes sqlocal from dependency pre-bundling (optimizeDeps.exclude) and configures Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: credentialless headers — both required for SharedArrayBuffer and the SQLite WASM runtime.
Architecture Guardrails
The frontend ships an automated architecture linting script infrontend/package.json:
Cross-feature deep imports
No feature may import from
@features/<OtherFeature>/(components|hooks|pages|application|domain|store)/*. Only the public root @features/<OtherFeature> export is allowed.