# tikusdugem/efishery-fe-task architecture

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

- Interactive diagram: https://gitdiagram.com/tikusdugem/efishery-fe-task
- Repository: https://github.com/tikusdugem/efishery-fe-task

## Overview

##### Main Components
- Frontend UI Layer:
– Main application file (src/App.vue)
– Layouts (src/layouts/MainLayout.vue)
– Pages (src/pages, such as LandingPage.vue and Error404.vue)
- Routing & Navigation:
– Router configuration (src/router/index.js and routes.js) that directs user navigation across pages
- State Management:
– Vuex store (src/store) including dedicated modules (e.g., src/store/landing-page with actions, getters, mutations, and state)
- Bootstrapping & Initialization:
– Boot files (src/boot directory) for initializing third-party libraries like Axios (axios.js) and i18n (i18n.js)
- Internationalization:
– i18n configuration (src/i18n, with language files under src/i18n/en-us)
- Assets & Styling:
– Static assets (src/assets)
– Stylesheets (src/css, including Quasar-specific theming in quasar.variables.scss)
- Service Worker and PWA Enhancements:
– PWA specific files in src-pwa (custom-service-worker.js, register-service-worker.js, etc.)
- Public/Static Files & Configuration:
– Various configuration files (quasar.conf.js, babel.config.js, etc.) for building and linting

##### Relationships & Data Flow
- The boot files perform the initial configuration and integration: when the application starts, they register internationalization settings and activate Axios for API calls (using environment variables defined in .dev.env/.prod.env).
- The main App.vue serves as the root container. From here, the router directs the user to different pages/layouts.
- Vuex (state management) is globally scoped and interacts with various pages to manage application state.
- The service worker (and related PWA files) manages caching and offline capabilities, communicating with the main app to keep the PWA functionalities intact.
- The Quasar CLI (as seen in the project’s build and configuration files) orchestrates the build and deployment processes, ensuring that environment variables are injected properly.

##### Recognize Key Architectural Patterns
- Component-Based UI Development (Vue.js with .vue files)
- MVC/MVVM-like patterns within Vue – the “view” (layouts/pages), “model” (Vuex store) and “controller” (router/boot logic)
- Separation of concerns through boot modules, dedicated configuration for PWA service worker, and distinct directories for assets, styles, and i18n resources.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Build & Configuration
    subgraph "Build & Configuration"
        QC("quasar.conf.js"):::config
        BC("babel.config.js"):::config
        Pub("Public Files"):::config
    end

    %% Bootstrapping & Initialization
    subgraph "Bootstrapping & Initialization"
        BA("Boot Axios (axios.js)"):::boot
        BI("Boot i18n (i18n.js)"):::boot
    end

    %% Internationalization
    subgraph "Internationalization"
        IM("i18n Module (src/i18n)"):::frontend
        IEn("i18n en-US (en-us/index.js)"):::frontend
    end

    %% Routing & Navigation
    subgraph "Routing & Navigation"
        RI("Router (index.js)"):::frontend
        RR("Routes (routes.js)"):::frontend
    end

    %% Frontend UI Layer
    subgraph "Frontend UI Layer"
        ML("MainLayout (Layouts)"):::frontend
        LP("Landing Page"):::frontend
        E404("Error404 Page"):::frontend
    end

    %% State Management (Vuex)
    subgraph "State Management (Vuex)"
        SI("Vuex Store (index.js)"):::state
        SL("Landing-page Module"):::state
    end

    %% Assets & Styling
    subgraph "Assets & Styling"
        AS("Assets"):::assets
        CA("app.scss"):::assets
        CQ("quasar.variables.scss"):::assets
    end

    %% Service Worker & PWA Enhancements
    subgraph "Service Worker & PWA"
        CSW("Custom Service Worker (custom-service-worker.js)"):::pwa
        RSW("Register Service Worker (register-service-worker.js)"):::pwa
    end

    %% Application Core
    subgraph "Application Core"
        App("App.vue (Entry Point)"):::frontend
    end

    %% Connections: Build & Configuration to Bootstrapping
    QC --> BA
    BC --> BA
    Pub --> BA
    QC --> BI
    BC --> BI
    Pub --> BI

    %% Bootstrapping influences Application Core and Internationalization
    BA --> App
    BI --> IM
    IM --> IEn
    IM --> App

    %% Application Core interactions
    App --> RI
    App --> SI
    App --> CSW
    App --> RSW

    %% Routing flows
    RI --> RR
    RR --> ML

    %% Frontend UI Layer flows
    ML --> LP
    ML --> E404

    %% State Management influence on UI
    SI --> SL
    SL --> LP

    %% Assets & Styling influence on UI
    AS --> ML
    CA --> ML
    CQ --> ML

    %% Click Events
    click App "https://github.com/tikusdugem/efishery-fe-task/blob/master/src/App.vue"
    click ML "https://github.com/tikusdugem/efishery-fe-task/blob/master/src/layouts/MainLayout.vue"
    click LP "https://github.com/tikusdugem/efishery-fe-task/blob/master/src/pages/LandingPage.vue"
    click E404 "https://github.com/tikusdugem/efishery-fe-task/blob/master/src/pages/Error404.vue"
    click RI "https://github.com/tikusdugem/efishery-fe-task/blob/master/src/router/index.js"
    click RR "https://github.com/tikusdugem/efishery-fe-task/blob/master/src/router/routes.js"
    click SI "https://github.com/tikusdugem/efishery-fe-task/blob/master/src/store/index.js"
    click SL "https://github.com/tikusdugem/efishery-fe-task/tree/master/src/store/landing-page"
    click BA "https://github.com/tikusdugem/efishery-fe-task/blob/master/src/boot/axios.js"
    click BI "https://github.com/tikusdugem/efishery-fe-task/blob/master/src/boot/i18n.js"
    click IM "https://github.com/tikusdugem/efishery-fe-task/tree/master/src/i18n"
    click IEn "https://github.com/tikusdugem/efishery-fe-task/blob/master/src/i18n/en-us/index.js"
    click AS "https://github.com/tikusdugem/efishery-fe-task/tree/master/src/assets"
    click CA "https://github.com/tikusdugem/efishery-fe-task/blob/master/src/css/app.scss"
    click CQ "https://github.com/tikusdugem/efishery-fe-task/blob/master/src/css/quasar.variables.scss"
    click CSW "https://github.com/tikusdugem/efishery-fe-task/blob/master/src-pwa/custom-service-worker.js"
    click RSW "https://github.com/tikusdugem/efishery-fe-task/blob/master/src-pwa/register-service-worker.js"
    click Pub "https://github.com/tikusdugem/efishery-fe-task/tree/master/public"
    click QC "https://github.com/tikusdugem/efishery-fe-task/blob/master/quasar.conf.js"
    click BC "https://github.com/tikusdugem/efishery-fe-task/blob/master/babel.config.js"

    %% Styles
    classDef frontend fill:#ADD8E6,stroke:#000,stroke-width:2px;
    classDef state fill:#90EE90,stroke:#000,stroke-width:2px;
    classDef boot fill:#FFD700,stroke:#000,stroke-width:2px;
    classDef config fill:#DDA0DD,stroke:#000,stroke-width:2px;
    classDef pwa fill:#FFB6C1,stroke:#000,stroke-width:2px;
    classDef assets fill:#AFEEEE,stroke:#000,stroke-width:2px;
```
