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-catalog
npm i
- Create a
.env.local
or.env
file in the root folder. Copy the content of.env.example
to 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 caseUserTable
component 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
+Prettier
Bootstrap
+React Bootstrap
for styling componentsTanStack Query
for HTTP requests handlingTanStack Table
for the table's logic handling