A modern, standardized React application built with Vite, TypeScript, and ESLint.
- ⚡️ Vite - Next generation frontend tooling for fast development
- ⚛️ React 19 - Latest version of React with modern features
- 🔷 TypeScript - Type-safe code for better developer experience
- 🎨 Chakra UI - theming (custom theme in src/theme/Theme.tsx)
- 💅 Prettier - Consistent code formatting
- 🧪 Vitest + Testing Library setup
Before you begin, ensure you have the following installed:
- Node.js (version 18 or higher)
- npm (comes with Node.js)
Clone the repository and install dependencies:
# Clone the repository
git clone https://github.com/kartoza/rue-ui.git
# Navigate to the project directory
cd rue-ui
# Install dependencies
npm installStart the development server:
npm run devThe application will be available at http://localhost:5173
Create an optimized production build:
npm run buildThe built files will be in the dist directory.
Preview the production build locally:
npm run previewnpm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLint to check code qualitynpm run lint:fix- Run ESLint and automatically fix issuesnpm run format- Format code with Prettiernpm run format:check- Check if code is formatted correctly
npm test- run Vitest oncenpm run test:watch- watch modenpm run coverage- if configured in vitest
rue-ui/
├── public/ # Static assets served as-is
├── src/
│ ├── assets/
│ │ └── react.svg
│ ├── components/ # Reusable UI blocks (each folder = one component)
│ │ └── NavBar/ # Example component structure
│ │ ├── NavBar.tsx # component implementation
│ │ ├── NavBar.test.tsx # component unit tests
│ │ └── style.scss # component-scoped styles
│ ├── pages/ # Route-level views (compose components)
│ │ ├── About/
│ │ │ ├── About.tsx # page implementation
│ │ │ └── style.scss # page-scoped styles
│ │ ├── Index/ # (reserved for Index page files)
│ ├── test/
│ │ ├── render.tsx # RTL render wrapper (Chakra + Router)
│ │ └── setup.ts # Vitest setup (JSDOM config, mocks, etc.)
│ ├── theme/
│ │ ├── Button.tsx # Example themed component
│ │ └── Theme.tsx # Chakra theme config
│ ├── index.css # Global (Vite) CSS
│ ├── main.tsx # App entry
│ ├── reportWebVitals.tsx # Web vitals (optional)
│ ├── routes.tsx # App routes
│ └── styles.scss # Global SCSS
├── index.html
├── package.json
├── tsconfig.json
├── vite.config.ts
└── README.md
TypeScript is configured with strict mode enabled. Configuration files:
tsconfig.json- Base TypeScript configurationtsconfig.app.json- App-specific TypeScript configurationtsconfig.node.json- Node-specific TypeScript configuration
ESLint is configured with recommended rules for React and TypeScript. See eslint.config.js for details.
Code formatting is handled by Prettier with sensible defaults. See .prettierrc for configuration.
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a new branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run linting and formatting (
npm run lint:fix && npm run format) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Vite
- Powered by React
- Type-safe with TypeScript