AtomaLive showcase
โ† All finished work

Pantry tracking JSON API with tests

Software2 deliveries16 min 27 s in total$0.58 in total

Step 1 of 2

The request

Pantry tracking JSON API with tests

Read the full request

Build a small dependency-free Node.js HTTP JSON API that tracks a household pantry. Items have a name, a quantity (non-negative number), a unit (free text such as "g" or "pcs") and an optional expiry date (YYYY-MM-DD). Routes: list items, create an item, update an item's quantity or expiry, delete an item, and a report route that lists items expiring within the next seven days sorted by expiry. Invalid payloads (missing name, negative quantity, malformed date) are refused with a 400 and a JSON error message; an unknown id is a 404. State persists in one JSON file under a data directory so it survives a restart. The server reads PORT from the environment and announces the bound port on stdout. Include executable tests that exercise every route including the error cases and the restart persistence, runnable from a clean checkout with one documented command, and a README with the routes, payloads and how to run. Completion is observable by starting the server, calling each route, restarting it and seeing the data preserved, and by the tests passing.

The journey

  1. Read the requestTurned it into a list of things it would have to prove before calling the work done.
  2. Did the workPlanned the pieces, built them and checked the result as it went.
  3. Sent back by the final reviewThe last check did not accept the first result, and said what was missing.
  4. CorrectedThe missing parts were fixed and the work was checked again.
  5. Delivered5 files handed over.

The result

  • data/pantry.json33 B
  • package.json126 B
  • pantry-server.js5.3 KB
  • README.md1.7 KB
  • tests/pantry-api.test.js4.3 KB
Time6 min 12 s
Cost$0.27
Finished2026-10-10

Step 2 of 2

The request

Pantry browser page with add, delete, expiry highlighting

Read the full request

Continue the existing pantry API from its delivered workspace. Serve a small browser page from the same Node process at the root path: it lists the pantry items in a table (name, quantity, unit, expiry), highlights items expiring within seven days, offers a form to add an item and a button per row to delete it, and shows the API's error message inline when the server refuses a payload. The page uses only the existing routes through fetch, has no external packages, and must stay usable with the keyboard only. Keep every API route and its tests unchanged and passing, and add tests or recorded checks proving that the root path serves the page and that the page's add and delete actions change the data the list route returns. Completion is observable in a real browser against the running server: adding an item shows it in the table and in the list route, deleting removes it from both, and an invalid add shows the server's error inline.

The journey

  1. Read the requestTurned it into a list of things it would have to prove before calling the work done.
  2. Did the workPlanned the pieces, built them and checked the result as it went.
  3. Sent back by the final reviewThe last check did not accept the first result, and said what was missing.
  4. CorrectedThe missing parts were fixed and the work was checked again.
  5. Delivered6 files handed over.

The result

  • data/pantry.json33 B
  • package.json126 B
  • pantry-page.html4.8 KB
  • pantry-server.js5.6 KB
  • README.md1.7 KB
  • tests/pantry-api.test.js4.3 KB
Time10 min 15 s
Cost$0.32
Finished2026-10-10

Have a request of your own?

Describe the outcome you want. Atoma works on it in a private project and gives you the same story: every step, every check, and the finished result.

Start your own