NOTE: This WeKan-Lite version has retro-look. Modern-look original WeKan is at https://wekan.fi and https://github.com/wekan/wekan .
Uses DOS filenames 8 characters, with extension 3 characters, like FILENAME.TXT
FreePascal-specific design docs and reference code for WeKan-Lite, distilled from the two working prototypes in this tree and aligned to the portable contract:
wami/wekan.pas— single-file WeKan web prototype (routing + retro HTML surface).omi/public/server.pas— mature server (no-cookie/no-JS auth, SQLite-via-CLI, i18n).docs/contract.md,schema.sql,docs/goals.md,docs/webstack.md,docs/schema.md— the portable contract these target.
docs/arch.md— how the prototypes map onto WeKan-Lite: request lifecycle (tenant → auth → endpoint), retro-HTML tiers, unit layout, what's still missing.docs/sqlite.md— the one real fork: linked SQLite (default) vs thesqlite3CLI viaTProcess(bootstrap/fallback). Both live behindwldb.pas.docs/designer.md— the no-JS/no-cookie page builder: data-driven pages, form-driven layout editing, custom URLs, LTR/RTL mirroring (one definition), import/export (.wlp/.zip). Schema indesigner.sql, engine inwldesign.pas.docs/theming.md— colors for any element (WeKan palette or hex), choosable color-picker components, imported-palette mapping (Trello/Kanboard), and Red Strings as SVG/VML/ASCII per browser. Code:wlcolors.pas,wlvector.pas.docs/enhance.md— the layering rule: no-JS form baseline always works; JS+touch features (MultiDrag — drag many cards at once on a big touch screen) auto-activate on top, driving the same endpoints. Code:wlenhanc.pas.docs/move.md— the default no-JS move UI: select swimlanes/lists/cards, move all with one▲◀▼▶keypad (combined, likekanban.go). Code:wlmove.pas.docs/static.md— servingpublic/(robots.txt, css, js, …) and thei18n/translations tree (i18n/langs.jsn+i18n/data/) from disk or embedded in the binary. Code:wlstatic.pas; toolsreleases/genasset.py,releases/convlang.py.docs/api.md— REST API subset (Bearer auth) so WeKan'sapi.pyworks unchanged. Code:wlapi.pas.docs/cross.md— cross-compiling for every target viabuild.shoption 4 (fpcupdeluxe): the build chain, the-dWLDB_CLIrule, and the verified per-target support matrix.
| File | Implements | Notes |
|---|---|---|
wlhttp.lpr |
program entry: routes + fphttpapp |
wires all units below |
wltenant.pas |
multitenancy — Host: → data/domains/<domain>/db/data.db (G8) |
the new core; prototypes are single-tenant |
wlregist.pas |
domain registry over data/admin/db/data.db (G8) |
host→tenant map the Global Admin edits |
wlauth.pas |
no-cookie/no-JS auth — sessions + action-tokens (G4) | from omi; persists to schema.sql login_tokens |
wldb.pas |
SQLite behind one interface; CLI or linked backend | {$DEFINE WLDB_CLI} selects CLI |
wlhtml.pas |
retro-safe HTML 3.2 helpers + pretty printer + dir wrapper | from omi HtmlEncode/PrettyHtml32 |
wlbrowse.pas |
User-Agent → browser id (tune output per client) | from wami WebBrowserName |
wldesign.pas |
Designer — data-driven pages, render, LTR/RTL, import/export | new; docs/designer.md + designer.sql |
wlcolors.pas |
WeKan color palette + color-picker components + import-color mapping | docs/theming.md |
wlvector.pas |
Red Strings / connectors as SVG / VML / ASCII per browser | docs/theming.md |
wlenhanc.pas |
progressive enhancement — MultiDrag/touch hooks + script include | docs/enhance.md |
wlmove.pas |
combined no-JS arrows move component + /board/move apply |
docs/move.md |
wlstatic.pas |
serve public/ + i18n/ (robots.txt, css, js, translations) embedded-or-from-disk |
docs/static.md |
wlapi.pas |
REST API subset (Bearer auth) so WeKan's api.py works |
docs/api.md |
The reference units, wlhttp.lpr, and the *.sql schemas live in src/. Build helpers:
releases/genasset.py (embed public/ + i18n/ into the binary), releases/convlang.py
(regenerate i18n/langs.jsn from WeKan's imports/i18n/languages.js).
These are skeletons — faithful to the prototypes' style (
{$mode objfpc}{$H+},{$CODEPAGE UTF8},TRequest/TResponse,HTTPRouter.RegisterRoute) and meant as the starting point. The unit set is now self-contained (no danglinguses), but it is not yet a finished server: passwords are still placeholder — real hashing intousers.services_jsonis required before use — and the linked-SQLite path inwldb.pasneeds the FPCsqlite3binding + vendored amalgamation present to compile (the-dWLDB_CLIpath only needs asqlite3binary).
fpc -O3 -Xs -o welite src/wlhttp.lpr # release, linked SQLite (single binary)
fpc -dWLDB_CLI -o welite src/wlhttp.lpr # bootstrap: external sqlite3 CLI
fpc -Pm68k -Tamiga -o welite src/wlhttp.lpr # classic Amiga 68kRun plaintext HTTP; terminate TLS at a proxy or load AmiSSL/OpenSSL dynamically
(docs/webstack.md Decision 5). Default port 5500, override with WELITE_PORT.