> [!IMPORTANT] > This is an automatic PR generated by Vercel to help you patch known vulnerabilities related to CVE-2025-55182 (React2Shell), CVE-2025-55183, CVE-2025-55184, and CVE-2025-67779. We can't guarantee the PR is comprehensive, and it may contain mistakes. Not all projects are affected by all issues, but **patched versions are required to ensure full remediation**. Vercel has deployed WAF mitigations globally to help protect your application, but upgrading remains required for complete protection. This automated pull request updates your React, Next.js, and related Server Components packages to versions that fix **all currently known React Server Components vulnerabilities**, including the two newly discovered issues. See our [Security Bulletins](https://vercel.com/kb/bulletin/) for more information and reach out to security@vercel.com with any questions. Fixes VULN-3312 --------- Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com> Co-authored-by: Anthony Shew <anthonyshew@gmail.com> |
||
|---|---|---|
| .. | ||
| apps/web | ||
| packages | ||
| .env.example | ||
| .gitignore | ||
| docker-compose.yml | ||
| meta.json | ||
| package.json | ||
| README.md | ||
| turbo.json | ||
| yarn.lock | ||
Turborepo + Prisma ORM starter
This is a example designed to help you quickly set up a Turborepo monorepo with a Next.js app and Prisma ORM. This is a community-maintained example. If you experience a problem, please submit a pull request with a fix. GitHub Issues will be closed.
What's inside?
This turborepo includes the following packages/apps:
Apps and packages
web: a Next.js app@repo/eslint-config:eslintconfigurations (includeseslint-config-nextandeslint-config-prettier)@repo/database: Prisma ORM to manage & access your database@repo/typescript-config:tsconfig.jsons used throughout the monorepo
Each package/app is 100% TypeScript.
Utilities
This turborepo has some additional tools already setup for you:
- TypeScript for static type checking
- ESLint for code linting
- Prettier for code formatting
- Prisma ORM for accessing the database
- Docker Compose for a local MySQL database
Getting started
Follow these steps to set up and run your Turborepo project with Prisma ORM:
1. Create a Turborepo project
Start by creating a new Turborepo project using the following command:
npx create-turbo@latest -e with-prisma
Choose your desired package manager when prompted and a name for the app (e.g., my-turborepo). This will scaffold a new Turborepo project with Prisma ORM included and dependencies installed.
Navigate to your project directory:
cd ./my-turborepo
2. Setup a local database with Docker Compose
We use Prisma ORM to manage and access our database. As such you will need a database for this project, either locally or hosted in the cloud.
To make this process easier, a docker-compose.yml file is included to setup a MySQL server locally with a new database named turborepo:
Start the MySQL database using Docker Compose:
docker-compose up -d
To change the default database name, update the MYSQL_DATABASE environment variable in the docker-compose.yml file.
3. Setup environment variables
Once the database is ready, copy the .env.example file to the /packages/database and /apps/web directories as .env:
cp .env.example ./packages/database/.env
cp .env.example ./apps/web/.env
This ensures Prisma has access to the DATABASE_URL environment variable, which is required to connect to your database.
If you added a custom database name, or use a cloud based database, you will need to update the DATABASE_URL in your .env accordingly.
4. Migrate your database
Once your database is running, you’ll need to create and apply migrations to set up the necessary tables. Run the database migration command:
# Using npm
npm run db:migrate:dev
Expand for yarn, pnpm or bun
# Using yarn
yarn run db:migrate:dev
# Using pnpm
pnpm run db:migrate:dev
# Using bun
bun run db:migrate:dev
You’ll be prompted to name the migration. Once you provide a name, Prisma will create and apply the migration to your database.
Note: The
db:migrate:devscript (located in packages/database/package.json) uses Prisma Migrate under the hood.
For production environments, always push schema changes to your database using the prisma migrate deploy command. You can find an example db:migrate:deploy script in the package.json file of the database package.
5. Seed your database
To populate your database with initial or fake data, use Prisma's seeding functionality.
Update the seed script located at packages/database/src/seed.ts to include any additional data that you want to seed. Once edited, run the seed command:
# Using npm
npm run db:seed
Expand for yarn, pnpm or bun
# Using yarn
yarn run db:seed
# Using pnpm
pnpm run db:seed
# Using bun
bun run db:seed
6. Build your application
To build all apps and packages in the monorepo, run:
# Using npm
npm run build
Expand for yarn, pnpm or bun
# Using yarn
yarn run build
# Using pnpm
pnpm run build
# Using bun
bun run build
7. Start the application
Finally, start your application with:
yarn run dev
Expand for yarn, pnpm or bun
# Using yarn
yarn run dev
# Using pnpm
pnpm run dev
# Using bun
bun run dev
Your app will be running at http://localhost:3000. Open it in your browser to see it in action!
You can also read the official detailed step-by-step guide from Prisma ORM to build a project from scratch using Turborepo and Prisma ORM.
Useful Links
Learn more about the power of Turborepo: