https://github.com/katt/trpc-suspense
https://github.com/katt/trpc-suspense
suspense trpc
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/katt/trpc-suspense
- Owner: KATT
- Created: 2021-10-25T14:16:55.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-10-26T09:35:03.000Z (over 4 years ago)
- Last Synced: 2024-10-05T16:42:17.132Z (over 1 year ago)
- Topics: suspense, trpc
- Language: TypeScript
- Homepage: https://suspense.trpc.io
- Size: 368 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Prisma + tRPC
Try in CodeSandbox: [https://githubbox.com/trpc/trpc/tree/main/examples/next-prisma-starter](https://codesandbox.io/s/github/trpc/trpc/tree/main/examples/next-prisma-starter?file=/src/pages/index.tsx)
## Features
- 🧙♂️ E2E typesafety with [tRPC](https://trpc.io)
- ⚡ Full-stack React with Next.js
- ⚡ Database with Prisma
- ⚙️ VSCode extensions
- 🎨 ESLint + Prettier
- 💚 CI setup using GitHub Actions:
- ✅ E2E testing with [Playwright](https://playwright.dev/)
- ✅ Linting
## Setup
```bash
npx create-next-app --example https://github.com/trpc/trpc --example-path examples/next-prisma-starter trpc-prisma-starter
cd trpc-prisma-starter
yarn
yarn dx
```
### Requirements
- Node >= 14
- Docker (for running Postgres)
## Development
### Start project
```bash
npx create-next-app --example https://github.com/trpc/trpc --example-path examples/next-prisma-starter trpc-prisma-starter
cd trpc-prisma-starter
yarn
yarn dx
```
### Commands
```bash
yarn build # runs `prisma generate` + `prisma migrate` + `next build`
yarn db-nuke # resets local db
yarn dx # starts postgres db + runs migrations + seeds + starts next.js
yarn test-dev # runs e2e tests on dev
yarn test-start # runs e2e tests on `next start` - build required before
yarn test:unit # runs normal jest unit tests
yarn test:e2e # runs e2e tests
```
## Files of note
Path
Description
./prisma/schema.prisma
Prisma schema
./src/api/trpc/[trpc].tsx
tRPC response handler
./src/routers
Your app's different tRPC-routers
---
Created by [@alexdotjs](https://twitter.com/alexdotjs).