Skip to content

Web front end: overview ​

The web front end is the grocery's internal back office: one page that shows the products and lets you add and delete them, by calling the API.

At a glance ​

TopicDetail
Folderweb/
LanguageJavaScript, Node.js 22
Framework 16.4 (App Router), 19.3
Databasenone: all data goes through the API
Live addresshttps://trinity.jostud.com (prod), https://dev.trinity.jostud.com (dev)
Clientsgrocery staff, in a browser
Tests18 tests in 6 files
OwnerJean-Baptiste

What the part does ​

Its architecture ​

  • app/page.js builds the page on the server, on every request.
  • lib/products.js is the only file that talks to the API. Everything else goes through it.
  • app/actions.js holds the : the add and delete forms call them, and they run on the server.

Before you start

If Next.js, React or Server Actions mean nothing to you, read The basics first.

Going further ​

You want to…Read
run the web on your machineRun the project
understand how the page gets the productsThe path of a request
know the display and add rulesProducts
read the real code explainedIn depth
add a new pageAdd a page