Getting started
Opinionated defaults help you grow from prototype to production: use Turbo for packages, React Router for routing, Hono for edge-ready APIs, and Drizzle for migrations.
Bootstrap the workspace
Scaffold the project with degit, this will clone the repository and clean up the git history. Then cd into your newly created project.
pnpm dlx degit PhilDL/react-router-gospel-stack my-app
cd my-appSet up your stack
When you are in your project folder, install the dependencies and run the setup script.
pnpm install && pnpm run setupThe setup script will prompt you to choose:
- The name of your monorepo organization (e.g. @my-org)
- The database you want to use: Turso or PostgreSQL [require Docker]
- The ORM you want to use: Drizzle or Prisma
Start the development server
Start your the developpement server of the webapp and begin developing your application.
pnpm dev --filter=@react-router-gospel-stack/webappRead the development guideHono server + React Router
We use Hono for its support for any runtime and clean middleware system.
Our server file will set-up dependencies and provide repositories (database access) through the React Router AppLoadContext.
This allows you to use fully resolved repositories in your loaders and actions, and keep dependency injection in one file.
No users yet
An example seed script is provided in the infrastructure package. It will create a test user in the database. You can run it with the following command:
pnpm run db:seedDo you like this stack?
I would greatly appreciate your feedback and support, consider starring the repository on GitHub and sharing it with your friends.
