- A button in the home page, click it can show the login form.
- Click the back, it will back to the previous page.
- You can register or simply login using the default account.
- Input the username(default is 'admin'), password(default is 'password'),clicking Login, it can send the form data to a fake endpoint.
- The website can show error message when the username or password is incorrect.
- After login, User can type the text in the input with given format(By clicking the submit button).
- On the left hand side, there is the nested menu, it's content depends on the json array passed.
- Click the Log out button on the right side of the header, you can log out
- Test coverage is 100%.
- Nested Menu
- Register
- Login and back button
- React v16.8.6
- TypeScript
- React testing library
- MSW for mocking test
- Emotion.js and Antd for the UI library
- Prettier and eslint for the code formatter
- Lint-staged and commitlint to make the commit message clear.
git clone https://github.com/TimurJiangShan/ts-menu
cd ts-menu
- Go to the project source code folder dictionary where
package.json
exists. - Run the following command to install dependencies:
npm run install
Using the following command to start the server
nodemon server.js
The backend runs on the http://localhost:8000
- Go to the project source code folder dictionary where
package.json
exists as Step1 mentioned. - Using following command
npm run start
The frontend runs on the localhost:3000
- Go to the project source code folder dictionary where
package.json
exists as Step1 mentioned. - Using following command
npm run test -- --coverage --watchAll=false
The frontend runs on the localhost:3000
Make sure the port
3000 and 8000 is available.