# ahmettashan/vueproject architecture

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

- Interactive diagram: https://gitdiagram.com/ahmettashan/vueproject
- Repository: https://github.com/ahmettashan/vueproject

## Overview

##### Main Components

A. Application Core
- Vue 3 Application Instance
- Core Services Layer
- Router System
- Vuex Store
- Template System

B. Modular Structure
- Auth Module
- Dashboard Module
- Posts Module

C. Shared Resources
- Assets
- Styles
- Services

**Top Layer: Client Interface**

**Middle Layer: Application Core**

**Bottom Layer: External Services**

##### Specific Component Relationships

a) Core Application Container (Main boundary):
- Entry point (App.vue, main.js)
- Global Store
- Global Router
- Template System (Default.vue, Blank.vue)

Each module should be represented as a self-contained unit with:
- Module Container (Module.vue)
- Module Router
- Module Store
- Module Views
- Module Services
- Module Styles

- Laravel Resource Service
- Query Service
- Secure Local Storage Service

##### Key Relationships to Highlight

- How modules connect to the core application through the module system
- Relationship between module-specific stores and the main Vuex store
- Routing hierarchy from the main router to module routers
- How services are consumed by both core and modules

##### Specific Implementation Details

- The modular architecture pattern
- The separation of concerns between modules
- The shared services architecture
- The template system hierarchy
- The style system with its global and module-specific implementations

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Client Interface"
        Browser["Web Browser"]
    end

    subgraph "Application Core"
        AppEntry["Vue App Entry"]:::core
        GlobalRouter["Global Router"]:::core
        GlobalStore["Global Store"]:::core
        TemplateSystem["Template System"]:::core
    end

    subgraph "Module System"
        subgraph "Auth Module"
            AuthModule["Module Container"]:::module
            AuthRouter["Router"]:::module
            AuthStore["Store"]:::module
            AuthService["Service"]:::module
        end

        subgraph "Dashboard Module"
            DashModule["Module Container"]:::module
            DashRouter["Router"]:::module
            DashStore["Store"]:::module
            DashService["Service"]:::module
        end

        subgraph "Posts Module"
            PostsModule["Module Container"]:::module
            PostsRouter["Router"]:::module
            PostsStore["Store"]:::module
            PostsService["Service"]:::module
        end
    end

    subgraph "Services Layer"
        LaravelService["Laravel Resource Service"]:::service
        QueryService["Query Service"]:::service
        SecureStorage["Secure Local Storage"]:::service
    end

    subgraph "Shared Resources"
        Assets["Assets"]:::resource
        Styles["Styles"]:::resource
        Components["Components"]:::resource
    end

    %% Relationships
    Browser --> AppEntry
    AppEntry --> GlobalRouter
    AppEntry --> GlobalStore
    AppEntry --> TemplateSystem

    GlobalRouter --> AuthRouter
    GlobalRouter --> DashRouter
    GlobalRouter --> PostsRouter

    GlobalStore --> AuthStore
    GlobalStore --> DashStore
    GlobalStore --> PostsStore

    AuthModule --> AuthRouter
    AuthModule --> AuthStore
    AuthModule --> AuthService

    DashModule --> DashRouter
    DashModule --> DashStore
    DashModule --> DashService

    PostsModule --> PostsRouter
    PostsModule --> PostsStore
    PostsModule --> PostsService

    AuthService --> LaravelService
    DashService --> LaravelService
    PostsService --> LaravelService

    LaravelService --> QueryService
    QueryService --> SecureStorage

    %% Click Events
    click AppEntry "https://github.com/AhmetTashan/VueProject/blob/main/src/App.vue"
    click GlobalRouter "https://github.com/AhmetTashan/VueProject/blob/main/src/router/index.js"
    click GlobalStore "https://github.com/AhmetTashan/VueProject/blob/main/src/store/index.js"
    click TemplateSystem "https://github.com/AhmetTashan/VueProject/tree/main/src/templates"
    click AuthModule "https://github.com/AhmetTashan/VueProject/blob/main/src/modules/auth/Module.vue"
    click AuthRouter "https://github.com/AhmetTashan/VueProject/blob/main/src/modules/auth/router.js"
    click AuthStore "https://github.com/AhmetTashan/VueProject/blob/main/src/modules/auth/store/index.js"
    click AuthService "https://github.com/AhmetTashan/VueProject/blob/main/src/modules/auth/service/authRequest.js"
    click DashModule "https://github.com/AhmetTashan/VueProject/blob/main/src/modules/dashboard/Module.vue"
    click DashRouter "https://github.com/AhmetTashan/VueProject/blob/main/src/modules/dashboard/router.js"
    click DashStore "https://github.com/AhmetTashan/VueProject/blob/main/src/modules/dashboard/store/index.js"
    click DashService "https://github.com/AhmetTashan/VueProject/blob/main/src/modules/dashboard/service/dashboardRequest.js"
    click PostsModule "https://github.com/AhmetTashan/VueProject/blob/main/src/modules/posts/Module.vue"
    click PostsRouter "https://github.com/AhmetTashan/VueProject/blob/main/src/modules/posts/router.js"
    click PostsStore "https://github.com/AhmetTashan/VueProject/blob/main/src/modules/posts/store/index.js"
    click PostsService "https://github.com/AhmetTashan/VueProject/blob/main/src/modules/posts/service/postRequest.js"
    click LaravelService "https://github.com/AhmetTashan/VueProject/blob/main/src/services/laravel.resource.service.js"
    click QueryService "https://github.com/AhmetTashan/VueProject/blob/main/src/services/query.service.js"
    click SecureStorage "https://github.com/AhmetTashan/VueProject/blob/main/src/services/secureLs.service.js"
    click Assets "https://github.com/AhmetTashan/VueProject/tree/main/src/assets"
    click Styles "https://github.com/AhmetTashan/VueProject/tree/main/src/assets/styles"
    click Components "https://github.com/AhmetTashan/VueProject/tree/main/src/assets/styles/components"

    %% Styling
    classDef core fill:#2196F3,stroke:#1565C0,color:white
    classDef module fill:#4CAF50,stroke:#2E7D32,color:white
    classDef service fill:#FFC107,stroke:#FFA000,color:black
    classDef resource fill:#9C27B0,stroke:#7B1FA2,color:white
    classDef default fill:#FFFFFF,stroke:#000000,color:black

    %% Legend
    subgraph Legend
        CoreLegend["Core Component"]:::core
        ModuleLegend["Module Component"]:::module
        ServiceLegend["Service Component"]:::service
        ResourceLegend["Shared Resource"]:::resource
    end
```
