# lil-code30/dripondrip-dashboard architecture

> Architecture diagram of the GitHub repository lil-code30/dripondrip-dashboard, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-09-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lil-code30/dripondrip-dashboard
- Repository: https://github.com/lil-code30/dripondrip-dashboard

## Overview

##### Project type and purpose
- This is a full-stack (front-end–focused) administrative dashboard for the “Drip On Drip” e-commerce platform.
- Purpose: provide a web UI for administrators to view analytics, manage customers, orders, products, and adjust settings.

##### File structure
- Top-level files and config:
- package.json, tsconfig.json, eslint.config.mjs, next.config.ts, postcss.config.mjs
- public/ for static assets
- src/app (Next.js App Router):
- layout.tsx – global layout
- page.tsx – home
- dashboard/ with sub-routes: analytics, customers, orders, products, settings
- src/components:
- ui/ – generic UI primitives (button, table, tooltip, etc.)
- common/ – reusable elements like Calendar, FilterSelect
- dashboard/ – dashboard-specific cards, tables, charts
- layouts/ – AppSidebar, Navbar
- src/data – sample or mock data and filters
- src/hooks – custom hooks (use-mobile)
- src/lib – utility functions
- src/types – TypeScript type definitions

##### README for additional insights
- Confirms tech stack: Next.js, TypeScript, Tailwind CSS, shadcn/ui.
- Features: dashboard overview, analytics, customer/order/product management, settings.
- No backend code in this repo: it relies on external e-commerce APIs and possibly analytics services.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client
    Browser["User's Browser"]:::service

    %% Frontend
    subgraph "Next.js Frontend"
        direction TB

        %% Routing Layer
        Routing["Next.js App Router"]:::data
        click Routing "https://github.com/lil-code30/dripondrip-dashboard/tree/main/src/app/"

        %% Layout Layer
        subgraph "Layout Layer"
            direction TB
            Layout["Global Layout"]:::ui
            click Layout "https://github.com/lil-code30/dripondrip-dashboard/blob/main/src/app/layout.tsx"
            Styles["Global Styles"]:::ui
            click Styles "https://github.com/lil-code30/dripondrip-dashboard/blob/main/src/app/globals.css"
            Sidebar["AppSidebar"]:::ui
            click Sidebar "https://github.com/lil-code30/dripondrip-dashboard/blob/main/src/components/layouts/AppSidebar.tsx"
            Navbar["Navbar"]:::ui
            click Navbar "https://github.com/lil-code30/dripondrip-dashboard/blob/main/src/components/layouts/Navbar.tsx"
        end

        %% Pages Layer
        subgraph "Pages (src/app)"
            direction TB
            Home["Home Page"]:::ui
            click Home "https://github.com/lil-code30/dripondrip-dashboard/blob/main/src/app/page.tsx"
            subgraph "Dashboard Pages"
                direction TB
                DashboardOverview["Dashboard Overview"]:::ui
                click DashboardOverview "https://github.com/lil-code30/dripondrip-dashboard/blob/main/src/app/dashboard/page.tsx"
                AnalyticsPage["Analytics Page"]:::ui
                click AnalyticsPage "https://github.com/lil-code30/dripondrip-dashboard/blob/main/src/app/dashboard/analytics/page.tsx"
                CustomersPage["Customers Page"]:::ui
                click CustomersPage "https://github.com/lil-code30/dripondrip-dashboard/blob/main/src/app/dashboard/customers/page.tsx"
                CustomerDetail["Customer Detail Page"]:::ui
                click CustomerDetail "https://github.com/lil-code30/dripondrip-dashboard/blob/main/src/app/dashboard/customers/[id]/page.tsx"
                OrdersPage["Orders Page"]:::ui
                click OrdersPage "https://github.com/lil-code30/dripondrip-dashboard/blob/main/src/app/dashboard/orders/page.tsx"
                OrderDetail["Order Detail Page"]:::ui
                click OrderDetail "https://github.com/lil-code30/dripondrip-dashboard/blob/main/src/app/dashboard/orders/[id]/page.tsx"
                ProductsPage["Products Page"]:::ui
                click ProductsPage "https://github.com/lil-code30/dripondrip-dashboard/blob/main/src/app/dashboard/products/page.tsx"
                ProductCreate["Product Create Page"]:::ui
                click ProductCreate "https://github.com/lil-code30/dripondrip-dashboard/blob/main/src/app/dashboard/products/create/page.tsx"
                ProductDetail["Product Detail Page"]:::ui
                click ProductDetail "https://github.com/lil-code30/dripondrip-dashboard/blob/main/src/app/dashboard/products/[id]/page.tsx"
                SettingsPage["Settings Page"]:::ui
                click SettingsPage "https://github.com/lil-code30/dripondrip-dashboard/blob/main/src/app/dashboard/settings/page.tsx"
            end
        end

        %% Component Libraries
        subgraph "Component Libraries"
            direction TB
            UIPrimitives["UI Primitives (shadcn/ui)"]:::ui
            click UIPrimitives "https://github.com/lil-code30/dripondrip-dashboard/tree/main/src/components/ui/"
            CommonComponents["Common Components"]:::ui
            click CommonComponents "https://github.com/lil-code30/dripondrip-dashboard/tree/main/src/components/common/"
            DashboardComponents["Dashboard Components"]:::ui
            click DashboardComponents "https://github.com/lil-code30/dripondrip-dashboard/tree/main/src/components/dashboard/"
        end

        %% Data & Utilities
        subgraph "Data & Utilities"
            direction TB
            DataModules["Data Modules & Mock Data"]:::data
            click DataModules "https://github.com/lil-code30/dripondrip-dashboard/tree/main/src/data/"
            Hooks["Custom Hooks"]:::data
            click Hooks "https://github.com/lil-code30/dripondrip-dashboard/blob/main/src/hooks/use-mobile.ts"
            Utils["Utility Functions"]:::data
            click Utils "https://github.com/lil-code30/dripondrip-dashboard/blob/main/src/lib/utils.ts"
            Types["Type Definitions"]:::data
            click Types "https://github.com/lil-code30/dripondrip-dashboard/blob/main/src/types/types.ts"
        end
    end

    %% External Services
    subgraph "External Services"
        direction TB
        EcommerceAPI["E-commerce API"]:::service
        AnalyticsService["Analytics Service"]:::service
        AuthService["Authentication Service"]:::service
        DB["Primary Database"]:::service
        AnalyticsDB["Analytics Datastore"]:::service
    end

    %% DevOps / Hosting
    subgraph "DevOps & Hosting"
        direction TB
        CI["CI/CD Pipeline"]:::devops
        Hosting["Vercel Hosting & CDN"]:::devops
    end

    %% Connections
    Browser -->|"navigates"| Routing
    Routing --> Layout
    Routing --> Home
    Routing --> DashboardOverview
    DashboardOverview --> UIPrimitives
    DashboardOverview --> DashboardComponents
    AnalyticsPage --> DashboardComponents
    CustomersPage --> DashboardComponents
    CustomerDetail --> DashboardComponents
    OrdersPage --> DashboardComponents
    OrderDetail --> DashboardComponents
    ProductsPage --> DashboardComponents
    ProductCreate --> DashboardComponents
    ProductDetail --> DashboardComponents
    SettingsPage --> DashboardComponents

    Home --> UIPrimitives
    Home --> CommonComponents

    UIPrimitives --> Styles
    CommonComponents --> Styles

    DashboardOverview --> DataModules
    AnalyticsPage --> DataModules
    CustomersPage --> DataModules
    OrdersPage --> DataModules
    ProductsPage --> DataModules
    SettingsPage --> DataModules

    DataModules --> EcommerceAPI
    Hooks --> EcommerceAPI
    Utils --> EcommerceAPI
    Types --> EcommerceAPI

    AnalyticsPage --> AnalyticsService
    AnalyticsService --> AnalyticsDB

    EcommerceAPI --> DB
    AuthService --> EcommerceAPI

    CI --> Hosting
    Hosting --> Browser

    %% Styles
    classDef ui fill:#D0E8FF,stroke:#333,stroke-width:1px;
    classDef data fill:#D0FFD0,stroke:#333,stroke-width:1px;
    classDef service fill:#FFE0B2,stroke:#333,stroke-width:1px;
    classDef devops fill:#E0E0E0,stroke:#333,stroke-width:1px;
```
