Logo: a Lanna gable whose crossed kalae horns stand over a desk, gold on navy, with "Lanna Desk" and "Visas · stays · contracts" in Sarabun drawn as outlines. static/brand/ has the mark, the logo for light and for dark backgrounds and a one-color version; scripts/gen_logo.py makes them, the favicon and the header's mark from forms/fonts/Sarabun-Bold/SemiBold (SIL Open Font License, next to the Regular already there). `/` is now lannadesk.com's public page (templates/landing.html, static/landing.css): what Lanna Desk takes care of, how a client starts (write, open the link, sign first, we keep the dates), how the data is kept, contact@lannadesk.com and "Staff sign-in". It needs no session and shows no records. The back office's first page, the deadlines, moves to `/desk` (web::HOME): the header, the nav, the filter, the login's default target and the messages' links follow. Signing out now ends the session at id.cnx.network too. Kanidm names no end_session_endpoint, but its GET /ui/logout ends the session and clears its cookies (SameSite=Lax, so they come along on a top-level navigation). The logout form may only lead to this site (CSP form-action 'self'), so /signed-out sends the browser on with a refresh and offers the link as well; providers that are not Kanidm keep the old page. Checks: fmt, clippy, 109 unit and 57 integration tests (the public page open and free of records, /desk behind the sign-in, the sign-out page leading to the provider); the page at 1280 and 390 px; the header's mark in both themes; the style check on the README, PLAN and the page.
The blank forms
The Immigration Bureau's forms that the app fills in (src/papers), kept
unchanged as the Bureau publishes them. The app lays each page into a new PDF
and writes the values on its dotted lines, so a filled-in form looks like one
filled in by hand, only legible.
They come from the downloads of Immigration Division 1 at https://bangkok.immigration.go.th/en/downloads_en/, fetched on November 18, 2026. The STM forms are the versions of 2025. The forms are the Bureau's own, for every immigration office; Chiang Mai Immigration's website offers no downloads of its own.
| Form | File | What it is | SHA-256 |
|---|---|---|---|
| TM.7 | tm7.pdf |
Application for extension of temporary stay | 93bcd4b4fda4a9e88329e313112a6bd6d17a8f604f16392734f72a647fc8b62d |
| STM.2 | stm2.pdf |
Acknowledgment of the conditions of a temporary stay | 0675fcd31ad6ee5ad50ca38f0ba115a82378e81faa7cab1aea22dbfb5335c35e |
| STM.9 | stm9.pdf |
Acknowledgment of the penalties for overstay | c9939371a18e4b8cd74b2a8bc88377ac39f53d9a8049dc28b832917e300eccb6 |
| STM.11 | stm11.pdf |
Consent to the checking of the application | 41b86da3094ec86837512f0d3b84871dd75ffed8c70fcd415a33d26704d74612 |
| STM.1 | stm1.pdf |
Certificate of employment, from the employer | 591484049f81d8c3c86bc118413b85521fa8935e2d00a7b85c48747e3d790cf1 |
| TM.47 | tm47.pdf |
Notification of staying longer than 90 days | 2208dc2aa65f82dc8e2129759d6eb2e8bf1185b271c4e02c3803a527dd5ccbac |
| TM.8 | tm8.pdf |
Application for a re-entry permit | 2bcd666622f0aa99e16e4bcbac8d3eec8c06566d620e3a3d7d9799aaab41920a |
Where the values go
scripts/gen_layout.py finds the dotted lines and the boxes in these PDFs and
writes src/papers/layout.rs, which says where each value goes. TM.47 has no
dotted lines, so its blanks are measured from the lines drawn on it.
scripts/form_blanks.py lists a form's dotted lines with their labels, which
helps when a form changes:
uv run --with pymupdf python scripts/form_blanks.py forms/tm7.pdf
uv run --with pymupdf python scripts/gen_layout.py
gen_layout.py formats its output with rustfmt, so a rerun on the same forms
gives the same file. When the Bureau publishes a new version of a form,
replace the file, run gen_layout.py again, update the table above, and check every page of the
filled-in form against the blank before the change goes live.
The font
The values are written in Sarabun Regular (fonts/Sarabun-Regular.ttf), the
font the forms themselves use, by Cadson Demak, under the SIL Open Font
License 1.1 (fonts/OFL.txt), from
https://github.com/google/fonts/tree/main/ofl/sarabun.