This is a boilerplate/template project for building React.js applications, utilizing several modern technologies and libraries including Effector for state management, Farfetched for data fetching, Cypress for end-to-end testing, Bun as runtime, Vite for fast development environment, Storybook for component documentation and testing, react-testing-library and Jest for unit testing, and Emotion for styling.
- Effector: State management library for React applications.
- Farfetched: Lightweight and composable data fetching library.
- Cypress: End-to-end testing framework.
- Bun: Fast JS runtime.
- Vite: Fast, opinionated web dev build tool that serves your code via native ES Module imports during development.
- Storybook: UI component explorer for frontend developers.
- React Testing Library and Jest: For unit testing React components.
- Emotion: A performant and flexible CSS-in-JS library.
- Effortless state management with Effector.
- Simplified data fetching with Farfetched.
- Comprehensive testing capabilities with Cypress, Jest, and React Testing Library.
- Efficient styling using Emotion.
- Rapid development setup with Vite.
- Component documentation and testing facilitated by Storybook.
Make sure you have Bun installed on your machine.
- Clone the repository:
git clone https://github.com/jassix/react-boilerplate.git
- Navigate to the project directory:
cd react-boilerplate
- Install dependencies:
bun install
To start the development server, run:
bun dev
This will start the Vite development server.
To build the project for production, run:
bun run build
This will generate a production-ready build in the dist
directory.
To run unit tests using Jest, execute:
bun run test
Cypress is used for end-to-end testing. To run Cypress tests, use:
bun run test:e2e
To start Storybook and view your components in isolation, run:
bun storybook
/
βββ public/
βββ src/
β βββ app/
β β βββ providers/ - Applications providers
β β βββ layouts/ - Different layouts for your pages
β β βββ router/ - Router-Component, collect your routes in one place
β β βββ styles/ - Global styles for your app
β β βββ core.tsx - Root-Component, your providers and routing must will connected there
β β βββ index.tsx - Application entry-point
β βββ pages/ - Pages
β βββ widgets/ - Widgets
β βββ features/ - Features
β βββ entities/ - Entities
β βββ shared/ - Shared
β βββ api/ - All requests to API
β βββ lib/ - Additional local "libraries"
β β βββ media-query
β β βββ i18n
β βββ routing/ - Basement for routing, e.g. paths, or something else
β βββ config/ - General config for your app
β βββ ui/ - UI-Kit, with atomic design
β βββ atom
β βββ molecules
β βββ organisms
βββ package.json
This project is licensed under the MIT License.
Feel free to contribute to this project and tailor it to your specific needs! If you encounter any issues or have suggestions for improvements, please open an issue or create a pull request. Happy coding! π