T3 app (Next.js, tRPC, Prisma) project structure

T3 app (Next.js, tRPC, Prisma) project structure

Explorer

  • .git…
  • .next…, not committed
  • .env, not committed
  • .env.example
  • .gitignore
  • .nvmrcnew
  • README.md
  • eslint.config.js
  • generated…, not committed
  • next-env.d.ts, not committed
  • next.config.js
  • node_modules…, not committed
  • package-lock.json
  • package.json
  • postcss.config.js
  • prettier.config.js
  • prisma.config.tsnew
  • prisma
  • schema.prisma
  • seed.tsnew
  • public
  • favicon.ico
  • src
  • env.js
  • start-database.sh
  • tsconfig.json
  • vitest.config.tsnew
  1. # Create the app with the App Router, tRPC, Prisma, NextAuth.js, Tailwind and PostgreSQL

    npm create t3-app@latest split-it -- --CI --appRouter --trpc --prisma --nextAuth --tailwind --dbProvider postgres
  2. # Start a local PostgreSQL in Docker with the generated script

    cd split-it && ./start-database.sh
  3. # Create the tables, then start the dev server

    npm run db:push && npm run dev
  4. # Upgrade to Next.js 16 (the scaffold still pins 15)

    npx @next/codemod@canary upgrade latest
  5. # Upgrade to Prisma 7 with the PostgreSQL driver adapter

    npm install @prisma/client@7 @prisma/adapter-pg && npm install -D prisma@7
  6. # Switch from db:push to real migrations once data matters

    npm run db:generate -- --name init
  7. # Add forms and UI primitives

    npm install react-hook-form @hookform/resolvers && npx shadcn@latest init
  8. # Add unit and router tests

    npm install -D vitest vite-tsconfig-paths @vitejs/plugin-react @testing-library/react jsdom
  9. # Add end-to-end tests

    npm init playwright@latest
  10. # Add error reporting

    npx @sentry/wizard@latest -i nextjs