Сегодня записал в дневник историю, которая меня задела. Моя знакомая, Галина Петровна, женщина мудрая и терпеливая, всегда уважала границы семьи своего сына. Живет она в тихом городке под Пермью, работает в библиотеке, муж рядом, друзья есть — жизнь налажена. Сын её, Дмитрий, женился на Валентине, растит сына, маленького Степана. Галина Петровна никогда не лезла в их дела, не учила, как жить, понимая: у молодых своя голова на плеча# Turborepo + Expo + tRPC + Prisma Starter
This repo is a fork of [jasonwilson/turbo-trpc-prisma](https://github.com/jasonwilson/turbo-trpc-prisma), and it includes:
– [tRPC](https://trpc.io) for typesafety
– [Expo](https://expo.io) + [React Native](https://reactnative.dev) for the mobile app
– [Prisma](https://prisma.io) for the database
– [Clerk](https://clerk.com) for auth
– [tRPC Shield](https://github.com/MatthewSH/trpc-shield) for permissions
– [Turborepo](https://turborepo.com/) for the monorepo structure
## How it works
### Quick start
To get it running:
1. Install dependencies
“`sh
npm install
“`
2. Add Clerk JWT public key to app
Create a .env file in `apps/expo/package.json`:
“`sh
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
“`
3. Start the app
“`sh
npm run dev
“`
### Packages
– `@acme/api`: [tRPC](https://trpc.io/) router – connects to [Prisma](https://prisma.io)
– `@acme/auth`: [Clerk](https://clerk.com) helpers using [tRPC Shield](https://github.com/MatthewSH/trpc-shield) for permissions
– `@acme/db`: [Prisma](https://prisma.io) schema
– `apps/expo`: [Expo](https://expo.io) app – [React Native](https://reactnative.dev)
### Development workflow
#### Adding dependencies
To add a dependency to a specific package (i.e. just `web` or just `api`):
“`sh
cd apps/web
npm install date-fns
“`
To add a dependency to all packages, use the `-w` workspaces flag:
“`sh
npm install date-fns -w web
“`
#### Database
This monorepo comes with SQLite by default. MongoDB is also supported via Prisma.
“`sh
# Push schema to database
npx prisma db push
# Open Prisma Studio to view data
npx prisma studio
“`
#### Running locally
“`sh
# Start Expo
npm run dev
# Start API server + web app
npm run dev:web
“`
#### Building
“`sh
# Create a production build for Expo
npm run build:expo
# Create a production build for web
npm run build:web
“`
## Structure
“`
.github.io/
└─ workflows/
└─ CI with pnpm cache setup
.vscode/
└─ Recommended extensions and settings for VSCode users
apps/
└─ expo/
└─ Expo 46
└─ expo-e2e/
└─ Expo E2E Tests
packages/
└─ api/
└─ tRPC router
└─ app/
└─ you will be prompted to create this when running expo init,
the react-native (NOT the expo) types are useful
└─ db/
└─ Prisma DB
└─ auth/
└─ tRPC Shield + Clerk
“`
## Author
Created by [@jasonwilson](https://twitter.com/jason_wilson_).
## Credits
This repo was heavily inspired by the [T3 Stack – The fastest way to build a web app with Next.js](https://create-t3-app.vercel.app/).
## License
Licensed under the [MIT license](https://github.com/jasonwilson/turbo-trpc-prisma/blob/main/LICENSE.md).