# mynameiskayky/project-cubevis architecture

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

- Interactive diagram: https://gitdiagram.com/mynameiskayky/project-cubevis
- Repository: https://github.com/mynameiskayky/project-cubevis

## Overview

##### Project type and purpose
- This is a full-stack (in this case, front-end–focused) React application built with Next.js (v13+) and the App Router.
- Its purpose is to manage “projects” and “tasks,” with UI modals for creating sections, tasks, subtasks, attaching links/images, and commenting.

##### File structure
- Top-level config files: next.config.js/ts, tsconfig.json, tailwind.config.ts, eslint.config.mjs, postcss.config.mjs
- “public”: static assets
- “src/app”: Next.js App Router directory, with route segments:
- layout.tsx – global layout (header/sidebar/globals.css import)
- page.tsx – landing page
- /projects/page.tsx – projects list
- /projects/[id]/page.tsx – project detail view
- “src/components”:
- project/* – components for project pages (headers, sections, tasks, modals)
- task/* – components for task items (cards, subtask lists, comment lists, modals)
- ui/* – generic UI primitives (buttons, dialogs, inputs, sidebar, tooltip, etc.)
- “src/contexts”: ProjectContext.tsx – React Context for project/task state and actions
- “src/hooks”: custom hooks (e.g., useMobile)
- “src/lib”: utilities (utils.ts)
- “src/types”: TypeScript types
- No backend code or API routes in this repo—data likely comes via external API or local storage (to be confirmed or stubbed).

##### README for additional insights
- Standard Next.js boilerplate README
- Deployment target: Vercel

##### Elements
– Clear labels: “App Router,” “Layout,” “ProjectsList Page,” “ProjectContext,” etc.
- Browser → App Router
- Router → Layout → Page → Components → Context/API
- Purple for Context + Hooks

##### Detailed capture of essential elements
- Break the “Components” group into sub-areas: project vs. task vs. ui
- Call out modals and overlay components as part of the UI layer
- Global CSS and Tailwind as a separate styling cross-cutting concern
- If an external API exists, show it as a separate service (or placeholder)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Global entities
    Browser["User's Browser"]:::external
    AppRouter["App Router"]:::routing
    Layout["Global Layout"]:::routing
    LandingPage["Landing Page"]:::routing
    ProjectsListPage["Projects List Page"]:::routing
    ProjectDetailPage["Project Detail Page"]:::routing

    subgraph "Domain Components"
        direction TB
        subgraph "Project Domain Components"
            direction TB
            AddSectionModal["AddSectionModal"]:::domain
            AddTaskModal["AddTaskModal"]:::domain
            CreateProjectModal["CreateProjectModal"]:::domain
            ProjectActions["ProjectActions"]:::domain
            ProjectHeader["ProjectHeader"]:::domain
            ProjectSection["ProjectSection"]:::domain
            TaskCardProj["TaskCard (project view)"]:::domain
        end
        subgraph "Task Domain Components"
            direction TB
            AddDateModal["AddDateModal"]:::domain
            AddImageModal["AddImageModal"]:::domain
            AddLinkModal["AddLinkModal"]:::domain
            AddSubtaskModal["AddSubtaskModal"]:::domain
            AddTagModal["AddTagModal"]:::domain
            CommentList["CommentList"]:::domain
            SubtaskList["SubtaskList"]:::domain
            TaskCardTask["TaskCard (task view)"]:::domain
        end
    end

    UIPrimitives["UI Primitives"]:::ui

    subgraph "State & Utilities"
        direction TB
        ProjectContext["ProjectContext Provider"]:::state
        UseMobile["Custom Hook: useMobile"]:::state
        Utils["Utility Functions (utils.ts)"]:::util
        Types["Type Definitions"]:::util
    end

    subgraph "Config & Styling"
        direction TB
        NextConfig["Next.js Configuration"]:::config
        StyleConfig["Tailwind & PostCSS Config"]:::config
    end

    PublicAssets["Public Static Assets"]:::external
    DataSource["External API / Local Storage"]:::external
    Vercel["Vercel Deployment"]:::external

    %% Connections
    Browser --> AppRouter
    AppRouter --> Layout
    Layout --> LandingPage
    Layout --> ProjectsListPage
    Layout --> ProjectDetailPage

    LandingPage --> UIPrimitives
    ProjectsListPage --> ProjectHeader
    ProjectsListPage --> TaskCardProj
    ProjectsListPage --> UIPrimitives
    ProjectDetailPage --> ProjectSection
    ProjectDetailPage --> TaskCardTask
    ProjectDetailPage --> CommentList
    ProjectDetailPage --> SubtaskList
    ProjectDetailPage --> UIPrimitives

    %% Domain Components to UI Primitives
    AddSectionModal --> UIPrimitives
    AddTaskModal --> UIPrimitives
    CreateProjectModal --> UIPrimitives
    ProjectActions --> UIPrimitives
    ProjectHeader --> UIPrimitives
    ProjectSection --> UIPrimitives
    TaskCardProj --> UIPrimitives
    AddDateModal --> UIPrimitives
    AddImageModal --> UIPrimitives
    AddLinkModal --> UIPrimitives
    AddSubtaskModal --> UIPrimitives
    AddTagModal --> UIPrimitives
    CommentList --> UIPrimitives
    SubtaskList --> UIPrimitives
    TaskCardTask --> UIPrimitives

    %% Components use State & Utils
    subgraph "Usage"
        direction TB
        LandingPage --> ProjectContext
        ProjectsListPage --> ProjectContext
        ProjectDetailPage --> ProjectContext
        DomainComponents --> ProjectContext
        DomainComponents --> UseMobile
        DomainComponents --> Utils
        DomainComponents --> Types
    end

    ProjectContext --> DataSource
    Utils --> DataSource

    %% Build and deployment
    NextConfig --> Vercel
    StyleConfig --> Vercel
    PublicAssets --> Vercel
    Layout --> Vercel
    UIPrimitives --> Vercel

    %% Click Events
    click AppRouter "https://github.com/mynameiskayky/project-cubevis/tree/main/src/app"
    click Layout "https://github.com/mynameiskayky/project-cubevis/blob/main/src/app/layout.tsx"
    click LandingPage "https://github.com/mynameiskayky/project-cubevis/blob/main/src/app/page.tsx"
    click ProjectsListPage "https://github.com/mynameiskayky/project-cubevis/blob/main/src/app/projects/page.tsx"
    click ProjectDetailPage "https://github.com/mynameiskayky/project-cubevis/blob/main/src/app/projects/[id]/page.tsx"
    click AddSectionModal "https://github.com/mynameiskayky/project-cubevis/blob/main/src/components/project/AddSectionModal.tsx"
    click AddTaskModal "https://github.com/mynameiskayky/project-cubevis/blob/main/src/components/project/AddTaskModal.tsx"
    click CreateProjectModal "https://github.com/mynameiskayky/project-cubevis/blob/main/src/components/project/CreateProjectModal.tsx"
    click ProjectActions "https://github.com/mynameiskayky/project-cubevis/blob/main/src/components/project/ProjectActions.tsx"
    click ProjectHeader "https://github.com/mynameiskayky/project-cubevis/blob/main/src/components/project/ProjectHeader.tsx"
    click ProjectSection "https://github.com/mynameiskayky/project-cubevis/blob/main/src/components/project/ProjectSection.tsx"
    click TaskCardProj "https://github.com/mynameiskayky/project-cubevis/blob/main/src/components/project/TaskCard.tsx"
    click AddDateModal "https://github.com/mynameiskayky/project-cubevis/blob/main/src/components/task/AddDateModal.tsx"
    click AddImageModal "https://github.com/mynameiskayky/project-cubevis/blob/main/src/components/task/AddImageModal.tsx"
    click AddLinkModal "https://github.com/mynameiskayky/project-cubevis/blob/main/src/components/task/AddLinkModal.tsx"
    click AddSubtaskModal "https://github.com/mynameiskayky/project-cubevis/blob/main/src/components/task/AddSubtaskModal.tsx"
    click AddTagModal "https://github.com/mynameiskayky/project-cubevis/blob/main/src/components/task/AddTagModal.tsx"
    click CommentList "https://github.com/mynameiskayky/project-cubevis/blob/main/src/components/task/CommentList.tsx"
    click SubtaskList "https://github.com/mynameiskayky/project-cubevis/blob/main/src/components/task/SubtaskList.tsx"
    click TaskCardTask "https://github.com/mynameiskayky/project-cubevis/blob/main/src/components/task/TaskCard.tsx"
    click UIPrimitives "https://github.com/mynameiskayky/project-cubevis/tree/main/src/components/ui"
    click ProjectContext "https://github.com/mynameiskayky/project-cubevis/blob/main/src/contexts/ProjectContext.tsx"
    click UseMobile "https://github.com/mynameiskayky/project-cubevis/blob/main/src/hooks/use-mobile.tsx"
    click Utils "https://github.com/mynameiskayky/project-cubevis/blob/main/src/lib/utils.ts"
    click Types "https://github.com/mynameiskayky/project-cubevis/blob/main/src/types/index.ts"
    click NextConfig "https://github.com/mynameiskayky/project-cubevis/blob/main/next.config.js"
    click StyleConfig "https://github.com/mynameiskayky/project-cubevis/blob/main/tailwind.config.ts"
    click PublicAssets "https://github.com/mynameiskayky/project-cubevis/tree/main/public"

    %% Styles
    classDef routing fill:#bbdefb,stroke:#1e88e5
    classDef domain fill:#c8e6c9,stroke:#43a047
    classDef ui fill:#eceff1,stroke:#607d8b
    classDef state fill:#f3e5f5,stroke:#8e24aa
    classDef util fill:#fff3e0,stroke:#fb8c00
    classDef config fill:#e0e0e0,stroke:#9e9e9e
    classDef external fill:#fff9c4,stroke:#fbc02d
```
