Solid Harvest Box — SolidJS

Open a farmers’ group SolidStart site on slow 3G: SSR, streaming, hydration, actions and preload. 13 levels, right in the browser.

What the levels ask

  1. Thursday evening, orders for KWT Seruni’s harvest boxes open. Ms. Wiwit built the site with SolidStart, but Grandma Marni, at her house on the paddy dike with one bar of 3G, says her screen stays white. Pick the value of ssr in vite.config.js. Grandma Marni must see the order form within 3 seconds of asking for the site.
  2. This week’s boxes left are read from the tally at the field post, over its own link that is also one bar: its answer takes about 5 seconds. Mr. Tono opens the site from the hut in the middle of the paddies. Pick the mode in entry-server.jsx. The form must show within 3 seconds, and the boxes left within 7 seconds.
  3. Streaming is on. Ms. Wiwit tidies the home page and asks: with streaming on, is <Suspense> still needed? Mrs. Yanti opens the site from the market food stall. Pick the content of <main> in routes/index.jsx. The form within 3 seconds, the order list within 3.5 seconds, the boxes left within 7 seconds.
  4. Ms. Wiwit adds a delivery map card: Gumuk Hamlet’s map from the village survey, a heavy file. Mrs. Sari types her name, then at 6 seconds taps the + button because she wants two boxes, then Order. Pick how routes/index.jsx imports PetaAntar. The + button must be awake by 5.6 seconds, Mrs. Sari must be in the book for 2 boxes, and the map must show within 6 seconds.
  5. The neighbourhood head, at the night watch post, checks his neighbours’ orders. He taps Lihat semua pesanan (see all orders) as soon as the home page is awake. The /pesanan page has its own code, and its data comes from the server. Fill the two parts of routes/pesanan.jsx. The details must show within 3.3 seconds of the neighbourhood head’s tap, and his phone may send only one request to the site after that tap.
  6. Friday afternoon. Mr. Harun’s phone has a data saver that blocks JavaScript; he orders from the bus terminal. Bagas, on his way home from school, taps Order as soon as the form shows, before the script has finished coming down. Pick the form in FormPesan.jsx. Mr. Harun’s order and Bagas’s must each reach the book exactly once.
  7. Mr. Jaya orders from the edge of the quarry. If the screen sits still, he taps again a second later. The server’s answer over 3G takes a few seconds. Pick the Order button’s attribute in FormPesan.jsx. Mr. Jaya’s order must reach the book exactly once.
  8. Saturday afternoon. The motorbike taxi driver complains: every order, his app gets asked for the schedule again. Ms. Wulan orders from the post office. After the order, the home page must show the new list and the new boxes left. Fill three parts: the action in panen.js, its answer in kebun.js, and the home page’s preload. After Ms. Wulan taps Order, her phone may send only one request; the list and the boxes left on her phone must match the book; the motorbike taxi schedule must not be asked again.
  9. Sunday. Ms. Wiwit adds a clock line: orders close at 20.00. "The time is right on my laptop," she says. The KWT’s server runs in the UTC time zone. Mr. Karim opens the site from the pier. Pick the content of JamTutup.jsx. The clock line must show within 3 seconds, and from the moment it shows it must say Mr. Karim’s phone time in Gumuk (WIB).
  10. Monday evening, the tally’s battery at the field post is flat: every question about the boxes left fails. Orders must still go through. Grandpa Rimba orders from his herb hut by the forest, six seconds after opening the site. Pick the content of <main> in routes/index.jsx. The form must stay on Grandpa Rimba’s screen, and his order must reach the book once.
  11. Tuesday evening, Bagas tidies SisaKotak.jsx: the number is read once into a jumlah variable (see as Bagas changed it). Before the change goes in, the tests run with Vitest and @solidjs/testing-library. This test decides: if it passes, Bagas’s change goes onto the site. Pick the check line in SisaKotak.test.jsx. The test must pass on Ms. Wiwit’s code and fail on Bagas’s change, so that Rara’s phone keeps showing the right boxes left.
  12. Wednesday evening, Bagas removes disabled from the Order button: "the button must not flicker". The test FormPesan.test.jsx taps the button twice with a slow mock simpanPesanan. Pick its check line. The test must pass on Ms. Wiwit’s code and fail on Bagas’s change, so that Bagas himself, who likes to tap twice, is still in the book once.

And more, 13 levels in all.