Skip to content
mzbali.

FoodDash

Food ordering prototype with a menu and cart, built with React.

2021ArchivedReact, Docker

FoodDash

What it is

FoodDash is a small food ordering front end I built while learning React. It shows a menu of meals, lets you pick an amount for each and add it to a cart, and the cart opens in a modal with a running total. There is no back end, so the menu is fixed data in the app.

How it is built

  • Client: React with Vite and CSS modules.
  • Cart: React context with a reducer, so the header button and the cart modal read the same state.
  • Deployment: a multi-stage Docker build that serves the static files from nginx. GitHub Actions deployed it to CapRover on each push to main.

Screenshots

Menu with a list of meals

Menu List

Cart modal with items and total

Cart

What I learned

  • Context with a reducer was enough for a cart this size, without adding a state library.
  • A multi-stage build keeps Node out of the final image, which ends up as just nginx and the built files.
← All projects