This is a simple application designed to test the following technologies: React (with TypeScript), Material UI, TanStack Query, and Vite as the build tool.
To clone the repository, open your terminal and run the following command:
git clone https://github.com/YuliyaMinsk/tanstack-query-app.git
In the terminal, navigate to the repository folder and install the necessary packages by running:
npm install
Compile the application by running the following command in the terminal:
npm run build
This will create a 'dist' or 'build' folder (depending on your configuration) containing the compiled application files.
To preview the production build on your local machine, run the following command in the terminal:
npm run preview
This will start a local web server, and you can view the application in your web browser by navigating to the provided URL (typically "http://localhost:port", where "port" is the port number used by the server).
- Install json-server globally:
npm install -g json-server
- Start the mock API server by running the following command:
json-server --watch db.json --port 5000
This command will start a mock API server at http://localhost:5000.
The following endpoints are available for use in the User Management Dashboard:
GET /users:
Fetch all usersGET /users/:id:
Fetch a specific user by idPOST /users:
Add a new userPUT /users/:id:
Update a user by idPATCH /users/:id:
Partially update a user by idDELETE /users/:id:
Delete a user by id
Good luck!