π nextjs-fullstack-app/
βββ π app/ (App Router - Next.js 15)
β βββ π api/ (Server-side API Routes)
β β βββ π auth/
β β β βββ π route.ts
β β βββ π users/
β β βββ π route.ts
β βββ π dashboard/
β β βββ π page.tsx
β βββ π login/
β β βββ π page.tsx
β βββ π signup/
β β βββ π page.tsx
β βββ π layout.tsx
β βββ π page.tsx
β
βββ π components/ (UI Components)
β βββ π Header.tsx
β βββ π Footer.tsx
β βββ π Sidebar.tsx
β
βββ π lib/ (Utilities & Server Functions)
β βββ π db.ts (Prisma/PostgreSQL setup)
β βββ π auth.ts
β
βββ π prisma/
β βββ π schema.prisma
β βββ π seed.ts
β
βββ π styles/
β βββ π globals.css
β βββ π theme.css
β
βββ π public/
β βββ π favicon.ico
β
βββ π types/
β βββ π index.d.ts
β
βββ π middleware.ts
βββ π next.config.js
βββ π tsconfig.json
βββ π tailwind.config.ts
βββ π .env
βββ π .gitignore
βββ π package.json
Explanation of Key Directories:
1οΈβ£ app/: App Router & Pages (Next.js 15)
β‘οΈ api/
: Server-side route handlers (e.g., auth, CRUD logic).
β‘οΈ dashboard/, login/, signup/
: Route-specific pages.
β‘οΈ layout.tsx
: Root layout shared across all pages.
β‘οΈ page.tsx
: Main homepage.
2οΈβ£ components/:
β‘οΈ Reusable UI parts like Header
, Footer
, and Sidebar
.
3οΈβ£ lib/:
β‘οΈ Utilities like db.ts
for Prisma & PostgreSQL, auth.ts
for server actions.
4οΈβ£ prisma/:
β‘οΈ schema.prisma
: Data models.
β‘οΈ seed.ts
: Sample data for development.
5οΈβ£ styles/:
β‘οΈ Tailwind CSS setup and global styles.
6οΈβ£ public/:
β‘οΈ Static files like images, icons, etc.
7οΈβ£ types/:
β‘οΈ TypeScript type declarations for props and APIs.
Other Essentials:
-
.env
: Environment variables. -
tsconfig.json
: TypeScript config. -
tailwind.config.ts
: Tailwind settings. -
next.config.js
: Next.js app settings.
Use this structure to build scalable, production-ready Fullstack apps using Next.js 15, TypeScript, Prisma, and PostgreSQL.
Get the complete guide here:
Build Fullstack Apps with Next.js 15 and TypeScript β The Modern Way
Bookmark it.
Follow @e_opore π for more project structures and development blueprints!
Top comments (0)