What You Will Build

Avatar of Hemanta SundarayHemanta Sundaray

In this course, you’ll build an application that fetches and displays a list of users on the home page. Each user card has a View Details link that takes you to that user’s detail page. The application includes features to add new users and delete existing ones. It also supports search and pagination.

Here’s what the finished application looks like:

Home Page

Home page with user cards, search bar, and pagination

User Details Page

User details page

Add User Form

Add user form

Delete User Confirmation Dialog

Add user form

How the Backend Works

The application uses json-server as its backend. In the root of the project you cloned, you’ll find a db.json file. json-server takes this file and automatically generates a full REST API from it. Each top-level key in the file becomes an endpoint. For example, our db.json has a users key, so json-server creates a /users endpoint that supports GET, POST, PUT, PATCH, and DELETE requests. Any changes made through the API are persisted back to the file.

Note

json-server is a prototyping tool, not a production backend. But from the frontend’s perspective, it behaves like a real API. It accepts HTTP requests and returns JSON responses.

As you work through the course, you’ll encounter 3 query parameters — q, _page, and _limit — in the API calls. These are not names I chose arbitrarily; they are reserved parameter names defined by json-server.

  • q performs a full-text search across all fields. For example, GET /users?q=sophia returns all users where any field contains "sophia".
  • _page selects which page of results to return.
  • _limit controls how many items are returned per request.

You don’t need to understand json-server in depth to follow this course. Just know that when you see these parameters, they’re part of json-server’s API, and I’ll point them out when they first appear in the code.

Sign in to save progress

Stay in the loop

Get notified when new chapters are added and when this course is complete.