# silence870121/atomission architecture

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

- Interactive diagram: https://gitdiagram.com/silence870121/atomission
- Repository: https://github.com/silence870121/atomission

## Overview

##### Project type and purpose
- Atomission is a single-page application (SPA) front-end built with Vue 3 (Vite, Pinia, vue-router), intended to connect to a Node.js REST API and external data stores (Firebase, MySQL, LocalStorage). Its purpose is to provide an automated task and milestone management interface.

##### File structure
- Top-level:
- index.html, public/ → static assets
- package.json, vite.config.js, jsconfig.json → build/config
- src/ → all Vue code
- src/ breakdown:
- main.js, App.vue, router.js → app entry, root component, routing
- components/ → reusable UI modules (Header, Masonry, basic/forms/compass/mission layouts)
- views/ → page-level components (404, index, compass, mission, profiles, settings, test)
- stores/ → Pinia modules (compass, mission, data, firebase integration, local IndexedDB, menu, settings, theme, user)
- No “services” folder, but store/firebase.js acts as the gateway to external DBs.

##### README for architectural clues
- Back-end (outside this repo): Node.js REST API
- Data stores: Firebase real-time DB, MySQL (placeholder), browser LocalStorage

##### Detail
- Dynamic route loaders (page.js) feeding into vue-router.
- Lifecycle: Dev server (HMR) vs. production build.

## Diagram (Mermaid)

```mermaid
graph TB
  subgraph "Front-end (Browser)"
    direction TB
    Browser["Browser (Vue SPA)"]:::frontend
    ViteTool["Build & Dev Toolchain (Vite)"]:::tool
    Public["Public Static Assets"]:::frontend
    Styles["Styles"]:::frontend
    Router["Routing Layer (vue-router)"]:::frontend
    Views["UI Layer - Views"]:::frontend
    Components["UI Layer - Reusable Components"]:::frontend
    Stores["State Layer (Pinia Stores)"]:::frontend
    FirebaseAdapter["Service Adapter - Firebase SDK"]:::frontend
    IndexedDB["Service Adapter - IndexedDB/LocalStorage"]:::frontend
    DataStore["Data Abstraction (data.js)"]:::frontend
    Assets["Assets & Constants"]:::frontend
  end

  subgraph "Back-end"
    direction TB
    APIServer["API Server (Node.js)"]:::api
    FirebaseDB["Firebase RTDB"]:::db
    MySQLDB["MySQL (Future)"]:::db
  end

  %% Connections
  Browser -->|"navigates"| Router
  Router -->|"loads pages"| Views
  Views -->|"uses"| Components
  Components -->|"dispatches"| Stores
  Stores -->|"calls SDK"| FirebaseAdapter
  Stores -->|"syncs with"| IndexedDB
  Stores -->|"abstracts via"| DataStore
  FirebaseAdapter -->|"reads/writes"| FirebaseDB
  DataStore -->|"fetches via REST"| APIServer
  APIServer -->|"CRUD operations"| FirebaseDB
  APIServer -->|"CRUD operations"| MySQLDB
  IndexedDB <-->|"cache sync"| Stores
  Assets -->|"feeds assets"| Views
  ViteTool -->|"serves/HMR"| Browser
  ViteTool -->|"bundles"| Router
  ViteTool -->|"bundles"| Views
  ViteTool -->|"bundles"| Components
  ViteTool -->|"bundles"| Stores
  Public -->|"static assets"| Browser
  Styles -->|"applies styles"| Browser

  %% Click Events
  click Browser "https://github.com/silence870121/atomission/blob/master/src/main.js"
  click Browser "https://github.com/silence870121/atomission/blob/master/src/App.vue"
  click Browser "https://github.com/silence870121/atomission/blob/master/index.html"
  click Router "https://github.com/silence870121/atomission/blob/master/src/router.js"
  click Router "https://github.com/silence870121/atomission/blob/master/src/views/**/page.js"
  click Views "https://github.com/silence870121/atomission/tree/master/src/views/"
  click Components "https://github.com/silence870121/atomission/tree/master/src/components/"
  click Stores "https://github.com/silence870121/atomission/blob/master/src/stores/*.js"
  click FirebaseAdapter "https://github.com/silence870121/atomission/blob/master/src/stores/firebase.js"
  click IndexedDB "https://github.com/silence870121/atomission/blob/master/src/stores/indexed.js"
  click DataStore "https://github.com/silence870121/atomission/blob/master/src/stores/data.js"
  click Assets "https://github.com/silence870121/atomission/blob/master/src/assets/constants.json"
  click ViteTool "https://github.com/silence870121/atomission/blob/master/vite.config.js"
  click ViteTool "https://github.com/silence870121/atomission/blob/master/jsconfig.json"
  click ViteTool "https://github.com/silence870121/atomission/blob/master/package.json"
  click Public "https://github.com/silence870121/atomission/tree/master/public/"
  click Styles "https://github.com/silence870121/atomission/blob/master/src/style.css"

  %% Styles
  classDef frontend fill:#cce5ff,stroke:#333,stroke-width:1px
  classDef api fill:#ffd1a9,stroke:#333,stroke-width:1px
  classDef db fill:#ccffcc,stroke:#333,stroke-width:1px
  classDef tool stroke:#555,stroke-dasharray:5 5,fill:none,stroke-width:1px
```
