
Template details
Turborepo Tailwind Prisma Starter
A Turborepo monorepo starter with Next.js, Tailwind CSS, Prisma, and type-safe environment variables.
About this template
The Turborepo Tailwind Prisma Starter is a Turborepo monorepo boilerplate that scaffolds two Next.js 13 App Router applications with Tailwind CSS, Prisma, and type-safe environment variables, wired together with pnpm, Docker, and shared packages.
What is the Turborepo Tailwind Prisma Starter?
The Turborepo Tailwind Prisma Starter is a starter repository created by GitHub user nicnocquee. It combines a Turborepo monorepo with Tailwind CSS, Prisma, and type-safe shared environment variables so developers can start building full-stack Next.js applications without manual configuration. The repository includes two Next.js 13 apps — web (featuring Prisma) and docs — plus a ui component library, a database package holding the Prisma schema, an env package using t3-env and zod, and shared ESLint/TypeScript configuration. It runs on Node.js 18+, pnpm 8+, Docker (for Postgres), and Turbo.
Key Features
- Turborepo monorepo — Manages multiple packages and apps with
turbo run dev, running thewebapp on port 3000 and thedocsapp on port 3001. - Two Next.js 13 App Router apps —
webconnects to Prisma for database access;docsserves as a separate documentation site; both use Tailwind CSS and the shareduipackage. - Shared React component library — The
uipackage exports Client components that are automatically annotated with the"use client"directive by a post-build script because tsup/esbuild strips the directive from source files. - Prisma database package — The
databasepackage holds the schema and client; after runningdocker-compose upfor Postgres, one-time migration viapnpm db:migrate:resetprepares the schema. - Type-safe environment variables — The
envpackage exports validated, typed variables viaimport { env } from "env"; you read server and client values withenv.HELLO_WORLDandenv.NEXT_PUBLIC_HELLO_WORLD, never directly fromprocess.env. - 100% TypeScript — All apps and packages are TypeScript, with shared
tsconfigandeslint-config-custom(including ESLint configs for Next and Prettier). - Automated setup script —
./dev-bootstrap.shcopies the example env file and creates symlinks into the apps and packages, makingpackages/env/.envthe single source of truth.
Who is it for?
- Full-stack developers building a Next.js application with a Prisma-backed database — they get a pre-connected web app, a docs app, and shared UI components.
- Teams adopting a monorepo — the starter demonstrates the Turborepo + pnpm workspace pattern with shared packages, so teams can copy or extend the structure for their own projects.
- Developers who want validated environment variables — the t3-env + zod pattern in the
envpackage shows how to keep server and client variables type-safe across multiple workspaces.
What can you do with it?
- Kick off a new product — clone the repo, run
pnpm install, start Postgres withdocker-compose up, migrate the database, and begin building on thewebapp. - Add a documentation site — use the
docsapp as a second Next.js site in the same repo, reusing theuipackage and the sharedenvconfiguration. - Share UI components — put components in the
uipackage and consume them from both apps; Tailwind styling is bundled through the package build.
How does the starter work?
Setup takes a few steps: clone the repo, run pnpm install, copy packages/env/.env.example to packages/env/.env and execute ./dev-bootstrap.sh to create env symlinks, start the Postgres container with docker-compose up, run the one-time cd packages/database/ && pnpm db:migrate:reset, then start development with turbo run dev.
FAQ
What Node.js version is required?
Node.js 18 or newer is required, along with pnpm 8+ and Docker to run the local Postgres database. Turbo must also be installed.
How do I add a new workspace?
From the root, run turbo gen workspace to create a new app or package, or turbo gen workspace --copy to copy an existing one. To add an npm package to a workspace, use pnpm add <package_name> --filter workspace.
Why does VSCode show "Cannot find module 'ui'"?
If VSCode cannot find the ui module or other workspace modules, restart the TypeScript server by pressing Cmd+P, typing restart ts, and pressing Enter. This is a known workaround for TS module resolution in monorepos.
Can I edit environment variables?
Yes — edit the single packages/env/.env file, which is symlinked into the apps and packages by the bootstrap script. If you add or change server or client variables, you must also update packages/env/src/index.ts to keep the typed schema in sync.















