Boilerplate : PWA project using vite, react, zustand, tailwindcss, vitest, playwright and more!
β¨ Demo
Look a project using this boilerplate
Use has template
Customize pages how you need!
-
Created using vite a very fast front-end tooling
-
Toasts with react-tostify
-
zustand for global state management
-
React query for request state management
-
Base service to manage your requests
-
Mocks with miragejs
-
Vitest for unit tests and code coverage collect
-
Playwright for E2E testing with multi-browser support
-
Comprehensive testing suite (unit, component, and E2E tests)
-
PWA support with offline capabilities
-
TypeScript support for type safety
-
Tailwind CSS for styling
-
Comprehensive documentation in
/src/docs
Boilerplates are pre-made templates or frameworks that contain a foundational structure, configurations, and often basic functionalities for a particular type of project. They're designed to help kick-start development by providing a starting point, allowing developers to avoid repetitive setup tasks and focus on building specific features.
You can get more boilerplates in this github profile: click here for more boilerplates π©πΎβπ€
npm installnpm run dev
Open link in your favorite your browser: http://localhost:5173
Run unit tests with Vitest:
npm run testRun tests with coverage:
npm run test:coverageRun E2E tests with Playwright:
# Run all E2E tests
npm run test:e2e
# Run E2E tests with UI mode
npm run test:e2e:ui
# Run E2E tests in headed mode (see browser)
npm run test:e2e:headed
# Run E2E tests in debug mode
npm run test:e2e:debug
# Run tests on specific browsers
npm run test:e2e:chromium
npm run test:e2e:firefox
npm run test:e2e:webkit
# Run tests on mobile viewports
npm run test:e2e:mobile
# View test report
npm run test:e2e:reportnpm run playwright:installThe project includes comprehensive test coverage including:
- Unit tests for components and utilities
- Component tests with React Testing Library
- E2E tests covering critical user flows:
- Login and authentication
- Chat functionality
- Profile management
- Settings page
- Navigation flows
- API feedback states
- Community features
- Groups management
For more details, see the Testing Documentation and E2E Documentation
vite - Fast front-end tooling
react - UI library
typescript - Type safety
pwa - Progressive Web App support
zustand - Global state management
react-query - Server state management
tailwindcss - Utility-first CSS framework
vitest - Unit testing framework
playwright - E2E testing framework
@testing-library/react - React component testing
miragejs - API mocking
firebase - Backend services
radix-ui - Accessible UI components
Comprehensive documentation is available in the /src/docs directory:
- Getting Started - Quick start guide
- Project Structure - Codebase organization
- Testing Guide - Testing strategies and examples
- API Integration - API setup and usage
- State Management - Zustand and React Query usage
- Styling Guide - Tailwind CSS best practices
- Deployment - Deployment strategies
- E2E Testing Specs - BDD specifications for E2E tests
boilerplate-reactjs-testes/
βββ e2e/ # E2E tests with Playwright
β βββ tests/ # E2E test files
β βββ login.spec.ts
β βββ chat.spec.ts
β βββ profile.spec.ts
β βββ settings.spec.ts
β βββ navigation.spec.ts
β βββ community.spec.ts
β βββ groups.spec.ts
β βββ api-feedback.spec.ts
βββ src/
β βββ commons/ # Shared components and utilities
β β βββ components/ # Reusable components
β βββ pages/ # Page components
β β βββ Chat/
β β βββ Community/
β β βββ Groups/
β β βββ Profile/
β β βββ Settings/
β βββ docs/ # Project documentation
β βββ mocks/ # API mocks with MirageJS
βββ playwright.config.ts # Playwright configuration
βββ vite.config.js # Vite and Vitest configuration
βββ vitest.setup.ts # Vitest setup file
The E2E tests are configured to run on:
- Desktop: Chrome, Firefox, Safari (WebKit)
- Mobile: Chrome (Pixel 5), Safari (iPhone 12)
The testing setup is optimized for CI/CD environments:
- Configurable retry logic for flaky tests
- HTML and JSON reporters for test results
- Screenshots and videos on test failure
- Parallel test execution support
- Coverage reporting
π€ Anderson Lima (Lemon π)
- Website: https://lemon.dev.br
- Twitter: @andersonlimahw
- Github: @andersonlimahw
- LinkedIn: @andersonlimahw
give a β if this project helped you!


