# cybersage5/mailsync architecture

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

- Interactive diagram: https://gitdiagram.com/cybersage5/mailsync
- Repository: https://github.com/cybersage5/mailsync

## Overview

##### Main Components

A. Client-Side Layer
- Pages/Routes (app directory structure)
- UI Components
- Client-side utilities

B. Next.js Framework Layer
- Server Components
- Client Components
- Route Handlers
- Static/Dynamic Rendering

C. Build/Deploy Layer
- Static Assets
- Build Output
- Deployment Platform (Vercel)

**┌─────────────────────────────────────┐**
- Client Layer             │
- ┘
- ↕
**┌─────────────────────────────────────┐**
- Next.js Framework           │
- ┘
- ↕
**┌─────────────────────────────────────┐**
- Build/Deploy Layer          │
- ┘

##### Detailed Component Breakdown

- Blue: Page components
- Green: Shared UI components
- Yellow: Utility functions
- Purple: Framework features
- Gray: Build/deployment components

##### Specific Implementation Details

Client Layer (Top):
**┌─────────────────────────────────────┐**
- Pages:                              │
- Home (/)                          │
- About (/about)                    │
- FAQ (/faq)                        │
- Pricing (/pricing)                │
- Privacy (/privacy)                │
- Status (/status)                  │
- Terms (/terms)                    │
- ┘

Components Layer (Middle):
**┌─────────────────────────────────────┐**
- Shared Components:                  │
- Header                           │
- Footer                           │
- WaitlistModal                    │

- UI Components:                     │
- Accordion                        │
- Button                           │
- Dialog                           │
- Input                            │
- ┘

##### Important Elements to Highlight

- App Router Architecture: Show the hierarchical structure of the app directory
- Static vs. Dynamic Parts: Indicate which parts are static (built-time) vs. dynamic (runtime)

##### Technical Stack Callouts

Key technologies:
- Next.js 13+ (App Router)
- React (Server & Client Components)
- TailwindCSS
- TypeScript

Remember to indicate:
- The app directory structure following Next.js 13+ conventions
- Shared component reuse across pages
- UI component library organization
- Static asset handling
- Build and deployment flow to Vercel

This will provide a comprehensive view of the application's architecture while maintaining clarity and usefulness for the development team.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Client Layer"
        Pages["Pages/Routes"]
        Pages --> HomePage["Home (/)"]:::page
        Pages --> AboutPage["About (/about)"]:::page
        Pages --> FAQPage["FAQ (/faq)"]:::page
        Pages --> PricingPage["Pricing (/pricing)"]:::page
        Pages --> PrivacyPage["Privacy (/privacy)"]:::page
        Pages --> StatusPage["Status (/status)"]:::page
        Pages --> TermsPage["Terms (/terms)"]:::page
    end

    subgraph "Components Layer"
        SharedComponents["Shared Components"]
        SharedComponents --> Header["Header"]:::component
        SharedComponents --> Footer["Footer"]:::component
        SharedComponents --> WaitlistModal["WaitlistModal"]:::component

        UIComponents["UI Components"]
        UIComponents --> Accordion["Accordion"]:::ui
        UIComponents --> Button["Button"]:::ui
        UIComponents --> Dialog["Dialog"]:::ui
        UIComponents --> Input["Input"]:::ui
    end

    subgraph "Framework Layer"
        CoreLayout["Core Layout"]:::framework
        GlobalStyles["Global Styles"]:::framework
        Utils["Utilities"]:::framework
    end

    subgraph "Configuration Layer"
        NextConfig["Next.js Config"]:::config
        TSConfig["TypeScript Config"]:::config
        TailwindConfig["Tailwind Config"]:::config
        PostCSSConfig["PostCSS Config"]:::config
        ESLintConfig["ESLint Config"]:::config
    end

    subgraph "Static Layer"
        PublicAssets["Public Assets"]:::static
    end

    Pages --> SharedComponents
    Pages --> UIComponents
    Pages --> CoreLayout
    CoreLayout --> GlobalStyles
    SharedComponents --> UIComponents
    UIComponents --> Utils

    %% Click Events
    click HomePage "https://github.com/CyberSage5/MailSync/blob/master/src/app/page.tsx"
    click AboutPage "https://github.com/CyberSage5/MailSync/blob/master/src/app/about/page.tsx"
    click FAQPage "https://github.com/CyberSage5/MailSync/blob/master/src/app/faq/page.tsx"
    click PricingPage "https://github.com/CyberSage5/MailSync/blob/master/src/app/pricing/page.tsx"
    click PrivacyPage "https://github.com/CyberSage5/MailSync/blob/master/src/app/privacy/page.tsx"
    click StatusPage "https://github.com/CyberSage5/MailSync/blob/master/src/app/status/page.tsx"
    click TermsPage "https://github.com/CyberSage5/MailSync/blob/master/src/app/terms/page.tsx"
    click CoreLayout "https://github.com/CyberSage5/MailSync/blob/master/src/app/layout.tsx"
    click GlobalStyles "https://github.com/CyberSage5/MailSync/blob/master/src/app/globals.css"
    click Header "https://github.com/CyberSage5/MailSync/blob/master/src/components/header.tsx"
    click Footer "https://github.com/CyberSage5/MailSync/blob/master/src/components/footer.tsx"
    click WaitlistModal "https://github.com/CyberSage5/MailSync/blob/master/src/components/waitlist-modal.tsx"
    click Accordion "https://github.com/CyberSage5/MailSync/blob/master/src/components/ui/accordion.tsx"
    click Button "https://github.com/CyberSage5/MailSync/blob/master/src/components/ui/button.tsx"
    click Dialog "https://github.com/CyberSage5/MailSync/blob/master/src/components/ui/dialog.tsx"
    click Input "https://github.com/CyberSage5/MailSync/blob/master/src/components/ui/input.tsx"
    click Utils "https://github.com/CyberSage5/MailSync/blob/master/src/lib/utils.ts"
    click NextConfig "https://github.com/CyberSage5/MailSync/blob/master/next.config.js"
    click TSConfig "https://github.com/CyberSage5/MailSync/blob/master/tsconfig.json"
    click TailwindConfig "https://github.com/CyberSage5/MailSync/blob/master/tailwind.config.ts"
    click PostCSSConfig "https://github.com/CyberSage5/MailSync/blob/master/postcss.config.mjs"
    click ESLintConfig "https://github.com/CyberSage5/MailSync/blob/master/eslint.config.mjs"
    click PublicAssets "https://github.com/CyberSage5/MailSync/tree/master/public/"

    %% Styles
    classDef page fill:#2563eb,color:white
    classDef component fill:#16a34a,color:white
    classDef ui fill:#ca8a04,color:white
    classDef framework fill:#9333ea,color:white
    classDef config fill:#64748b,color:white
    classDef static fill:#475569,color:white

    %% Legend
    subgraph Legend
        L1["Page Component"]:::page
        L2["Shared Component"]:::component
        L3["UI Component"]:::ui
        L4["Framework"]:::framework
        L5["Configuration"]:::config
        L6["Static Assets"]:::static
    end
```
