A modern, production-ready template for building full-stack React applications using React Router 7 and TailwindCSS 4.
- 🚀 Server-side rendering with React Router 7
- ⚡️ Hot Module Replacement (HMR) for fast development
- 📦 Modern bundling with Vite
- 🔄 Data loading and mutations with React Router
- 🔍 tRPC + React Query with server-side prefetching support
- 🔒 TypeScript by default
- 🎨 TailwindCSS 4 with dark mode support
- 🧩 Utility-first CSS with class-variance-authority and tailwind-merge
- 🛠️ Shadcn component system for beautiful UI components
- 🚄 React Compiler for optimized performance
- 🌐 React Router Hono Server for performant and flexible server
- 🔍 ESLint and Prettier for code quality
- 🧪 Husky and lint-staged for pre-commit hooks
- 🐳 Docker support for easy deployment
jebsite-template/
├── app/ # Main application code
│ ├── lib/ # Utility functions and shared code
│ ├── routes/ # Route components and logic
│ ├── app.css # Global styles with TailwindCSS
│ ├── root.tsx # Root component and error boundaries
│ ├── routes.ts # Route definitions
│ └── server.ts # Server-side code
├── public/ # Static assets
├── Dockerfile # Docker configuration for deployment
├── components.json # Shadcn component configuration
├── eslint.config.js # ESLint configuration
├── .prettierrc # Prettier configuration
├── package.json # Dependencies and scripts
├── react-router.config.ts # React Router configuration
├── tsconfig.json # TypeScript configuration
└── vite.config.ts # Vite bundler configuration
- Node.js 20 or later
- corepack (which will automatically manage pnpm for you)
Install the dependencies:
pnpm install
Start the development server with HMR:
pnpm dev
Your application will be available at http://localhost:5173
.
Create a production build:
pnpm build
To build and run using Docker:
docker build -t jebsite .
# Run the container
docker run -p 3000:3000 jebsite
The containerized application can be deployed to any platform that supports Docker, including:
- AWS ECS
- Google Cloud Run
- Azure Container Apps
- Digital Ocean App Platform
- Fly.io
- Railway
If you're familiar with deploying Node applications, the built-in app server is production-ready.
Make sure to deploy the output of pnpm build
:
├── package.json
├── pnpm-lock.yaml
├── build/
│ ├── client/ # Static assets
│ └── server/ # Server-side code
This template comes with TailwindCSS 4 already configured with a beautiful default theme that supports both light and dark modes based on system preferences. The styling system includes:
- Modern color system using OKLCH color space
- Responsive design utilities
- Animation utilities via tailwindcss-animate
- Utility composition with tailwind-merge and class-variance-authority
- Shadcn component system for consistent, accessible UI components
This template includes React Compiler (formerly React Forget) which automatically optimizes your React components for better performance without manual memoization.
The template uses React Router Hono Server for a flexible server runtime, providing a lightweight and performant foundation for your application.
Shadcn provides a collection of reusable, accessible UI components that are fully customizable and styled with TailwindCSS. The components are installed directly into your project, giving you full control over their implementation.
The template includes tRPC integration with React Query for type-safe API calls between your client and server. This setup supports server-side prefetching of data, ensuring optimal performance and SEO benefits while maintaining end-to-end type safety.
dev
: Start the development serverbuild
: Build for productionstart
: Start the production servertypecheck
: Generate types and check for type errorsformat
: Format code with Prettierlint
: Lint code with ESLintprepare
: Set up Husky hooks
Built with ❤️ by justy