# bhaskarrijal/lunaquake architecture

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

- Interactive diagram: https://gitdiagram.com/bhaskarrijal/lunaquake
- Repository: https://github.com/bhaskarrijal/lunaquake

## Overview

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

##### File structure
- Top‐level: configuration files (.eslintrc.cjs, vite.config.js, postcss.config.js, tailwind.config.js), index.html, package.json.
- public/: static assets served “as‐is” (data_images).
- src/: React entry point (main.jsx), App.jsx, component files, CSS, static JSON under src/data, TIFFs under src/assets.
- No backend code—everything is client‐side.

##### README for additional insights
- Confirms minimal React + Vite setup with HMR, ESLint, Tailwind CSS, and choice of React/Babel or SWC plugin.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Development"
        Developer["Developer"]:::external
        GitRepo["Git Repository"]:::external
        Developer --> GitRepo
    end

    subgraph "Build Pipeline"
        ViteConfig["vite.config.js"]:::build
        PostCSSConfig["postcss.config.js"]:::build
        TailwindConfig["tailwind.config.js"]:::build
        PackageJSON["package.json"]:::build
        ViteTools["Vite Build & Dev Server + Plugins"]:::build
        ViteConfig --> ViteTools
        PostCSSConfig --> ViteTools
        TailwindConfig --> ViteTools
        PackageJSON --> ViteTools
    end

    subgraph "Static Assets Store"
        PublicImages["public/data_images/"]:::data
        TIFF1["src/assets/ldem_16_uint.tif"]:::data
        TIFF2["src/assets/map0.tif"]:::data
        JSON1["src/data/final_data.json"]:::data
        JSON2["src/data/mission_data.json"]:::data
        JSON3["src/data/quake_archive.json"]:::data
        JSON4["src/data/quakes_data.json"]:::data
    end

    Dist["/dist Bundle (JS/CSS)"]:::runtime
    IndexHTML["index.html"]:::runtime
    WebServer["Web Server / CDN"]:::external
    Browser["Browser Runtime"]:::runtime

    subgraph "React App"
        Root["src/main.jsx"]:::component
        CSS["src/index.css"]:::component
        App["src/App.jsx"]:::component
        AppCSS["src/App.css"]:::component
        Splash["src/SplashScreen.jsx"]:::component
        Moon["src/MoonComponent.jsx"]:::component
        Mission["src/MissionDetails.jsx"]:::component
        NewMoon["src/NewMoon.jsx"]:::component

        Root --> App
        Root --> CSS
        App --> AppCSS
        App --> Splash
        App --> Moon
        App --> Mission
        App --> NewMoon
    end

    GitRepo --> ViteTools
    ViteTools --> Dist
    Dist --> WebServer
    IndexHTML --> WebServer

    WebServer --> Browser
    Browser --> IndexHTML
    Browser --> Dist
    Browser --> Root

    App --> JSON1
    App --> JSON2
    App --> JSON3
    App --> JSON4
    App --> PublicImages
    Moon --> TIFF1
    Moon --> TIFF2

    click ViteConfig "https://github.com/bhaskarrijal/lunaquake/blob/main/vite.config.js"
    click PostCSSConfig "https://github.com/bhaskarrijal/lunaquake/blob/main/postcss.config.js"
    click TailwindConfig "https://github.com/bhaskarrijal/lunaquake/blob/main/tailwind.config.js"
    click PackageJSON "https://github.com/bhaskarrijal/lunaquake/blob/main/package.json"
    click PublicImages "https://github.com/bhaskarrijal/lunaquake/tree/main/public/data_images/"
    click TIFF1 "https://github.com/bhaskarrijal/lunaquake/blob/main/src/assets/ldem_16_uint.tif"
    click TIFF2 "https://github.com/bhaskarrijal/lunaquake/blob/main/src/assets/map0.tif"
    click JSON1 "https://github.com/bhaskarrijal/lunaquake/blob/main/src/data/final_data.json"
    click JSON2 "https://github.com/bhaskarrijal/lunaquake/blob/main/src/data/mission_data.json"
    click JSON3 "https://github.com/bhaskarrijal/lunaquake/blob/main/src/data/quake_archive.json"
    click JSON4 "https://github.com/bhaskarrijal/lunaquake/blob/main/src/data/quakes_data.json"
    click IndexHTML "https://github.com/bhaskarrijal/lunaquake/blob/main/index.html"
    click Root "https://github.com/bhaskarrijal/lunaquake/blob/main/src/main.jsx"
    click CSS "https://github.com/bhaskarrijal/lunaquake/blob/main/src/index.css"
    click App "https://github.com/bhaskarrijal/lunaquake/blob/main/src/App.jsx"
    click AppCSS "https://github.com/bhaskarrijal/lunaquake/blob/main/src/App.css"
    click Splash "https://github.com/bhaskarrijal/lunaquake/blob/main/src/SplashScreen.jsx"
    click Moon "https://github.com/bhaskarrijal/lunaquake/blob/main/src/MoonComponent.jsx"
    click Mission "https://github.com/bhaskarrijal/lunaquake/blob/main/src/MissionDetails.jsx"
    click NewMoon "https://github.com/bhaskarrijal/lunaquake/blob/main/src/NewMoon.jsx"

    classDef build fill:#D0E6FF,stroke:#339,stroke-width:1px
    classDef runtime fill:#DFFFE0,stroke:#383,stroke-width:1px
    classDef data fill:#FFE6A7,stroke:#EA0,stroke-width:1px
    classDef component fill:#E0F7FF,stroke:#06A,stroke-width:1px
    classDef external fill:#F0F0F0,stroke:#999,stroke-width:1px
```
