A modern React template built with TypeScript, Tailwind CSS, and Web3 integration. This template provides a solid foundation for building responsive web applications with built-in support for blockchain interactions, internationalization, and a comprehensive UI component library.
- React 19 with TypeScript
- Tailwind CSS 4 for styling
- Vite for fast development and building
- Web3 Integration with Wagmi and Reown AppKit
- Multi-chain Support (Bitcoin, Solana, Ethereum)
- UI Components based on Radix UI
- Internationalization (i18n) with react-i18next
- State Management with Zustand
- Form Handling with React Hook Form + Zod validation
- Routing with React Router DOM
- Charts with Recharts
- Drag & Drop with dnd-kit
- Code Quality tools (ESLint, Prettier, TypeScript)
- Git Hooks with Lefthook
- Docker support
- Node.js 18+
- pnpm (recommended) or npm/yarn
- Clone the repository
git clone <repository-url>
cd react-tw-template- Install dependencies
pnpm install- Copy environment variables
cp .env.example .env- Start development server
pnpm startThe application will be available at http://localhost:5173
pnpm start # Start development server
pnpm preview # Preview production build locallypnpm build # Build for production
pnpm analyze # Build with bundle analyzerpnpm lint # Lint TypeScript and locale files
pnpm lint:scripts # Lint TypeScript files only
pnpm lint:locales # Lint locale JSON files only
pnpm format # Check code formatting
pnpm format:fix # Fix code formatting
pnpm type-check # Run TypeScript type checkingpnpm generate:ethers-types # Generate TypeScript types from ABI filessrc/
βββ assets/ # Static assets (icons, images)
βββ contexts/ # React contexts (Theme, Web3)
βββ helpers/ # Utility functions
βββ hooks/ # Custom React hooks
βββ localization/ # i18n configuration and translations
βββ pages/ # Page components
βββ store/ # Zustand stores
βββ theme/ # Global styles and theme utilities
βββ ui/ # Reusable UI components
Create a .env file based on .env.example:
VITE_API_URL= # Backend API URL
VITE_APP_NAME= # Application nameEnvironment variables can be updated at runtime using the public/env.js file. This allows for dynamic configuration without rebuilding the application.
The template includes a comprehensive set of UI components built on top of Radix UI:
- Layout: Sidebar, Breadcrumb, Separator
- Forms: Input, Label, Select, Checkbox, Toggle
- Navigation: Dropdown Menu, Tabs
- Feedback: Toast, Tooltip, Badge
- Data Display: Table, Avatar, Card, Chart
- Overlays: Dialog, Drawer, Sheet
- Interactive: Button, Collapsible
The template comes with pre-configured Web3 support:
- Wagmi for Ethereum interactions
- Reown AppKit for wallet connections
- Multi-chain support (Bitcoin, Solana, Ethereum)
- Smart contract types generation from ABI files
Place your smart contract ABI files in the abis/ directory and run pnpm generate:ethers-types to generate TypeScript types.
The app supports multiple languages using react-i18next:
- Translations are stored in
src/localization/resources/ - Add new language files as needed
- Use the
useTranslationhook in components
Build and run with Docker:
# Build image
docker build --no-cache --progress=plain --build-arg BUILD_VERSION=1.0.0 -t react-tw-template .
# Run container
docker run -p 3000:80 react-tw-templateThe project uses several tools to maintain code quality:
- ESLint for code linting
- Prettier for code formatting
- TypeScript for type safety
- Lefthook for git hooks
Pre-commit hooks automatically run:
- Linting
- Type checking
- Formatting
Before deploying your application, customize the following elements to match your project:
-
App Metadata (
src/App.tsx) -
HTML Meta Tags (
index.html)- Update
<title>tag - Add structured data (JSON-LD) if applicable
- Update
-
Environment Variables (
.env)- Set
VITE_APP_NAMEto your application name - Set
VITE_API_URLto your backend API - Add any additional environment variables
- Set
-
Favicons & Icons (
public/branding/)- Replace
favicon.ico(16x16, 32x32, 48x48) - Replace
favicon-16x16.png - Replace
favicon-32x32.png - Replace
apple-touch-icon.png(180x180) - Replace
android-chrome-192x192.png - Replace
android-chrome-512x512.png - Replace
logo.svgwith your logo - Replace
og-img.svgwith your Open Graph image (1200x630)
- Replace
-
Progressive Web App (
public/site.webmanifest)- Update
namefield - Update
short_namefield - Update icon paths if moved
- Update
theme_colorto match your brand - Update
background_color - Verify
displaymode preference
- Update
-
Browser Configuration (
public/browserconfig.xml)- Update
TileColorfor Windows tiles - Update tile image path if needed
- Update
-
Open Graph Image
- Create 1200x630px image for social sharing
- Update path in metadata and place in
public/branding/ - Test with Facebook Sharing Debugger and Twitter Card Validator
-
App Icons & Logos
- Update main logo in navigation/header
- Update any brand imagery throughout the app
- Ensure all icons are SVG or high-resolution PNG
-
Domain Configuration
- Update all hardcoded URLs to your domain
-
SEO Configuration
- Submit sitemap to Google Search Console
- Submit sitemap to Bing Webmaster Tools
- Set up Google Analytics or alternative
- Configure robots.txt
- Set up error pages (404, 500)
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin feature/my-feature - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.