This project is designed to allow you to showcase your React skills by building a simple application that consumes a mock back end API.
- Clone the repository (ensure the Git history is preserved, and commit your changes as you go. This is a key part of the test and any submissions without a Git history will be rejected.) We're not looking for you to commit every change, but want to see your process in action.
- Run
yarn install
(the project is bootstrapped using Yarn but feel free to use another package manager if you prefer) - Run
yarn dev
to start the application. It will be available at Vite's default location of http://localhost:5173/ - Run
yarn start-server
to start the mock back end. You should see a message in the console sayingJSON Server started on PORT :3000
and a list of available endpoints.
Note: When running start-server
the file db-source.json
will be copied to db.json
. This is to ensure that the mock data is reset to its original state
when starting up. Any newly created data will be lost when the server is restarted.
If you experience any issues running the project, please contact Drew Spencer.
The task is to complete the development of a simple application that lists users and their roles.
An application skeleton has been provided for you. It contains some basic routing, and a few pages have been scaffolded for you.
The applications already has the following features:
- A basic page that lists all users as cards.
- A set of filtering options for the users, which currently do nothing.
Modify the application as follows:
- Implement the filters in the expandable panel at the top of the 'List Users' page. You should design it so that it could handle a very large number of records in the future.
- The 'List Users' page should also allow the user to see all users in a table. The table should include some standard features such as sorting and pagination.
- Add a detail page for the user that shows their details and a list of roles they belong to.
- Add a page that allows editing of an existing user. For this you can call
PATCH /users/:id
with the appropriate data. - Add the ability to group users by their roles.
- Complete as many of the tasks as you can. You may decide to complete them all at a basic level, or you may decide to complete only some of them to a higher standard.
- You should use React Router for navigation and Mantine for UI components.
- You can use any other libraries you like, as long as you can justify their use.
- You may restyle and restructure the application as much as you like.
- You may find the documentation for json-server useful: https://github.com/typicode/json-server/tree/v0
What we are looking for:
- A well-structured, maintainable application.
- A good user experience.
- State management that is appropriate for the application.
- Good use of typescript features.
These tasks are designed to allow you to showcase your knowledge of the React ecosystem and your ability to configure a project. They are not essential to your application, but are designed to give you a chance to showcase your experience with JS/TS tools.
Being based on a standard template (original README left below), this project contains some configuration that your team has deemed undesirable.
Please attempt to modify the configuration as follows:
- Set up typescript so that all files use imports based on the src folder. For example
import { Welcome } from 'components/Welcome/Welcome'
should work. - Change the prettier configuration so that no files contain semi-colons.
- Set up a Mantine theme with some additional styling.
Please feel free to make any other changes you think can improve the project.
Recommended time limit: 4-8 hours
This template comes with the following features:.
- PostCSS with mantine-postcss-preset
- TypeScript
- Storybook
- Vitest setup with React Testing Library
- ESLint setup with eslint-config-mantine
dev
– start development serverbuild
– build production version of the apppreview
– locally preview production build
typecheck
– checks TypeScript typeslint
– runs ESLintprettier:check
– checks files with Prettiervitest
– runs vitest testsvitest:watch
– starts vitest watchtest
– runsvitest
,prettier:check
,lint
andtypecheck
scripts
storybook
– starts storybook dev serverstorybook:build
– build production storybook bundle tostorybook-static
prettier:write
– formats all files with Prettier