No description
  • JavaScript 32%
  • CSS 27.8%
  • Kotlin 22.1%
  • Pug 18%
Find a file
user 407e67a343 Contact messages record which link brought the sender (?ref=)
Owner, 2026-10-12 (selection, B-5 of docs/b2b/plan.md in the hiot
monorepo): "Yes, build it" — so the weekly review of the B2B channels can
see which channel brings replies.

- server.js: cleanRef() keeps only a short lower-case tag ([a-z0-9-],
  1–32); anything else is dropped, never stored or echoed. GET /?ref=hn
  renders it into the form; POST /contact stores it.
- landing.pug: a hidden `ref` field in the contact form, only when present —
  so it works with JavaScript off too. contact.js sends it in the JSON.
- db.js: `ref` column, added IN PLACE to an existing database (the live one
  has messages); the app API returns it.
- android: the message screen shows "Came from" when a message has a ref.

Checked: npm test 37/37 (incl. hostile/overlong refs, the no-JS form post,
and upgrading an old database with a row in it); hiot's
check-contact-popup.py 43/43 in Chromium opening the page with ?ref= —
and red (2 failures) against the previous build, so the check can fail;
on the bench Pixel the message screen shows "Came from: popup-check".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 20:39:04 +02:00
.sajt Contact messages record which link brought the sender (?ref=) 2026-10-12 20:39:04 +02:00
android Contact messages record which link brought the sender (?ref=) 2026-10-12 20:39:04 +02:00
data Deploy: the contact database lives in the repo's data/, which git creates 2026-10-12 18:48:10 +02:00
deploy Gurgul-PRO: an Android app for the contact messages, with Firebase push 2026-10-12 20:05:19 +02:00
test Contact messages record which link brought the sender (?ref=) 2026-10-12 20:39:04 +02:00
testing Serve the site with Express; remove the memos 2026-10-11 13:39:31 +02:00
.gitignore Deploy: the contact database is ~/.data/contacts.sqlite3 2026-10-12 18:50:08 +02:00
artur-gurgul-resume.yaml CV unpublished; intro buttons hidden behind a switch 2026-10-09 08:04:38 +02:00
db.js Contact messages record which link brought the sender (?ref=) 2026-10-12 20:39:04 +02:00
DEPLOY.md Gurgul-PRO: an Android app for the contact messages, with Firebase push 2026-10-12 20:05:19 +02:00
index.md "Also good at": remove MQTT, Rust, Azure and AWS 2026-10-12 16:01:52 +02:00
package-lock.json "Get in touch": a contact popup next to LinkedIn, stored in SQLite 2026-10-11 14:35:54 +02:00
package.json "Get in touch": a contact popup next to LinkedIn, stored in SQLite 2026-10-11 14:35:54 +02:00
push.js Gurgul-PRO: an Android app for the contact messages, with Firebase push 2026-10-12 20:05:19 +02:00
README.md Deploy files: systemd unit, nginx config, and DEPLOY.md step by step 2026-10-11 16:13:46 +02:00
server.js Contact messages record which link brought the sender (?ref=) 2026-10-12 20:39:04 +02:00

ignore
true

artur.gurgul.pro

The source of https://artur.gurgul.pro: a single landing page, served by Express.

  • index.md: the page's data (front matter only).
  • .sajt/layouts/landing.pug + art.pug: the page itself.
  • .sajt/static/: CSS, fonts and favicon, served at /static.
  • server.js: the Express app. It renders landing.pug on every request.

The views still live under .sajt/ from when Sajt built this site as static pages. They will move once the hosting has moved to Express.

Run

npm ci
npm start                      # http://127.0.0.1:3000
PORT=8080 HOST=0.0.0.0 npm start
npm test

Requires Node.js 20 or newer.

Deploy

The server setup (systemd service, nginx, contact database) and the steps to switch the live site over are in DEPLOY.md. The files are in deploy/.