# ecorrouge/rococo-sample-vue3 architecture

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

- Interactive diagram: https://gitdiagram.com/ecorrouge/rococo-sample-vue3
- Repository: https://github.com/ecorrouge/rococo-sample-vue3

## Overview

##### Project type and purpose
- This is a single-page application (SPA) built with Quasar (Vue 3) as a “rococo-sample-vue3” starter front-end.
- It provides authentication pages (Login, Signup, Forgot/Set Password) and likely communicates with a Rococo blockchain endpoint or an authentication API.

##### File structure
- Top-level Quasar config and build files: quasar.config.js, index.html, package.json, postcss.config.js, etc.
- src/boot – plugin initializers (axios, pinia) that run before app launch.
- src/router – Vue Router setup (index.js, routes.js).
- src/stores – Pinia stores (auth.js) for global reactive state.
- src/pages – high-level views (IndexPage, LoginPage, etc.).
- src/layouts – MainLayout.vue wrapping all pages.
- src/components – reusable pieces (AppHeader.vue, EssentialLink.vue).
- src/services & src/utils – localStorage.service, apiHelper, and axios config under src/config for abstracting API calls.
- src/assets & src/css – static resources and style definitions.

##### Key README insights
- The app runs in “quasar dev” and builds with “quasar build.”
- No backend code shipped here—this is purely the front-end.
- Customization happens via quasar.config.js.

##### Main components & their relationships
a. Browser / Client – hosts the Quasar SPA (index.html loads Quasar/Vite bundle).
b. Quasar Framework & Vue3 – the runtime that wires up boot files, router, store, layout, pages and components.
c. Router – directs URL changes into page components.
d. Pinia Store – holds authentication state and other shared data.
e. Service Layer
- Axios instance (src/boot/axios.js & src/config/axios.js)
- apiHelper.js for standardized calls
- localStorage.service.js for persistence in browser storage
f. External Services – e.g., a rococo RPC endpoint or auth REST API.
g. Static assets & styles – under src/assets and src/css.

##### Important architectural patterns
- SPA with MVVM flavor (Vue components = View/ViewModel, Pinia = Model)
- Dependency injection via boot files (quasar boot)
- Service-oriented API abstraction (axios + helper + config)
- Separation of concerns: UI (components/pages/layouts) vs. State (stores) vs. Infrastructure (services/utils)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Presentation Tier
    subgraph "Presentation Tier"
        direction TB
        Browser["Browser / Client\nindex.html"]:::ui
        App["App.vue\nsrc/App.vue"]:::ui
        MainLayout["MainLayout.vue\nsrc/layouts/MainLayout.vue"]:::ui
        subgraph "Pages"
            direction TB
            IndexPage["IndexPage.vue"]:::ui
            LoginPage["LoginPage.vue"]:::ui
            SignupPage["SignupPage.vue"]:::ui
            ForgotPasswordPage["ForgotPasswordPage.vue"]:::ui
            SetPasswordPage["SetPasswordPage.vue"]:::ui
            ErrorNotFound["ErrorNotFound.vue"]:::ui
        end
        subgraph "Components"
            direction TB
            AppHeader["AppHeader.vue"]:::ui
            EssentialLink["EssentialLink.vue"]:::ui
        end
        subgraph "Assets & Styles"
            direction TB
            Assets["src/assets"]:::ui
            CSS_app["app.scss\nsrc/css/app.scss"]:::ui
            CSS_quasar["quasar.variables.scss\nsrc/css/quasar.variables.scss"]:::ui
        end
    end

    %% Application Tier
    subgraph "Application Tier"
        direction TB
        BootAxios["axios boot\nsrc/boot/axios.js"]:::service
        BootPinia["pinia boot\nsrc/boot/pinia.js"]:::service
        QuasarConfig["quasar.config.js"]:::service
        subgraph "Router"
            direction TB
            RouterIndex["index.js\nsrc/router/index.js"]:::service
            RouterRoutes["routes.js\nsrc/router/routes.js"]:::service
        end
        AuthStore["auth.js\nsrc/stores/auth.js"]:::store
        AxiosConfig["axios.config\nsrc/config/axios.js"]:::service
        APIHelper["apiHelper.js\nsrc/utils/apiHelper.js"]:::service
        LocalStorage["localStorage.service.js\nsrc/services/localStorage.service.js"]:::service
    end

    %% Integration Tier
    subgraph "Integration Tier"
        direction TB
        RococoRPC["Rococo Blockchain RPC"]:::external
        AuthAPI["Authentication API"]:::external
    end

    %% Connections
    Browser -->|"loads"| App
    Browser -->|"initializes"| BootAxios
    Browser -->|"initializes"| BootPinia
    BootAxios -->|"configures axios"| AxiosConfig
    BootPinia -->|"initializes store"| AuthStore
    App -->|"uses layout"| MainLayout
    MainLayout -->|"renders router-view"| RouterIndex
    RouterIndex -->|"loads routes"| RouterRoutes
    RouterIndex -->|"navigates to"| IndexPage
    RouterIndex -->|"navigates to"| LoginPage
    RouterIndex -->|"navigates to"| SignupPage
    RouterIndex -->|"navigates to"| ForgotPasswordPage
    RouterIndex -->|"navigates to"| SetPasswordPage
    RouterIndex -->|"navigates to"| ErrorNotFound
    App -->|"renders components"| AppHeader
    App -->|"renders components"| EssentialLink
    App -->|"loads assets/styles"| Assets
    App -->|"loads assets/styles"| CSS_app
    App -->|"loads assets/styles"| CSS_quasar
    IndexPage -->|"dispatches actions"| AuthStore
    LoginPage -->|"dispatches actions"| AuthStore
    SignupPage -->|"dispatches actions"| AuthStore
    ForgotPasswordPage -->|"dispatches actions"| AuthStore
    SetPasswordPage -->|"dispatches actions"| AuthStore
    AuthStore -->|"persists data"| LocalStorage
    AuthStore -->|"calls"| APIHelper
    APIHelper -->|"uses"| AxiosConfig
    APIHelper -->|"sends requests"| RococoRPC
    APIHelper -->|"sends requests"| AuthAPI
    RococoRPC -->|"responds"| APIHelper
    AuthAPI -->|"responds"| APIHelper
    APIHelper -->|"returns data"| AuthStore
    AuthStore -->|"updates state"| App

    %% Click Events
    click Browser "https://github.com/ecorrouge/rococo-sample-vue3/blob/main/index.html"
    click App "https://github.com/ecorrouge/rococo-sample-vue3/blob/main/src/App.vue"
    click MainLayout "https://github.com/ecorrouge/rococo-sample-vue3/blob/main/src/layouts/MainLayout.vue"
    click IndexPage "https://github.com/ecorrouge/rococo-sample-vue3/blob/main/src/pages/IndexPage.vue"
    click LoginPage "https://github.com/ecorrouge/rococo-sample-vue3/blob/main/src/pages/LoginPage.vue"
    click SignupPage "https://github.com/ecorrouge/rococo-sample-vue3/blob/main/src/pages/SignupPage.vue"
    click ForgotPasswordPage "https://github.com/ecorrouge/rococo-sample-vue3/blob/main/src/pages/ForgotPasswordPage.vue"
    click SetPasswordPage "https://github.com/ecorrouge/rococo-sample-vue3/blob/main/src/pages/SetPasswordPage.vue"
    click ErrorNotFound "https://github.com/ecorrouge/rococo-sample-vue3/blob/main/src/pages/ErrorNotFound.vue"
    click AppHeader "https://github.com/ecorrouge/rococo-sample-vue3/blob/main/src/components/AppHeader.vue"
    click EssentialLink "https://github.com/ecorrouge/rococo-sample-vue3/blob/main/src/components/EssentialLink.vue"
    click RouterIndex "https://github.com/ecorrouge/rococo-sample-vue3/blob/main/src/router/index.js"
    click RouterRoutes "https://github.com/ecorrouge/rococo-sample-vue3/blob/main/src/router/routes.js"
    click AuthStore "https://github.com/ecorrouge/rococo-sample-vue3/blob/main/src/stores/auth.js"
    click BootAxios "https://github.com/ecorrouge/rococo-sample-vue3/blob/main/src/boot/axios.js"
    click BootPinia "https://github.com/ecorrouge/rococo-sample-vue3/blob/main/src/boot/pinia.js"
    click AxiosConfig "https://github.com/ecorrouge/rococo-sample-vue3/blob/main/src/config/axios.js"
    click APIHelper "https://github.com/ecorrouge/rococo-sample-vue3/blob/main/src/utils/apiHelper.js"
    click LocalStorage "https://github.com/ecorrouge/rococo-sample-vue3/blob/main/src/services/localStorage.service.js"
    click Assets "https://github.com/ecorrouge/rococo-sample-vue3/tree/main/src/assets"
    click CSS_app "https://github.com/ecorrouge/rococo-sample-vue3/blob/main/src/css/app.scss"
    click CSS_quasar "https://github.com/ecorrouge/rococo-sample-vue3/blob/main/src/css/quasar.variables.scss"
    click QuasarConfig "https://github.com/ecorrouge/rococo-sample-vue3/blob/main/quasar.config.js"

    %% Styles
    classDef ui fill:#E0F7FA,stroke:#006064,color:#004D40
    classDef store fill:#E8F5E9,stroke:#1B5E20,color:#2E7D32
    classDef service fill:#FFF3E0,stroke:#E65100,color:#BF360C
    classDef external fill:#FFFDE7,stroke:#F9A825,color:#F57F17
```
