A Next + React SPA app that demonstrates:
- NextJS + React usage
- Next SWR
- React-Spring
- Integration with randomuser.me/api
- Material UI components
- Jest Unit + Snapshot tests
- Babel setup
- Storybook Component testing (w/ a11y testing)
- Multistage Docker builds
Please have the following installed:
NOTE: for Windows users, please use a terminal that supports Linux commands. Here are a few
After cloning, run:
yarn install
To run the development server:
yarn dev
Open http://localhost:3000 with your browser to see the result.
A dockerfile is included, run:
sh build.sh
OR
docker build -t randomusernextjs .
docker run -p 3000:80 -d randomusernextjs
Open http://localhost:3000 with your browser to see the result.
Using Jest testing framework.
This will fire off
- unit tests
- snapshot tests
- TODO: integration test
yarn test
Storybook Component Library + the a11y addon is activated for accessibility testing.
yarn storybook