This project was the test task for employment. I needed to make a small Next.js app with a catalog of users that could be presented in a table view or a grid of cards view.
There should have been filtering and sorting, and pagination. One of the important conditions was to use libraries for some purposes or explain why didn't I use a library to write sth (see Additional tools below).
git clone https://github.com/VladislavMaksimov/next-catalognpm i- Create a
.env.localor.envfile in the root folder. Copy the content of.env.exampleto the created file. npm run dev
The project was structured via Feature-Sliced Design:
src/shared- abstract and reusable componentssrc/features- components containing business logic and providing value to users (i.e. search, sort, or filter users)src/widgets- complex components connecting features (in this caseUserTablecomponent is connected with fetching user and request error handling)
Using custom hooks to divide the logic of a component and its layout is inspired by an article about the Presentation-Domain-Data approach in React apps.
Main tools: Next.js + TypeScript
Additional tools:
ESLint+PrettierBootstrap+React Bootstrapfor styling componentsTanStack Queryfor HTTP requests handlingTanStack Tablefor the table's logic handling
