# bondler1994/2025-tarot_planning architecture

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

- Interactive diagram: https://gitdiagram.com/bondler1994/2025-tarot_planning
- Repository: https://github.com/bondler1994/2025-tarot_planning

## Overview

##### Project type and purpose
- This is a single-page application (SPA) built with Vue.js and Vite.

##### File structure
- Top-level configs: .vscode/, .gitignore, deploy.sh, package.json, vite.config.js, vitest.config.js, eslint.config.js, prettier settings.
- Public folder: static assets, redirect rules for SPA routing.
- src/:
- main.js: app bootstrap
- App.vue: root component
- stores/: Pinia/Vuex-style state stores (cardDataStore, profileStore)
- features/: reusable JS modules (tarotDiaryAPI.js handles HTTP to backend, validateRules.js for form validation)
- views/: page‐level components that map to routes
- assets/: Sass partials, fonts, images
- deploy.sh: CI/CD script to build and push a production bundle (likely to Netlify, Vercel, or a similar static host).

##### README for additional insights
- Minimal content, but the title confirms the diary/Tarot theme.
- No explicit backend code—implies that the app talks to an external REST API (tarotDiaryAPI.js).

##### Additional notes
- If needed, expand “tarotDiaryAPI.js” into individual REST endpoints (login, register, getEntries, postEntry, drawCard).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client Browser Layer
    subgraph "Client (Browser)"
        direction TB
        Entry["main.js"]:::client
        App["App.vue"]:::client
        Router["Routing Layer\n(router/index.js)"]:::client
        Views["Views"]:::client
        Components["UI Components"]:::client
        Features["Feature Services\n(tarotDiaryAPI.js,\nvalidateRules.js)"]:::client
        Stores["State Stores\n(cardDataStore.js,\nprofileStore.js)"]:::client
    end

    %% Static Hosting
    CDN["Static Host\n(CDN/Netlify/Vercel)"]:::host

    %% External OAuth
    OAuth["Google OAuth2"]:::external

    %% Backend API
    API["REST API\n(tarotDiaryAPI)"]:::backend

    %% Database
    DB["Database\n(User Profiles,\nDiary Entries,\nCard Data)"]:::database

    %% Build Pipeline
    subgraph "Build & Deploy"
        direction TB
        Source["Source Code\n(package.json,\nvite.config.js, etc.)"]:::pipeline
        Build["Vite Build"]:::pipeline
        Deploy["deploy.sh"]:::pipeline
    end

    %% SPA Host Entry
    Index["index.html"]:::client

    %% Asset & Redirect Config
    Redirects["_redirects"]:::host

    %% Client Internal Flow
    Entry --> App
    App --> Router
    Router --> Views
    Views --> Components
    Components --> Features
    Features --> Stores

    %% Asset Delivery
    CDN -->|serves assets| Entry
    CDN -->|serves assets| Index
    Entry -->|loads| CDN

    %% OAuth Flow
    Entry -->|auth request| OAuth
    OAuth -->|auth token| Entry

    %% API Calls
    Features -->|HTTP requests| API
    Entry -->|data requests| API

    %% Backend to DB
    API -->|read/write| DB

    %% Build Pipeline to Host
    Source --> Build
    Build --> Deploy
    Deploy --> CDN

    %% Redirects config on Host
    Redirects --> CDN

    %% Click Events
    click Entry "https://github.com/bondler1994/2025-tarot_planning/blob/main/tarot-planning/src/main.js"
    click App "https://github.com/bondler1994/2025-tarot_planning/blob/main/tarot-planning/src/App.vue"
    click Router "https://github.com/bondler1994/2025-tarot_planning/blob/main/tarot-planning/src/router/index.js"
    click Views "https://github.com/bondler1994/2025-tarot_planning/blob/main/tarot-planning/src/views/DiaryOverviewView.vue"
    click Views "https://github.com/bondler1994/2025-tarot_planning/blob/main/tarot-planning/src/views/WriteDiary.vue"
    click Views "https://github.com/bondler1994/2025-tarot_planning/blob/main/tarot-planning/src/views/Draw.vue"
    click Views "https://github.com/bondler1994/2025-tarot_planning/blob/main/tarot-planning/src/views/TodayDrawView.vue"
    click Views "https://github.com/bondler1994/2025-tarot_planning/blob/main/tarot-planning/src/views/ProfileView.vue"
    click Views "https://github.com/bondler1994/2025-tarot_planning/blob/main/tarot-planning/src/views/LoginView.vue"
    click Views "https://github.com/bondler1994/2025-tarot_planning/blob/main/tarot-planning/src/views/register/RegisterView.vue"
    click Views "https://github.com/bondler1994/2025-tarot_planning/blob/main/tarot-planning/src/views/register/ConfirmationView.vue"
    click Views "https://github.com/bondler1994/2025-tarot_planning/blob/main/tarot-planning/src/views/register/RegisterGoogleUpdateView.vue"
    click Views "https://github.com/bondler1994/2025-tarot_planning/blob/main/tarot-planning/src/views/register/RegisterSuccessView.vue"
    click Views "https://github.com/bondler1994/2025-tarot_planning/blob/main/tarot-planning/src/views/FirstVisit.vue"
    click Views "https://github.com/bondler1994/2025-tarot_planning/blob/main/tarot-planning/src/views/MemberView.vue"
    click Views "https://github.com/bondler1994/2025-tarot_planning/blob/main/tarot-planning/src/views/EasterEggView.vue"
    click Components "https://github.com/bondler1994/2025-tarot_planning/blob/main/tarot-planning/src/components/BtnGoogleLogin.vue"
    click Components "https://github.com/bondler1994/2025-tarot_planning/blob/main/tarot-planning/src/components/InputBox.vue"
    click Components "https://github.com/bondler1994/2025-tarot_planning/blob/main/tarot-planning/src/components/InputBoxRadio.vue"
    click Components "https://github.com/bondler1994/2025-tarot_planning/blob/main/tarot-planning/src/components/InputStatus.vue"
    click Components "https://github.com/bondler1994/2025-tarot_planning/blob/main/tarot-planning/src/components/EditSign.vue"
    click Features "https://github.com/bondler1994/2025-tarot_planning/blob/main/tarot-planning/src/features/tarotDiaryAPI.js"
    click Features "https://github.com/bondler1994/2025-tarot_planning/blob/main/tarot-planning/src/features/validateRules.js"
    click Stores "https://github.com/bondler1994/2025-tarot_planning/blob/main/tarot-planning/src/stores/cardDataStore.js"
    click Stores "https://github.com/bondler1994/2025-tarot_planning/blob/main/tarot-planning/src/stores/profileStore.js"
    click CDN "https://github.com/bondler1994/2025-tarot_planning/tree/main/tarot-planning/public/_redirects"
    click Source "https://github.com/bondler1994/2025-tarot_planning/blob/main/tarot-planning/package.json"
    click Source "https://github.com/bondler1994/2025-tarot_planning/blob/main/tarot-planning/vite.config.js"
    click Source "https://github.com/bondler1994/2025-tarot_planning/blob/main/tarot-planning/vitest.config.js"
    click Deploy "https://github.com/bondler1994/2025-tarot_planning/blob/main/tarot-planning/deploy.sh"
    click Index "https://github.com/bondler1994/2025-tarot_planning/blob/main/tarot-planning/index.html"

    %% Styles
    classDef client fill:#D0E8FF,stroke:#0366D6,color:#0366D6;
    classDef host fill:#E8E8E8,stroke:#666666,color:#333333;
    classDef external fill:#E2F0D9,stroke:#4F8A10,color:#4F8A10;
    classDef backend fill:#FFE3B3,stroke:#B36B00,color:#B36B00;
    classDef database fill:#F0F0F0,stroke:#999999,stroke-width:2px,color:#333333;
    classDef pipeline fill:#F5E1FF,stroke:#8E44AD,color:#8E44AD;
```
