Skip to content

Project Structure

A well-organized folder structure makes it easy to find, understand, and maintain your codebase. Below is an overview of the main directories and files in the next-saas-pilot/ project:

├── prisma/                  # Prisma schema and migrations
├── public/                  # Static assets
├── src/                     # Root folder
│   ├── actions/             # Server Actions for data mutations
│   ├── app/                 # App Router pages and layouts
│   │   ├── (auth)/          # Authentication pages
│   │   ├── (main)/          # Home and other pages
│   │   ├── api/             # API routes
│   │   ├── dashboard/       # Dashboard pages
│   ├── components/          # React components
│   │   ├── forms/           # Form components
│   │   ├── sections/        # Page sections
│   │   ├── ui/              # UI components (shadcn/ui)
│   ├── hooks/               # Custom React hooks
│   ├── lib/                 # Utility functions and shared logic
│   │   ├── prisma.ts        # Prisma client
│   │   ├── zod-schemas.ts   # Zod validation schemas
│   ├── types/               # TypeScript type definitions
├── middleware.ts            # Next.js middleware
├── config.ts                # App configuration file

Built with NextSaasPilot