# sherryjutt932/caps-ai architecture

> Architecture diagram of the GitHub repository sherryjutt932/caps-ai, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sherryjutt932/caps-ai
- Repository: https://github.com/sherryjutt932/caps-ai

## Overview

##### Main System Components

a) Frontend Architecture (Primary Focus)
- Client-Side Components
- Server-Side Components (Next.js App Router)
- Static Assets
- Routing Layer

##### Component Organization

Layer 1: Application Routes
- Marketing Routes ((marketing) folder)
- Authentication Routes (auth folder)
- Root Layout

Layer 2: Core Components
- Sections (Marketing, Auth)
- UI Components
- Content Components
- Header Components

Layer 3: Supporting Infrastructure
- Utilities
- Configuration
- Styles
- Public Assets

**┌─ Next.js App Router ─────────────────────┐**

- ┌─ Routes ──────────────────────────┐   │
- Marketing (/)                   │   │
- Auth (/login, /register)        │   │
- ┘   │

- ┌─ Components ───────────────────────┐  │
- ┌─ Sections ┐ ┌─ Contents ┐       │  │
- Home    │ │ - Hero    │       │  │
- Login   │ │ - Features│       │  │
- Register│ │ - Pricing │       │  │
- ┘ └──────────-┘       │  │

- ┌─ UI ─────┐ ┌─ Header ─┐        │  │
- Button │ │ - Navbar │        │  │
- Input  │ │ - Menu   │        │  │
- ┘ └─────────-┘        │  │
- ┘  │

- ┌─ Infrastructure ─────────────────┐   │
- Utils                         │   │
- Config                        │   │
- Constants                     │   │
- Styles (Tailwind)            │   │
- ┘   │
- ┘

##### Important Relationships to Highlight

- How the App Router manages different routes
- Component composition flow
- Demonstrate how UI components are shared across sections
- Integration with Tailwind CSS and shadcn UI
- Animation flow with Framer Motion

##### Technical Details

Annotations for:
- Next.js 13+ App Router architecture
- Server Components vs. Client Components
- Tailwind CSS styling system
- shadcn UI component integration
- Framer Motion animation system

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph NextApp["Next.js App Router"]
        subgraph Routes["Routing Layer"]
            Marketing["Marketing Routes"]
            Auth["Authentication Routes"]
            RootLayout["Root Layout"]
        end

        subgraph CoreComponents["Core Components"]
            subgraph Sections["Section Components"]
                Home["Home Section"]
                Login["Login Section"]
                Register["Register Section"]
            end

            subgraph Contents["Content Components"]
                Hero["Hero Section"]
                Features["Features Section"]
                Pricing["Pricing Section"]
                Services["Services Section"]
            end

            subgraph UI["UI Components"]
                Button["Button"]
                Input["Input"]
                NavMenu["Navigation Menu"]
                Icons["Icons"]
            end

            subgraph Header["Header Components"]
                Navbar["Navbar"]
                MobileNav["Mobile Navbar"]
                Menu["Menu"]
            end
        end

        subgraph Infrastructure["Infrastructure Layer"]
            Utils["Utilities"]
            Config["Configuration"]
            Constants["Constants"]
            Styles["Global Styles"]
        end

        subgraph Animation["Animation Components"]
            AnimContainer["Animation Container"]
            SectionContainer["Section Container"]
        end

        subgraph Config_Files["Configuration Files"]
            NextConfig["Next.js Config"]
            TailwindConfig["Tailwind Config"]
            ComponentsConfig["Components Config"]
        end
    end

    %% Relationships
    Marketing --> Home
    Auth --> Login
    Auth --> Register
    Home --> Hero
    Home --> Features
    Home --> Pricing
    Home --> Services
    Header --> CoreComponents
    UI --> CoreComponents
    Contents --> CoreComponents
    Animation --> CoreComponents

    %% Styling
    classDef route fill:#2196F3,color:white
    classDef component fill:#4CAF50,color:white
    classDef content fill:#FF9800,color:white
    classDef infrastructure fill:#9C27B0,color:white
    classDef config fill:#607D8B,color:white

    class Marketing,Auth,RootLayout route
    class Button,Input,NavMenu,Icons,Navbar,MobileNav,Menu component
    class Hero,Features,Pricing,Services content
    class Utils,Config,Constants,Styles,AnimContainer,SectionContainer infrastructure
    class NextConfig,TailwindConfig,ComponentsConfig config

    %% Click Events
    click Marketing "https://github.com/sherryjutt932/caps-ai/tree/main/src/app/(marketing)"
    click Auth "https://github.com/sherryjutt932/caps-ai/tree/main/src/app/auth"
    click RootLayout "https://github.com/sherryjutt932/caps-ai/blob/main/src/app/layout.tsx"
    click Button "https://github.com/sherryjutt932/caps-ai/blob/main/src/components/ui/button.tsx"
    click Input "https://github.com/sherryjutt932/caps-ai/blob/main/src/components/ui/input.tsx"
    click NavMenu "https://github.com/sherryjutt932/caps-ai/blob/main/src/components/ui/navigation-menu.tsx"
    click Icons "https://github.com/sherryjutt932/caps-ai/blob/main/src/components/ui/icons.tsx"
    click Navbar "https://github.com/sherryjutt932/caps-ai/blob/main/src/components/header/navbar.tsx"
    click MobileNav "https://github.com/sherryjutt932/caps-ai/blob/main/src/components/header/mobile-navbar.tsx"
    click Menu "https://github.com/sherryjutt932/caps-ai/blob/main/src/components/header/menu.tsx"
    click Hero "https://github.com/sherryjutt932/caps-ai/blob/main/src/components/contents/hero.tsx"
    click Features "https://github.com/sherryjutt932/caps-ai/blob/main/src/components/contents/features.tsx"
    click Pricing "https://github.com/sherryjutt932/caps-ai/blob/main/src/components/contents/pricing.tsx"
    click Services "https://github.com/sherryjutt932/caps-ai/blob/main/src/components/contents/services.tsx"
    click Utils "https://github.com/sherryjutt932/caps-ai/blob/main/src/lib/utils.ts"
    click Config "https://github.com/sherryjutt932/caps-ai/blob/main/src/config/index.ts"
    click Constants "https://github.com/sherryjutt932/caps-ai/blob/main/src/constants/index.ts"
    click Styles "https://github.com/sherryjutt932/caps-ai/blob/main/src/styles/globals.css"
    click AnimContainer "https://github.com/sherryjutt932/caps-ai/blob/main/src/components/utils/animation-container.tsx"
    click SectionContainer "https://github.com/sherryjutt932/caps-ai/blob/main/src/components/utils/section-container.tsx"
    click NextConfig "https://github.com/sherryjutt932/caps-ai/blob/main/next.config.mjs"
    click TailwindConfig "https://github.com/sherryjutt932/caps-ai/blob/main/tailwind.config.ts"
    click ComponentsConfig "https://github.com/sherryjutt932/caps-ai/blob/main/components.json"
```
