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
| Topic | Detail |
|---|---|
| Folder | web/ |
| Language | JavaScript, Node.js 22 |
| Framework | 16.4 (App Router), 19.3 |
| Database | none: all data goes through the API |
| Live address | https://trinity.jostud.com (prod), https://dev.trinity.jostud.com (dev) |
| Clients | grocery staff, in a browser |
| Tests | 18 tests in 6 files |
| Owner | Jean-Baptiste |
What the part does
Its architecture
app/page.jsbuilds the page on the server, on every request.lib/products.jsis the only file that talks to the API. Everything else goes through it.app/actions.jsholds 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 machine | Run the project |
| understand how the page gets the products | The path of a request |
| know the display and add rules | Products |
| read the real code explained | In depth |
| add a new page | Add a page |