Welcome to the Mendix Deployment Hub
This site is an Express + TypeScript application serving EJS. Its pages are
plain markdown files kept in the project's /.md folder and rendered
server-side, while Mermaid diagrams are drawn in the
browser.
flowchart LR
MD["/.md files"] -->|marked| HTML["Server-rendered HTML"]
HTML --> EJS["EJS template"]
EJS -->|Mermaid code fence| M[Mermaid.js]
M --> Diagram["Rendered diagram"]
What's inside
| Piece | Where | Responsibility |
|---|---|---|
| Express app | src/ |
Routing, markdown rendering, visit tracking |
| EJS views | views/ |
Layouts, auth widget, visitor report |
| Markdown | /.md |
The pages you are reading |
| Lakebase Postgres | Neon | visitors table + Neon Auth users |
| Neon Functions | Neon | Visitor API running next to the data |
Every non-admin visitor gets a unique, long-lived browser id. The
/kaspage solves for how many different people visited — protected by a password stored in.env.
Diagrams on demand
Any fenced mermaid block becomes a live diagram:
sequenceDiagram
participant B as Browser
participant E as Express (this app)
participant F as Neon Function (visitor API)
participant P as Lakebase Postgres
B->>E: GET / (any page)
E->>P: UPSERT visitor row (count + 1)
P-->>E: ok
E-->>B: rendered page
B->>E: GET /kas (password unlocked)
E->>F: GET /visitors (X-Secret)
F->>P: SELECT visitors
P-->>F: rows
F-->>E: JSON
E-->>B: unique visitor report
Continue to the deployment guide for how this app ships to its Neon branch.