# vuegatti/vuegattifront architecture

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

- Interactive diagram: https://gitdiagram.com/vuegatti/vuegattifront
- Repository: https://github.com/vuegatti/vuegattifront

## Overview

##### Project type and purpose
- This is a single-page application (SPA) built with Vue.js 3, Vue Router and Pinia on the frontend, backed by a mock JSON Server (hosted on Glitch) via Axios.

##### File structure
- Top‐level folders:
- public / index.html – static assets and HTML entry point.
- src – your Vue app’s source code:
· components – reusable UI elements (buttons, sidebar, headers, pickers)
· views – page-level components (HomePage, CalendarView, SignInView, etc.)
· router – route definitions (src/router/index.js)
· stores – Pinia stores (account, history, calendar)
· utils – axios instance/HTTP client
· App.vue / main.js – the root component and app initialization.
- Config / build files:
- vite.config.js – Vite build config
- package.json / package-lock.json – dependencies
- eslint.config.js / .prettierrc.json – linting and formatting rules

##### README for additional insights
- Tech stack clearly calls out: Vue3, Vue Router, Pinia, CSS3, Chart.js, JSON Server, Axios, Glitch, Vercel.
- Features: calendar-based record keeping, category graphs, date-based notes, auth & profile.

##### Elements
- Labels for each component/module (e.g., “Pinia store: history.js”).
- Backend/API in another (e.g., orange)
- External services in a third (e.g., green)

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Client and Bootstrap
    ClientBrowser(("Client Browser")):::frontend
    mainJS["main.js"]:::frontend
    AppVue["App.vue"]:::frontend

    ClientBrowser --> mainJS
    mainJS --> AppVue

    %% Frontend Layer
    subgraph "Frontend (Vue SPA)"
        direction TB
        Router["Vue Router\n(src/router/index.js)"]:::frontend
        subgraph "Views" 
            direction TB
            HomePage["HomePage.vue"]:::view
            CalendarView["CalendarView.vue"]:::view
            LogInView["LogInView.vue"]:::view
            SignInView["SignInView.vue"]:::view
            AccountReg["AccountReg.vue"]:::view
            MainView["MainView.vue"]:::view
            HistoryList["HistoryList.vue"]:::view
            ListForm["ListForm.vue"]:::view
            ModifyForm["ModifyForm.vue"]:::view
            BarChart["BarChart.vue"]:::view
            PieChart["PieChart.vue"]:::view
            MyPage["MyPage.vue"]:::view
            MyPageProFile["MyPageProFile.vue"]:::view
            UserProfile["UserProfile.vue"]:::view
            BankAccountSelect["BankAccountSelect.vue"]:::view
            CardSlide["CardSlide.vue"]:::view
        end
        subgraph "Components"
            direction TB
            AvatarPicker["AvartarPicker.vue"]:::component
            AvatarPicture["AvatarPicture.vue"]:::component
            BaseButton["BaseButton.vue"]:::component
            HomeFooter["HomeFooter.vue"]:::component
            HomeHeader["HomeHeader.vue"]:::component
            SideBar["SideBar.vue"]:::component
        end
        subgraph "Stores (Pinia)"
            direction TB
            AccountStore["account.js"]:::store
            HistoryStore["history.js"]:::store
            CalendarStore["useCalendarStore.js"]:::store
        end
        subgraph "Utils"
            direction TB
            AxiosUtil["axios.js"]:::util
        end
        ChartJS["Chart.js"]:::external
        CSSAssets["main.css"]:::frontend
        ImgAssets["bankicon/, image/"]:::frontend
        HTMLIndex["index.html"]:::external
    end

    AppVue --> Router
    AppVue --> AccountStore
    AppVue --> HistoryStore
    AppVue --> CalendarStore
    AppVue --> AxiosUtil
    AppVue --> CSSAssets
    AppVue --> ImgAssets

    Router --> HomePage
    Router --> CalendarView
    Router --> LogInView
    Router --> SignInView
    Router --> AccountReg
    Router --> MainView

    Views -->|uses| Components
    Views -->|dispatches| Stores
    Views -->|fetches| AxiosUtil
    Views -->|visualizes| ChartJS

    AccountStore --> AxiosUtil
    HistoryStore --> AxiosUtil
    CalendarStore --> AxiosUtil

    %% Backend/API Layer
    subgraph "Backend (JSON Server API)" 
        direction TB
        JSONServer["JSON Server (Glitch)"]:::backend
    end

    AxiosUtil -->|HTTP GET/POST/PUT/DELETE| JSONServer

    %% Data Store
    subgraph "Data Store"
        direction TB
        DBJson["db.json"]:::database
    end

    JSONServer --> DBJson

    %% Build & Deployment
    subgraph "Build & Deploy"
        direction TB
        Vite["Vite"]:::external
        Vercel["Vercel"]:::external
        GitHub["GitHub"]:::external
        Glitch["Glitch"]:::external
    end

    AppVue --> Vite
    Vite --> Vercel
    JSONServer --> Glitch
    mainJS --> GitHub

    %% Click events
    click mainJS "https://github.com/vuegatti/vuegattifront/blob/main/src/main.js"
    click AppVue "https://github.com/vuegatti/vuegattifront/blob/main/src/App.vue"
    click Router "https://github.com/vuegatti/vuegattifront/blob/main/src/router/index.js"
    click AccountStore "https://github.com/vuegatti/vuegattifront/blob/main/src/stores/account.js"
    click HistoryStore "https://github.com/vuegatti/vuegattifront/blob/main/src/stores/history.js"
    click CalendarStore "https://github.com/vuegatti/vuegattifront/blob/main/src/stores/useCalendarStore.js"
    click AxiosUtil "https://github.com/vuegatti/vuegattifront/blob/main/src/utils/axios.js"
    click AvatarPicker "https://github.com/vuegatti/vuegattifront/blob/main/src/components/AvartarPicker.vue"
    click AvatarPicture "https://github.com/vuegatti/vuegattifront/blob/main/src/components/AvatarPicture.vue"
    click BaseButton "https://github.com/vuegatti/vuegattifront/blob/main/src/components/BaseButton.vue"
    click HomeFooter "https://github.com/vuegatti/vuegattifront/blob/main/src/components/HomeFooter.vue"
    click HomeHeader "https://github.com/vuegatti/vuegattifront/blob/main/src/components/HomeHeader.vue"
    click SideBar "https://github.com/vuegatti/vuegattifront/blob/main/src/components/SideBar.vue"
    click HomePage "https://github.com/vuegatti/vuegattifront/blob/main/src/views/HomePage.vue"
    click CalendarView "https://github.com/vuegatti/vuegattifront/blob/main/src/views/CalendarView.vue"
    click LogInView "https://github.com/vuegatti/vuegattifront/blob/main/src/views/LogInView.vue"
    click SignInView "https://github.com/vuegatti/vuegattifront/blob/main/src/views/SignInView.vue"
    click AccountReg "https://github.com/vuegatti/vuegattifront/blob/main/src/views/AccountReg.vue"
    click MainView "https://github.com/vuegatti/vuegattifront/blob/main/src/views/MainView.vue"
    click HistoryList "https://github.com/vuegatti/vuegattifront/blob/main/src/views/HistoryList.vue"
    click ListForm "https://github.com/vuegatti/vuegattifront/blob/main/src/views/ListForm.vue"
    click ModifyForm "https://github.com/vuegatti/vuegattifront/blob/main/src/views/ModifyForm.vue"
    click BarChart "https://github.com/vuegatti/vuegattifront/blob/main/src/views/BarChart.vue"
    click PieChart "https://github.com/vuegatti/vuegattifront/blob/main/src/views/PieChart.vue"
    click MyPage "https://github.com/vuegatti/vuegattifront/blob/main/src/views/MyPage.vue"
    click MyPageProFile "https://github.com/vuegatti/vuegattifront/blob/main/src/views/MyPageProFile.vue"
    click UserProfile "https://github.com/vuegatti/vuegattifront/blob/main/src/views/UserProfile.vue"
    click BankAccountSelect "https://github.com/vuegatti/vuegattifront/blob/main/src/views/BankAccountSelect.vue"
    click CardSlide "https://github.com/vuegatti/vuegattifront/blob/main/src/views/CardSlide.vue"
    click CSSAssets "https://github.com/vuegatti/vuegattifront/blob/main/src/assets/main.css"
    click ImgAssets "https://github.com/vuegatti/vuegattifront/tree/main/src/assets/bankicon/"
    click DBJson "https://github.com/vuegatti/vuegattifront/blob/main/db.json"
    click Vite "https://github.com/vuegatti/vuegattifront/blob/main/vite.config.js"
    click GitHub "https://github.com/vuegatti/vuegattifront/blob/main/package.json"
    click GitHub "https://github.com/vuegatti/vuegattifront/blob/main/package-lock.json"
    click Glitch "https://github.com/vuegatti/vuegattifront/blob/main/public/index.html"
    click Vite "https://github.com/vuegatti/vuegattifront/blob/main/eslint.config.js"
    click Vite "https://github.com/vuegatti/vuegattifront/blob/main/.prettierrc.json"
    click Vite "https://github.com/vuegatti/vuegattifront/blob/main/jsconfig.json"

    %% Styles
    classDef frontend fill:#cce5ff,stroke:#333,stroke-width:1px
    classDef backend fill:#ffe0b3,stroke:#333,stroke-width:1px
    classDef database fill:#ffcccb,stroke:#333,stroke-width:1px
    classDef external fill:#d5f5e3,stroke:#333,stroke-width:1px
    classDef util fill:#e6e6e6,stroke:#333,stroke-width:1px
    classDef view fill:#e0e0ff,stroke:#333,stroke-width:1px
    classDef component fill:#ccf2ff,stroke:#333,stroke-width:1px
    classDef store fill:#ffffcc,stroke:#333,stroke-width:1px
```
