A modern, production-ready template for building full-stack React applications using React Router.
- 🚀 Server-side rendering
- ⚡️ Hot Module Replacement (HMR)
- 📦 Asset bundling and optimization
- 🔄 Data loading and mutations
- 🔒 TypeScript by default
- 🎉 TailwindCSS for styling
- 📖 React Router docs
Install the dependencies:
npm installRun an initial database migration:
npm run db:migrateStart the development server with HMR:
npm run devYour application will be available at http://localhost:5173.
Create a production build:
npm run buildDeployment is done using the Wrangler CLI.
First, you need to create a d1 database in Cloudflare.
npx wrangler d1 create <name-of-your-database>Be sure to update the wrangler.toml file with the correct database name and id.
You will also need to update the drizzle.config.ts file, and then run the production migration:
npm run db:migrate-productionTo build and deploy directly to production:
npm run deployTo deploy a preview URL:
npx wrangler versions uploadYou can then promote a version to production after verification or roll it out progressively.
npx wrangler versions deployThis 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.