An expense tracker

The problem

Build a page where a person can record spending, see totals for each category, delete mistakes, and find everything still there when they come back.

Requirements

Technologies

Step by step

  1. Decide on the shape of one expense object, including an id.
  2. Write functions that load and save the list, with a try block and a shape check.
  3. Write the HTML: the form, the filter, the totals and an empty list.
  4. Write one render function that draws everything from the list and the filter.
  5. Handle the form's submit event, with checking and a helpful error message.
  6. Use one click listener on the list to handle deleting.
  7. Calculate the totals with reduce, keeping the amounts as whole numbers of the smallest unit.
  8. Add the sample data button, with loading, success and failure states.
  9. Reload the page to test saving, then damage the saved text on purpose and reload again.

Expected result

A small but real application whose data survives a reload, which never shows a wrong total, and which copes with bad input and bad stored data.

How it is evaluated

Ways to improve it