A modern web application stack featuring React Router v7, Convex, and Better Auth. Build robust, scalable, and secure apps with a focus on developer experience and modern best practices.
Install the dependencies:
npm install
A modern web application stack featuring React Router v7, Convex, and Better Auth. This project is designed for building robust, scalable, and secure web applications with a focus on developer experience and modern best practices.
- React Router v7: Advanced routing for React applications.
- Convex: Powerful backend-as-a-service for real-time data and serverless functions.
- Better Auth: Secure authentication with social provider support (Google included by default).
- TypeScript: Type-safe codebase for reliability and maintainability.
- Vite: Fast development and build tooling.
- Tailwind CSS: Utility-first CSS framework for rapid UI development.
- Modern UI Components: Includes a set of reusable, accessible UI components.
- Node.js (v18+ recommended)
- npm or yarn
npm install
# or
npm run dev
npm run build
npm run start
npm run typecheck
Create a .env
or .env.production
file in the project root. Example:
ENVIRONMENT=production
CONVEX_SELF_HOSTED_URL=your_convex_url
CONVEX_SELF_HOSTED_ADMIN_KEY=your_admin_key
VITE_CONVEX_URL=your_convex_url
CONVEX_SITE_URL=your_site_url
SITE_URL=your_site_url
BETTER_AUTH_SECRET=your_secret
Google authentication is enabled by default. To add more providers, update the SOCIAL_PROVIDER_CONFIGS
in app/lib/config.ts
and synchronize with your auth server configuration.
dev
: Start the development serverbuild
: Build the app for productionstart
: Serve the production buildtypecheck
: Run type checkingdev:db
: Start Convex in development mode
- React 19
- React Router v7
- Convex
- Better Auth
- TypeScript
- Vite
- Tailwind CSS
- Zod (validation)
- Radix UI, Lucide, Tabler Icons, and more
This project is licensed under the MIT License.
Start the development server with HMR:
npm run dev
Your application will be available at http://localhost:5173
.
Create a production build:
npm run build
To build and run using Docker:
docker build -t my-app .
# Run the container
docker run -p 3000:3000 my-app
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 npm run build
├── package.json
├── package-lock.json (or pnpm-lock.yaml, or bun.lockb)
├── build/
│ ├── client/ # Static assets
│ └── server/ # Server-side code
This template comes with Tailwind CSS already configured for a simple default starting experience. You can use whatever CSS framework you prefer.
Built with ❤️ using React Router.