An opinionated, batteries-included starter kit for quickly building and deploying SaaS products using Turborepo, Next.js, and Hono for the backend. This setup leverages Cloudflare Workers for hosting, Prisma Accelerate Edge for database access, and integrates a modern UI with ShadcnUI.
This is the stack powering next-gen SaaS solutions, optimized for both performance and scalability.
- Turborepo for monorepo management
- Next.js for frontend
- Hono for serverless backend (Cloudflare Workers)
- Prisma Accelerate Edge for database access
- Cloudflare Workers for hosting the backend
- ShadcnUI as the component library
- TailwindCSS for styling
- NextAuth for authentication
- Recoil for state management
- Websockets for real-time communication
- Make sure that you have Wrangler installed. And also that you have logged in with
wrangler login
(You'll need a Cloudflare account) - Clone the repository and install dependencies:
git clone https://github.com/imkeanserna/cloudflare-turbo-stack.git
cd cloudflare-turbo-stack
pnpm install
- Next Js
cd apps/web
cp .env-example .env
add vars in wrangler.toml
pnpm run db:generate
pnpm run db:migrate
pnpm run db:no-engine
pnpm run dev
// To deploy the application, run the following command:
pnpm run deploy
Open http://localhost:3000
4. Hono Server
cd apps/hono-server
cp .dev.vars-example .dev.vars
add vars in wrangler.toml
pnpm run dev
// To deploy the application, run the following command:
pnpm run deploy
1. Create a New Next.js App
pnpm create cloudflare@latest my-next-app --framework=next
2. Create a New Hono Server
pnpm dlx create-hono my-hono-server
This Turborepo includes the following packages/apps:
docs
: a Next.js appweb
: another Next.js app@repo/ui
: a stub React component library shared by bothweb
anddocs
applications@repo/eslint-config
:eslint
configurations (includeseslint-config-next
andeslint-config-prettier
)@repo/typescript-config
:tsconfig.json
s used throughout the monorepo
Each package/app is 100% TypeScript.
This Turborepo has some additional tools already setup for you:
- TypeScript for static type checking
- ESLint for code linting
- Prettier for code formatting
Learn more about the power of Turborepo:
Join the community and make an impact! Whether it’s squashing bugs, adding exciting features, or polishing the documentation, your contributions are always valued and appreciated. 💡✨