Modern React 19 template with TypeScript/JavaScript using Vite
- Modern Frontend Stack - React 19 + Vite 6 + TypeScript 5.7
- Language Flexibility
- ECMAScript (JavaScript)
- ECMAScript with JSDoc typecheck
- TypeScript
- UI/UX Excellence
- Ant Design 5.23 with full theme support
- Light/Dark theme toggle with system preference detection and localStorage persistence
- Customizable Ant Design design tokens with component overrides
- Responsive design with SCSS modules
- State Management - Redux Toolkit with React-Redux
- Internationalization - i18next with Korean/English/Japanese support and automatic language detection
- Developer Experience
- Hot Module Replacement (HMR)
- ESLint + Prettier configuration
- Atomic design pattern (atoms/molecules/organisms/templates)
- JSDoc documentation generation
- Dev Container support
- Testing & Quality - Vitest integration
- Routing - React Router DOM v6 with nested routes
- Performance - Bundle optimization with Lodash tree-shaking
Customize Ant Design tokens and component themes in src/lib/themeConfig.jsx
. The example configuration overrides the global colorPrimary
, adjusts component styles, and persists the user's theme preference in localStorage
.
Latest β | Latest β | Latest β | Latest β | Latest β |
- Node.js >=18
- npm or yarn
- Clone or download template
npx degit comnori/vite-template-awesome-soho my-app
cd my-app
- Install dependencies
npm install
# or
yarn install
- Initialize git repository
git init
Project
βββ assets // like svg
βββ components // atomic design
β βββ atoms
β βββ molecules
β βββ organisms
β βββ templates
βββ config // project configuration
β βββ i18n // i18next resource
β β βββ {lang} // ISO 639-1 Language Code [en,...,ko]
β β β βββ translation.json
β βββ MenuItems.js
β βββ Router.js
βββ context // React Context
β βββ {context name} // Context domain name
β βββ components // Context related components
β βββ hooks // Context related hooks
βββ features // Redux
β βββ {reducer name}
βββ hooks // common hooks
βββ lib // Library configuration
β βββ components
β βββ {library name}Config.js
βββ pages // Pages
β βββ {domain}
β β βββ {page}
β βββ {page}
β β βββ components // children for page
β β βββ {page}.jsx
β β βββ {page}.module.scss // module scss
βββ utils // common utils
4. **Start development server**
```bash
npm start
# or
yarn start
- Optional: Setup VS Code SDK (for Yarn users)
yarn dlx @yarnpkg/sdks vscode
npm start
- Start development server (port 3000)npm run build
- Build for productionnpm run test
- Run tests with Vitestnpm run lint
- Run ESLintnpm run type
- Generate TypeScript declarationsnpm run doc
- Generate JSDoc documentation
React 19 β’ TypeScript 5.7 β’ Vite 6 β’ JavaScript ES2024
Ant Design 5.23 β’ SCSS Modules β’ CSS-in-JS
Redux Toolkit β’ React Router v6
Axios β’ i18next β’ Day.js β’ Pino Logger
ESLint β’ Prettier β’ Vitest β’ Dev Containers β’ JSDoc
src/
βββ assets/ # Static assets (icons, images)
β βββ Icons/
β βββ CustomIcons.jsx
βββ components/ # Atomic Design Pattern
β βββ molecules/ # Simple UI combinations
β β βββ LanguageSwitch/
β βββ organisms/ # Complex UI components
β β βββ Common/
β β βββ LoginForm/
β β βββ Result/
β β βββ RootErrorBoundary/
β βββ templates/ # Page layouts
β βββ BasicLayout/
β βββ ExactlyCenter/
β βββ MinimalLayout/
βββ config/ # App configuration
β βββ i18n/ # Internationalization
β β βββ en/translation.json
β β βββ ko/translation.json
β βββ MenuItems.jsx # Navigation menu config
β βββ Router.jsx # Route definitions
βββ context/ # React Context providers
β βββ Logger/
β βββ components/LoggerProvider.jsx
β βββ hooks/useLogger.jsx
βββ features/ # Redux slices & features
β βββ antd/
β βββ ThemeChangeSwitch/
β βββ antdSlice.jsx
βββ lib/ # Library configurations
β βββ components/WebVitals.jsx
β βββ i18nextConfig.jsx
β βββ pinoConfig.jsx
β βββ storeConfig.jsx
β βββ themeConfig.jsx
βββ pages/ # Page components
β βββ Homepage/
β βββ Login/
β βββ Loading/
β βββ admin/
β βββ Dashboard/
β βββ Settings/
βββ utils/ # Utility functions
Control type checking behavior in tsconfig.json
:
{
"compilerOptions": {
"checkJs": true, // Enable/disable JS type checking
"allowJs": true, // Allow JS files in TS project
"strict": true // Strict type checking
}
}
For selective type checking, use JSDoc comments:
// @ts-check
- Enable checking for specific files// @ts-nocheck
- Disable checking for specific files
Define your routes in src/config/Router.jsx
:
const Router = [
{
path: "/",
element: <MinimalLayout />,
children: [
{ index: true, element: <Homepage /> },
{ path: "login", element: <Login /> },
],
},
];
Configure navigation menus in src/config/MenuItems.jsx
:
const MenuItems = {
NORMAL: [{ key: "home", label: <Link to="/">Home</Link>, icon: <HomeOutlined /> }],
ADMIN: [{ key: "settings", label: "Settings", icon: <SettingOutlined /> }],
};
Customize Ant Design theme in src/lib/themeConfig.jsx
:
const themeConfig = {
themeName: "light", // or "dark"
designToken: {
components: {
Layout: { headerHeight: 64 },
},
},
componentSize: "middle",
};
npm test # Run tests with Vitest
npm run coverage # Run tests with coverage report
npm run lint # Run ESLint
npx prettier --write src/ # Format code
npm run doc # Generate JSDoc documentation
npm run type # Generate TypeScript declarations
-
Yarn PnP Module Resolution Issues Edit
.yarnrc.yml
:nodeLinker: node-modules # Change from 'pnp'
-
Port Already in Use
- Default dev server runs on port 3000
- Change port in
vite.config.ts
if needed
- Use Dev Containers for consistent development environment
- Enable JSDoc type checking for better IntelliSense
- Leverage Atomic Design principles for component organization
- Use Redux DevTools for state debugging
- React 19 Migration - β Completed
- Vite 6 Upgrade - β Completed
- Ant Design 5.23 - β Completed
- Vitest Integration - β Completed
- Storybook Integration - π In Progress
- Cypress E2E Testing - π Planned
- TypeDoc Migration - π Planned
MIT License - see LICENSE file for details.
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
Made with β€οΈ by comnori