
Commencis Starter - React Vite provides a streamlined foundation for building modern React applications with Vite. Designed to maximize development speed and efficiency, this template allows for quick setup and seamless scaling. Its flexible structure supports diverse project requirements right out of the box.
- β‘οΈ Vite 6
- π React 19
- π¨ SCSS Modules / Abstractions
- βοΈ Environment / Config Management
- π i18next
- π httpClient
- π οΈ Providers / Services / API
- π Module / Page Structure
- π Redux Toolkit
- π οΈ RTK Query
- π£οΈ React Router 7 (Library Mode)
- π Vitest
- π¦ Mock Service Worker
- π Storybook
- π₯οΈ Node 20
- π¦ PNPM
- β¨ Commencis JS Toolkit Integrations:
- ESLint, Prettier, Stylelint, Commitlint, Lint-Staged
Before you begin, ensure you have node: >= 22.14
installed on your system.
This project uses pnpm
as the package manager. You can install it either by activating with corepack
which is the recommended way:
corepack prepare pnpm@latest --activate
corepack enable pnpm
or install globally on your system with npm.
npm install -g pnpm
Run the following command to install project dependencies:
pnpm install
To start the development server, run the following command:
pnpm dev
This will launch the development server and you can access your application at http://localhost:3000
.
Note: Some libraries and folders, such as MSW, Storybook, Redux, and RTK, can be removed if they are not required for your project. For example, if you are using this template for an onboarding project and do not plan to showcase components or mock API calls, you can safely remove Storybook or MSW.
Refer to the sections below for more details on their locations and use cases.
src/ # Main source folder for the project, used for development
βββ assets/ # Static assets like fonts, icons, and localization files
β βββ images/ # PNG and JPEG image assets
β βββ fonts/ # Font files used in the application
β βββ icons/ # SVG icons used in the application
β βββ locales/ # Localization files for different languages
β
βββ components/ # Reusable components
β βββ common/ # Common components (e.g. UserCard, PromoBanner, ListItem)
β βββ error/ # Error components (e.g. Error404, Error500)
β βββ layout/ # Layout components
β βββ ui/ # Base UI components (e.g. Button, Text, Input)
β
βββ config/ # Configuration files
βββ constants/ # Constant values used throughout the application
βββ hooks/ # Custom React hooks
βββ layouts/ # Layout components for different pages
β
βββ lib/ # Library files
β βββ http/ # HTTP client configuration (includes `makeRequest` with env support)
β βββ i18n/ # Internationalization setup
β βββ mocks/ # Mock data for testing (MSW is used for API mocking)
β
βββ modules/ # Feature-specific modules
β βββ home/ # Sample home module (modify or remove as needed)
β
βββ pages/ # Page components
β βββ home/ # Sample homepage component (modify or remove as needed)
β βββ not-found/ # Not Found page component (router fallback included)
β
βββ providers/ # Context providers for the application
β βββ ErrorBoundary/ # Error boundary component
β βββ PreferencesContext/ # Preferences provider for theme & language selection
β
βββ router/ # Routing components and configuration
β βββ PrivateRoute/ # Private route component
β
βββ scripts/ # Scripts for various tasks
β
βββ services/ # Service layer for API calls
β βββ auth/ # Authentication service
β βββ user/ # User service
β
βββ store/ # Redux store configuration (Redux Toolkit implemented)
β βββ hooks/ # Hooks for accessing the store
β βββ slices/ # Redux slices for state management
β
βββ stories/ # Storybook related files (https://storybook.js.org)
β
βββ styles/ # SCSS styles and mixins (https://sass-lang.com)
β βββ abstracts/ # Abstract styles (e.g. breakpoints, colors)
β βββ base/ # Base styles (e.g. fonts, variables)
β βββ functions/ # SCSS functions
β βββ mixins/ # SCSS mixins
β
βββ types/ # Type definitions
βββ utils/ # Utility functions
We welcome contributions to improve this project. Feel free to open issues or pull requests to suggest enhancements or report any issues.
Important
For developers contributing to this project, it's important to familiarize yourself with these tools, as they are integral to the workflow and code quality standards.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Β© Commencis, 2025. All rights reserved.