A modern, production-ready React TypeScript starter kit built with Vite, featuring state management, routing, authentication, internationalization, and UI components.
- β‘ Vite - Lightning fast build tool and development server
- βοΈ React 19 - Latest React with concurrent features
- π TypeScript - Full type safety
- π¨ Tailwind CSS v4 - Modern utility-first CSS framework with CSS variables
- ποΈ Redux Toolkit - Predictable state management with RTK Query
- π Redux Persist - Persist and rehydrate Redux store
- π React Router v7 - Client-side routing
- π i18next - Internationalization framework
- π React Hook Form - Performant forms with easy validation
- π― Radix UI - Unstyled, accessible UI primitives
- πͺ CVA - Class variance authority for component variants
- π§ ESLint - Code linting with TypeScript support
- π± PWA Ready - Progressive Web App capabilities
src/
βββ app/ # Application core
β βββ App.tsx # Root App component
β βββ router/ # React Router configuration
β βββ store/ # Redux store configuration
β βββ apis/ # RTK Query API slices
β βββ slices/ # Redux slices
β βββ store.config.ts
βββ components/ # Reusable components
β βββ layout/ # Layout components
β βββ shared/ # Shared business components
β βββ ui/ # Base UI components
βββ config/ # Configuration files
βββ lib/ # Utility libraries
βββ styles/ # Global styles
βββ i18n.ts # Internationalization setup
- Node.js 18+
- npm/yarn/pnpm
- Clone the repository:
git clone https://github.com/zju1/zoho-frontend-starter
cd zoho-frontend-started- Install dependencies:
npm install- Set up environment variables:
cp .env.development .env.local- Start development server:
npm run devThe application will be available at http://localhost:4500
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLintCreate a .env.local file with:
VITE_API_URL=http://localhost:3000/api
VITE_APP_PORT=4500The project uses TypeScript path mapping with @ alias:
import { Button } from "@/components/ui/button";
import { cn } from "@/lib/utils";- Redux Toolkit for global state management
- RTK Query for server state and caching
- Redux Persist for state persistence
// Example API slice
export const authApi = createApi({
baseQuery: baseQueryWithReauth,
reducerPath: "authApi",
endpoints: (builder) => ({
getMe: builder.query({
query: () => ({ url: "/auth/me" }),
}),
}),
});Built-in authentication system with:
- JWT token management
- Automatic token refresh
- Protected routes
- Persistent login state
Configured with i18next:
- Translation files in
public/locales/ - Language detection and persistence
- Ready for multiple languages
- Shadcn/ui compatible component system
- Tailwind CSS for styling
- Radix UI for accessibility
- CVA for variant management
// Example component usage
import { Button } from "@/components/ui/button";
<Button variant="destructive" size="lg">
Delete Item
</Button>;The project uses the latest Tailwind CSS with:
- CSS variables for theming
- Dark mode support
- Custom design tokens
- Responsive design utilities
Colors and spacing are defined in src/styles/global.css:
:root {
--radius: 0.625rem;
--background: oklch(1 0 0);
--foreground: oklch(0.145 0 0);
--color-brand-main: #fddd2e;
}Full TypeScript configuration with:
- Strict mode enabled
- Path mapping
- Import/export validation
- Component prop typing
Environment variables are typed in src/vite-env.d.ts:
interface ImportMetaEnv {
readonly VITE_API_URL: string;
readonly VITE_APP_PORT: number;
}npm run buildThis will:
- Type-check the entire codebase
- Build optimized bundles
- Generate static assets in
dist/
- TypeScript ESLint rules
- React Hooks rules
- React Refresh support
- Customizable rule sets
For VS Code development:
- TypeScript
- ESLint
- Tailwind CSS IntelliSense
- Auto Rename Tag
The built application (dist/ folder) can be deployed to any static hosting service:
- Vercel: Zero-configuration deployment
- Netlify: Drag and drop deployment
- GitHub Pages: Free static hosting
- AWS S3 + CloudFront: Scalable hosting
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to 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 β€οΈ using modern React ecosystem