Hi r/htmx,
I've been building Skolshield, a system Swedish schools use to report incidents (hallway conflicts, bullying, rule violations) and handle the cases that follow, up to the student health team meeting. It's Django + HTMX with no React or Vue anywhere. It has been a side project for over a year, built while working full time with two young kids.
Some numbers to give you a sense of the size: about 340 templates use HTMX, with around 940 hx-targets, 700 hx-gets and 330 hx-posts. My own JavaScript is about 1,800 lines across 14 files plus some small inline scripts. Most of that is a mention editor, file permission handling and a few UI helpers.
What worked
- One view, three templates. Each page has a full template for direct URL visits, an HTMX version for sidebar navigation (header + content, no base layout), and a partial for search, filter and pagination updates. The view checks HX-Request and the query params to decide which one to return. It's boring, but every page behaves the same way, and hx-push-url keeps the back button and shareable links working.
- Inline editing everywhere. I retired the old "edit page" entirely. You click a field, it swaps to an input, and saving swaps it back. Users like it a lot more.
- Tabs, modals and live lists without a frontend framework. Everything renders on the server, so permissions are checked in one place. That matters when the data is about kids.
- Toasts via Django messages. Views just use messages.success(...) and the response turns them into toasts, whether it's a full page or an HTMX partial.
What bit me
- Bootstrap modals + HTMX swaps. If a modal gets swapped into the page inside a container, it renders under its own backdrop and the whole screen locks. I ended up with a small helper that moves each modal to <body> after its markup, and a rule that every new modal must call it.
- hx-confirm looks like 1999. The browser's native confirm dialog looked out of place, so I replaced it with the app's own modal.
- Session timeout with background requests. Polling and heartbeat requests kept sessions alive forever, and an expired session returned a login page into a tiny div. Now the heartbeat marks itself as an HTMX request, the server knows it's not user activity, and an expired session shows a proper lock screen instead of a page in a page.
- Template comments. This one is really Django, but HTMX made it obvious: a multi-line {# #} comment gets rendered as visible text in partials.
Stack, briefly: Django 5.2, PostgreSQL, HTMX, Bootstrap 5, Celery + Redis, CapRover on Hetzner, with everything EU-hosted. I wrote more about the backend, SharePoint integration and ops side over on r/django: https://www.reddit.com/r/django/comments/1xmogay/i_built_a_school_incident_and_student_welfare/
There are demos, including one set up for a municipality with several schools and a central student health team: https://skolshield.se
I'd like to hear how others handle modals and toasts with HTMX, since I'm sure my approach isn't the only one. I'm also happy to answer questions.