HTMX Tent Store — HTMX

Fill Mas Satria's files so the Gudang RW 07 site works with no script, then runs faster with htmx. 14 levels, right in the browser.

What the levels ask

  1. Grandma Marni opens the store site on Opera Mini in data saver mode: no script runs. Bagas uses Chrome with htmx. Both pick Sabtu 14 Nov and tap Cek, and both must reach the availability page for that date. Finish the form on the home page.
  2. Bagas taps Buku in the menu, then Beranda, then Cek in the date form. Every tap reloads the whole page and the screen flashes white. Have htmx take over this page's links and form, without stopping Grandma's phone from working.
  3. On the loan page, the name, item and amount fields sit in a <div id="pinjam">, and the Pinjam button carries hx-post. Bagas can borrow; Nenek taps and nothing happens. Fix what wraps the fields so Grandma Marni (20 chairs) and Bagas (2 tables) are both written down and reach their loan's details.
  4. The /cari page: the search box sits in a <form action="/cari"> that also carries hx-get and hx-target="#hasil". Nenek searches "sari" (a plain form, a new page), Bagas searches "tono" (htmx swaps the answer into #hasil). One address, two askers. Pick what the laptop answers in each branch of server.js.
  5. On the Barang gudang page, the Muat ulang link requests /barang through htmx and swaps the answer into #stok. The laptop always answers the whole page. Mr. Tono just cancelled 30 chairs: after the reload the list must say Kursi: 150 dari 200, once, with no page inside the page.
  6. The search box now asks on its own as you type (hx-get, hx-target="#hasil"). Bagas types "bu", pauses, types " s", pauses, then moves the cursor with an arrow key. The laptop may be asked twice at most, once each time Bagas pauses. Nenek still searches with the Cari button.
  7. The loan book has four pages. Under its list sits an <li id="lanjut"> row with a Halaman berikutnya link that requests the next page through htmx into #lanjut. Bagas only scrolls, three times, and must see all 38 loans in one flat list. Nenek taps the link and reaches the last page.
  8. Every page's header shows a Kursi siap Sabtu number (<span id="sisa">). The loan form swaps the new loan's row into the top of this Saturday's list through htmx. Mrs. Yanti borrows 30 chairs: the number in the header has to drop to 90 with no reload. Mr. Tono (an old phone, no script) borrows 10 chairs and is redirected to a new page. Finish the laptop's answer to htmx.
  9. The Halaman berikutnya link in the loan book now swaps #isi through htmx. Bagas opens page 2, then 3, opens one loan's details, presses Back, then copies his phone's address and sends it to Nenek on WhatsApp. Nenek must see the same page 3.
  10. Requests to /cari come three ways: the search box (htmx, into #hasil), the Cari menu link (boost), and Back after the details (#hasil carries hx-history="false", so htmx asks for the page again). Nenek and Bagas both open Cari from the menu, search "tono", open the details, then go back. Pick the condition in server.js for when the laptop answers rows only.
  11. The Karang Taruna already took 80 chairs for the art night, so Saturday has 40 left. Mr. Tono (no script) asks for 50, Mrs. Sari (htmx, a boosted page) asks for 60: both must see the refusal "tinggal 40", then borrow 30 and 40 and reach the details. Pick the refusal status in server.js and, if needed, htmx's answer rules in <head>.
  12. Nenek now uses TalkBack in Chrome. After she taps Pinjam, htmx replaces the form with a <div id="nota"> receipt (hx-target="this", hx-swap="outerHTML"). Her screen reader has to read that receipt at once: focus has to move to #nota. Mr. Tono (no script) is redirected to the details page as usual.

And more, 14 levels in all.