Skip to content

Project Structure

A clean folder structure makes it easier to navigate the codebase, onboard teammates, and maintain features over time. Below is an overview of the key folders and files (based on the current NexusOrbit codebase).

Overview

text
project-root/
├── prisma/                  # Prisma schema and migrations
├── public/                  # Static assets (images, icons, etc.)
├── src/                     # Application source code
│   ├── actions/             # Server Actions (data mutations / writes)
│   ├── app/                 # Next.js App Router pages and layouts
│   │   ├── (auth)/          # Authentication pages (route group)
│   │   ├── (main)/          # Public pages (route group)
│   │   ├── api/             # Route handlers (API endpoints)
│   │   ├── dashboard/       # Dashboard pages
│   │   ├── verify-email/     # Email verification screen
│   │   ├── error.tsx         # Global error UI for App Router
│   │   ├── layout.tsx        # Root layout (wrapping providers, shell, etc.)
│   │   ├── not-found.tsx     # 404 page
│   │   ├── page.tsx          # Home page
│   │   ├── robots.ts         # Robots configuration
│   │   ├── sitemap.ts        # Sitemap generation
│   │   ├── types.ts          # Route-level types (when applicable)
│   ├── components/          # Reusable React components
│   │   ├── auth/             # Auth-related UI
│   │   ├── billing/          # Billing and subscription UI
│   │   ├── dashboard/        # Dashboard UI components
│   │   ├── forms/            # Form components
│   │   ├── layouts/          # Layout components (topbars, shells, wrappers)
│   │   ├── mails/            # Email UI/templates (if applicable)
│   │   ├── page-hero/        # Hero section components
│   │   ├── pricing/          # Pricing section components
│   │   ├── sections/         # Page sections (marketing blocks, etc.)
│   │   ├── users/            # User/profile related components
│   │   ├── command-menu.tsx
│   │   ├── logo.tsx
│   │   ├── marquee.tsx
│   │   ├── mode-toggle.tsx
│   │   ├── section-headers.tsx
│   │   └── typing-effect.tsx
│   ├── hooks/               # Custom React hooks
│   ├── lib/                 # Shared utilities and core modules
│   │   ├── auth/             # Auth helpers (server/client utilities)
│   │   ├── fonts/            # Local font setup
│   │   ├── metadata.ts       # Centralized SEO metadata helpers
│   │   ├── password.ts       # Password utilities (hash/verify, etc.)
│   │   ├── prisma.ts        # Prisma client instance
│   │   ├── resend.ts         # Resend email client/helpers
│   │   ├── s3.ts             # S3 helpers (uploads, signed URLs, etc.)
│   │   ├── stripe.ts         # Stripe client/helpers
│   │   ├── utils.ts          # Shared utilities
│   │   ├── zod-schemas.ts   # Zod validation schemas
│   ├── providers/           # App providers (theme, query, auth wrappers)
│   ├── theme/               # Theme setup (tokens, config, styling helpers)
│   ├── types/               # Shared TypeScript types
├── middleware.ts            # Next.js middleware (auth, redirects, etc.)
├── config.ts                # App configuration
├── .env.example             # Environment variable template
├── next.config.ts           # Next.js configuration
├── package.json             # Scripts and dependencies

Where to look first

  • Starting point: src/app/ (routes, layouts, page-level structure)
  • UI components: src/components/ (reusable UI organized by domain)
  • Data access & utilities: src/lib/
  • Database schema: prisma/
  • Requests & backend endpoints: src/app/api/

Common “screens” in the app

  • Auth screens: src/app/(auth)/
  • Dashboard screens: src/app/dashboard/
  • Email verification: src/app/verify-email/
  • Error + 404: src/app/error.tsx and src/app/not-found.tsx

Built with Nexus Orbit