LogoNEXTDEVKIT Docs

Project Structure

Understanding NEXTDEVKIT's modular architecture and directory organization

📁 Root Directory Structure

nextdevkit/
├── src/
│   ├── app/                    # Next.js App Router pages
│   ├── components/             # React components
│   ├── config/                 # Configuration files
│   ├── database/               # Database schema and client
│   ├── i18n/                   # Internationalization
│   ├── lib/                    # Core utilities and logic
│   ├── mail/                   # Email templates and providers
│   ├── payment/                # Payment processing
│   ├── storage/                # File storage providers
│   ├── styles/                 # Global styles
│   └── middleware.ts           # Route protection and redirects
├── content/                    # MDX content (blog, docs, legal)
├── drizzle/                    # Database migrations
├── public/                     # Static assets
├── messages/                   # Internationalization messages
├── drizzle.config.ts           # Drizzle ORM configuration
├── next.config.ts              # Next.js configuration
├── source.config.ts            # Fumadocs configuration
└── package.json                # Dependencies and scripts

🔑 Key Files

FilePurpose
src/middleware.tsRoute protection, redirects, and internationalization
drizzle.config.tsDrizzle ORM configuration for database operations
next.config.tsNext.js configuration including redirects and rewrites
source.config.tsFumadocs configuration for documentation
open-next.config.tsOpenNext configuration for Cloudflare deployment
biome.jsonBiome configuration for linting and formatting
components.jsonshadcn/ui components configuration

📂 Key Directories

/src/app Directory

The app directory follows Next.js App Router convention with internationalized routing:

app/
├── (app)/                      # Authenticated app routes
│   ├── app/                    # Main application
│   │   ├── ai/                 # AI features demo (chat, image, voice)
│   │   ├── dashboard/          # User dashboard
│   │   └── settings/           # User settings
│   └── auth/                   # Authentication pages
├── [locale]/                   # Internationalized routes
│   ├── (marketing)/            # Marketing pages
│   │   ├── blog/               # Blog system
│   │   ├── contact/            # Contact form
│   │   ├── legal/              # Legal pages
│   │   └── pricing/            # Pricing page
│   └── docs/                   # Documentation
├── api/                        # API routes
│   ├── auth/                   # Authentication API
│   ├── docs-search/            # Documentation search
│   └── webhooks/               # Webhook handlers
├── image-proxy/                # Image optimization proxy
├── globals.css                 # Global styles
├── layout.tsx                  # Root layout
├── not-found.tsx               # 404 page
├── robots.ts                   # SEO robots configuration
└── sitemap.ts                  # Dynamic sitemap generation

/src/lib Directory

Core application logic and utilities:

lib/
├── actions/                    # Server actions
│   └── send-contact-email.ts
├── auth/                       # Authentication utilities
│   ├── api.ts
│   ├── client.ts
│   ├── server.ts
│   └── session-context.ts
├── hooks/                      # Custom React hooks
│   ├── use-mobile.ts
│   ├── use-session.ts
│   └── use-payment.ts
├── stores/                     # State management
│   ├── use-locale-store.ts
│   └── use-payment-store.ts
├── auth.ts                     # Authentication configuration
├── metadata.ts                 # SEO metadata utilities
├── safe-action.ts              # Safe action configuration
├── source.ts                   # Fumadocs source configuration
├── toc.ts                      # Table of contents utilities
├── urls.ts                     # URL utilities
├── utils.ts                    # General utilities
└── i18n.ts                     # Internationalization utilities

/src/config Directory

Configuration files for different features:

config/
├── marketing/                  # Marketing configuration
│   ├── blog.ts
│   ├── faq.ts
│   ├── feature-tabs.ts
│   ├── hero-section.ts
│   ├── pricing.ts
│   └── testimonials.ts
├── analytics.ts                # Analytics configuration
├── footer.ts                   # Footer configuration
├── index.ts                    # Main app configuration
├── navigation.ts               # Navigation configuration
├── oauth-provider.ts           # OAuth providers configuration
├── settings-tabs.tsx           # Settings tabs configuration
├── sidebar.tsx                 # Sidebar configuration
├── social-media.tsx            # Social media configuration
└── types.ts                    # TypeScript type definitions

🎉 Next Steps

Now that you understand the project structure:

  1. 🔧 Set up your IDE with the recommended extensions
  2. 📝 Learn the formatting rules with Biome
  3. 🔄 Understand the update process for staying current
  4. 🛠️ Start building your features following the patterns

The modular architecture makes it easy to add new features, customize existing ones, and maintain code quality as your project grows! 🚀