Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.

Project structure · Full stack

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

Opens with credits

A typesafe full stack app made with create-t3-app: Next.js App Router for pages, tRPC for an API whose types flow straight into your components, Prisma for PostgreSQL, NextAuth.js for sign in and Tailwind CSS for styling. The example app splits shared expenses between flatmates. For students who know React and some TypeScript and want one codebase where a typo in a field name is a compile error, not a production bug.

Curated by Tauseef FayyazIntermediate136 files and folderscreate-t3-app 7.40 (scaffolds Next.js 15 and Prisma 6), upgraded to Next.js 16.4, React 19.3Checked October 2026
Explore the filesPick any file to see what it is, why it exists and when you add it.

How it grows

Each stage opens the explorer there

  1. 1Day 1What the scaffold and your first hour give you51 files and folders
  2. 2GrowingWhat a real app with features and tests adds+48 files and folders
  3. ProductionWhat running it for real users adds+21 files and foldersOpens with credits
  4. ExpertWhat a team needs to keep it healthy for years+16 files and foldersOpens with credits

How it is organised

  • One language, one repo, types end to end. A procedure's Zod input and its return value become the types your components see, with no code generation step and no hand written API client.
  • src/app is routing only. Pages are Server Components that prefetch through `~/trpc/server`; interactive pieces are Client Components that use hooks from `~/trpc/react`.
  • All reads and writes go through tRPC procedures in src/server/api/routers. Route handlers are only for real HTTP needs: auth, health checks, webhooks.
  • Access control lives in procedures, not pages. `protectedProcedure` checks the session, and feature procedures such as `groupMemberProcedure` check ownership before any query runs. Layouts and proxy.ts only improve the experience.
  • Every environment variable is declared and validated in src/env.js. If it is not there, the app does not read it.
  • Routers stay thin; rules with edge cases (balances, invites) live in src/server/services as plain functions that are easy to test.
  • Schema changes always ship as a reviewed Prisma migration. `db:push` is for the first prototype hour only.
  • Tests grow in layers: pure services and routers through `createCaller` at Growing, Playwright journeys at Production, accessibility, visual and load tests at Expert.

At the top of the project

Open one in the explorer for the full story

Learn more on Sefism

Roadmaps, cheat sheets and projects that go with T3 app (Next.js, tRPC, Prisma).

See 11 more
Checked against 17 official sources, October 2026. If something has changed, the docs win.Show sources

Picked from the other libraries by shared topics.

Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.

  • 1:1 Mentorship
  • Fresh Graduate Mentorship
  • Career Guidance

Brand deals, promos and partnerships: tauseeffayyaz@gmail.com