Developer Docs

Everything you need to build, understand, and extend Lexicon: one C++23 backend and three clients. The Qt desktop client opens the SQLite database directly; the web client and the Android app talk to LexiconServer over a REST API.

Technology stack

PartTechnologyNotes
BackendC++23CMAKE_CXX_STANDARD 23, extensions off, no Qt
PersistenceSQLite C APIOne database file with versioned migrations; FTS5 search where SQLite has it; files in blobs/ beside it
Desktop clientQt 6 WidgetsClassic desktop widgets, no QML; Markdown by the vendored md4qt
ServerLexiconServerREST/JSON under /api/v1, vendored cpp-httplib and nlohmann/json, OpenSSL for TLS and hashing
Web clientHTML, CSS, JavaScript modulesNo framework and no build step; vendored marked and DOMPurify
Android clientKotlin, Jetpack ComposeA separate Gradle project; no database of its own
BuildCMake β‰₯ 3.21, GradleCMake for the C++ targets, Gradle for Android
TestsCTest, Node, Robolectric, a headless browserAll run on every push by GitHub Actions
LicenseMITFree for any use

Repository layout

lexicon/
β”œβ”€β”€ lexicon-core/             # records, validation, review rules, wiki links, image values
β”œβ”€β”€ lexicon-application/      # services and the Repository interface
β”œβ”€β”€ lexicon-storage-sqlite/   # native SQLite, migrations, search index, Blob files
β”œβ”€β”€ lexicon-json/             # the JSON form of records; export and import
β”œβ”€β”€ lexicon-http/             # REST routes, authentication, sessions, CORS, TLS
β”œβ”€β”€ lexicon-server/           # LexiconServer and its automatic backups
β”œβ”€β”€ lexicon-qt-bridge/        # Qt / UTF-8 conversions
β”œβ”€β”€ lexicon-qt/               # Qt Widgets desktop client
β”œβ”€β”€ lexicon-web/              # static web client
β”œβ”€β”€ lexicon-android/          # Android client (Gradle)
β”œβ”€β”€ tests/                    # C++ tests, including offscreen desktop dialogs
β”œβ”€β”€ tools/                    # web-e2e.py (browser test), serve-web.py
β”œβ”€β”€ docs/                     # REST API, server, export format
β”œβ”€β”€ web/                      # this site
└── 3rdparty/                 # md4qt, cpp-httplib, nlohmann/json

How it fits together

Each program has a composition root that opens the SQLite repository and injects it into LexiconApplication: the desktop client in lexicon-qt/, the server in lexicon-server/. Only the storage target runs SQL. The server exposes the same services over REST, and the web client and the Android app use nothing else. Read the architecture guide.

Jump in