# mo7yw4ng/dashcam-share architecture

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

- Interactive diagram: https://gitdiagram.com/mo7yw4ng/dashcam-share
- Repository: https://github.com/mo7yw4ng/dashcam-share

## Overview

##### Main Application Structure

a. Frontend Architecture (Primary Focus)
- Implement a clear component hierarchy using Atomic Design pattern, as evidenced by the structure:
- Atoms (Base components)
- Molecules (Composite components)
- Organisms (Complex components)
- Views (Page components)

b. State Management Layer
- Pinia stores (found in src/stores):
- form store
- googleMaps store
- user store

##### Key Components to Highlight

a. Core Features
- Integration System (DashCamMapView, SecurityCamMapView)
- Video Management System (VideoDetailsPage, VideoReport)
- Monitoring System (MonitorDetailsPage, MonitorExpandView)
- Form Management System (Various form components and views)

b. Data Flow Layer
- API Integration (indicated by mock data in public/mock)
- Composables for data handling (useConnectionMessage, useHandleConnectionData)

**┌─ User Interface Layer ─────────────────────┐**
- Views -> Organisms -> Molecules -> Atoms   │
- State Management Layer ───────────────────┤
- Pinia Stores (form, googleMaps, user)     │
- Business Logic Layer ───────────────────┤
- Composables, Utils, Services              │
- External Services Layer ─────────────────┤
- Google Maps, API Services                 │
- ┘

##### Important Connections

- Component composition flow
- State management interactions
- API data flow
- Router navigation paths

##### Technical Stack Indicators

Technology badges for:
- Vue 3
- TypeScript
- Vite
- Pinia
- Tailwind CSS
- Google Maps Integration

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "User Interface Layer"
        direction TB
        subgraph "Views"
            DashMap["DashCam Map View"]:::view
            SecMap["Security Cam Map View"]:::view
            VidDetails["Video Details Page"]:::view
            VidReport["Video Report"]:::view
            MonDetails["Monitor Details Page"]:::view
            MonExpand["Monitor Expand View"]:::view
            FormView["Form View"]:::view
        end

        subgraph "Organisms"
            ComplexForms["Complex Form Components"]:::organism
            MapControls["Map Control Components"]:::organism
            VideoPlayer["Video Player Components"]:::organism
        end

        subgraph "Molecules"
            ServiceForm1["Apply Service Info Form 1"]:::molecule
            ServiceForm2["Apply Service Info Form 2"]:::molecule
            ServiceForm3["Apply Service Info Form 3"]:::molecule
        end

        subgraph "Atoms"
            BaseInputs["Base Input Components"]:::atom
            BaseButtons["Base Button Components"]:::atom
            BaseIcons["Base Icon Components"]:::atom
        end
    end

    subgraph "State Management Layer"
        FormStore["Form Store"]:::store
        MapsStore["Google Maps Store"]:::store
        UserStore["User Store"]:::store
    end

    subgraph "Business Logic Layer"
        ConnMessage["Connection Message Handler"]:::logic
        ConnData["Connection Data Handler"]:::logic
        ZipCity["City Zipcode Logic"]:::logic
        ZipCounty["County Zipcode Logic"]:::logic
    end

    subgraph "External Services Layer"
        GMaps["Google Maps API"]:::external
        MockAPI["Mock API Data"]:::external
    end

    %% Connections
    Views --> Organisms
    Organisms --> Molecules
    Molecules --> Atoms
    
    FormStore --> Views
    MapsStore --> MapControls
    UserStore --> Views

    ConnMessage --> FormStore
    ConnData --> UserStore
    
    GMaps --> MapsStore
    MockAPI --> ConnData

    %% Click Events
    click DashMap "https://github.com/MO7YW4NG/Dashcam-Share/blob/main/src/views/DashCamMapView.vue"
    click SecMap "https://github.com/MO7YW4NG/Dashcam-Share/blob/main/src/views/SecurityCamMapView.vue"
    click VidDetails "https://github.com/MO7YW4NG/Dashcam-Share/blob/main/src/views/VideoDetailsPage.vue"
    click VidReport "https://github.com/MO7YW4NG/Dashcam-Share/blob/main/src/views/VideoReport.vue"
    click MonDetails "https://github.com/MO7YW4NG/Dashcam-Share/blob/main/src/views/MonitorDetailsPage.vue"
    click MonExpand "https://github.com/MO7YW4NG/Dashcam-Share/blob/main/src/views/MonitorExpandView.vue"
    click FormView "https://github.com/MO7YW4NG/Dashcam-Share/blob/main/src/views/FormView.vue"
    click ServiceForm1 "https://github.com/MO7YW4NG/Dashcam-Share/blob/main/src/components/molecules/ApplyServiceInfoForm.vue"
    click ServiceForm2 "https://github.com/MO7YW4NG/Dashcam-Share/blob/main/src/components/molecules/ApplyServiceInfoForm2.vue"
    click ServiceForm3 "https://github.com/MO7YW4NG/Dashcam-Share/blob/main/src/components/molecules/ApplyServiceInfoForm3.vue"
    click BaseInputs "https://github.com/MO7YW4NG/Dashcam-Share/tree/main/src/components/atoms"
    click BaseButtons "https://github.com/MO7YW4NG/Dashcam-Share/tree/main/src/components/atoms"
    click BaseIcons "https://github.com/MO7YW4NG/Dashcam-Share/tree/main/src/components/atoms"
    click FormStore "https://github.com/MO7YW4NG/Dashcam-Share/blob/main/src/stores/form.ts"
    click MapsStore "https://github.com/MO7YW4NG/Dashcam-Share/blob/main/src/stores/googleMaps.ts"
    click UserStore "https://github.com/MO7YW4NG/Dashcam-Share/blob/main/src/stores/user.ts"
    click ConnMessage "https://github.com/MO7YW4NG/Dashcam-Share/blob/main/src/composables/useConnectionMessage.ts"
    click ConnData "https://github.com/MO7YW4NG/Dashcam-Share/blob/main/src/composables/useHandleConnectionData.ts"
    click MockAPI "https://github.com/MO7YW4NG/Dashcam-Share/tree/main/public/mock"
    click ZipCity "https://github.com/MO7YW4NG/Dashcam-Share/blob/main/src/zipcode/city.ts"
    click ZipCounty "https://github.com/MO7YW4NG/Dashcam-Share/blob/main/src/zipcode/county.ts"

    %% Styling
    classDef view fill:#2563eb,color:white
    classDef organism fill:#3b82f6,color:white
    classDef molecule fill:#60a5fa,color:white
    classDef atom fill:#93c5fd,color:white
    classDef store fill:#22c55e,color:white
    classDef logic fill:#f97316,color:white
    classDef external fill:#eab308,color:white

    %% Legend
    subgraph Legend
        L1["View Component"]:::view
        L2["Organism Component"]:::organism
        L3["Molecule Component"]:::molecule
        L4["Atom Component"]:::atom
        L5["Store"]:::store
        L6["Business Logic"]:::logic
        L7["External Service"]:::external
    end
```
