This project is a test task for Buena. It's a React SPA that implements an onboarding flow.
🔗 Live demo: https://buena-onboarding.netlify.app/
- React with Browser Router
- Typescript
- Vite
- Zustand
- Tailwind CSS
- Cypress
- Jest
- ESLint
- Prettier
- Github Actions for CI
- Netlify for hosting
- Storybook
- Single Page Application with browser routing: home page, success page and the onboarding flow that consists of 5 pages. Read more about onboarding flow pages configuration in this design note.
- Responsive markup. This is where Tailwind CSS comes in. Probably the most complex part was to ensure great UX on mobile. I had to duplicate the "Next" button for mobile and desktop screens.
- Page-agnostic "Next" button. It's a separate component that is used on every page of the onboarding flow. Read more about it in this design note.
- Onboarding checklist on desktop. I think for users it's very important to keep track of where they're in the onboarding and be able to easily navigate between steps. Open the website from your laptop to check out that awesome Sidebar component. Read more about it in this design note.
- To give users on mobile the same experience, I've added a progress bar at the top of the screen. Read more about it in this design note.
- Unit tests with Jest. I've simply followed positive/negative/edge case approach. Soon I'll add coverage support and more tests. In the meantime, you can check out the complete unit test file for the Name onboarding screen. I also added GitHub action that reports test results on pull requests. Example.
- E2E tests with Cypress. I've added a few tests to check if the onboarding flow works as expected. Again, I'll add more tests soon. Both unit and E2E tests are run on every push to the main branch via Github Actions. Take a look at a sample build. 🔥
- Storybook. I add well-defined atomic components to the storybook. You can find the live here: https://buena-onboarding-storybook.netlify.app/
- Surprise feature. 🎁 Try the onboarding flow and reach the end: https://buena-onboarding.netlify.app/
The onboarding was built with flexibility in mind. All components are decoupled from the notion of a specific onboarding page as possible.
The order of pages is configured via the onboarding-pages.json
config file.
Check out the this design note for more details.
Of course, I was short on time and haven't done everything I wanted to do. Here's the list of things I'd like to add/improve:
- Make submit button page-agnostic
- Create static page to handle page refresh (Netlify redirects config)
- Make mobile "Next" button page-agnostic
- Add coverage support for Jest
- Add Storybook
- a11y
- Add robots.txt
- Add SEO meta tags
- Add i18n support (I bet we'll have DE and EN-speaking users)
- Use keyboard for navigation
- Add more animations and transitions
- Introduce a design system and align the look and feel of all components
- Spacing
- Colors
- Typography
- Grid
- Add more unit and E2E tests
- Dockerize the app
- Clone the repo
- Run
npm install
to install dependencies - Run
npm run dev
to start the development server
- Run Jest unit tests with
npm run test
- Run Cypress tests with
npm run cypress:open
This project is released under the MIT Licence. Feel free to use, modify, and redistribute the code under the terms of the licence.