# 05sanjaykumar/solar-system-3-js architecture

> Architecture diagram of the GitHub repository 05sanjaykumar/solar-system-3-js, 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/05sanjaykumar/solar-system-3-js
- Repository: https://github.com/05sanjaykumar/solar-system-3-js

## Overview

##### Project type and purpose
- This is a single-page, front-end web application: a 3D Solar System simulation built with Three.js, bundled via Vite.
- It runs entirely in the browser, rendering an interactive scene of the Sun, eight planets, the Moon, Saturn’s rings, and a starfield.

##### File structure
- Top-level files:
- index.html – the HTML entry point
- package.json & package-lock.json – project metadata and dependencies
- vite.config.js – Vite bundler configuration
- Directories:
- public/ – static assets (if any) served as-is
- src/ – source code
– main.js – entry JavaScript that bootstraps Three.js
– style.css – global styles
– Textures/BlueTiles01_MR_4K/ – example texture assets
- No backend folder or server code—pure front-end.

##### README for additional insights
- Confirms technologies: Three.js and plain JavaScript, with OrbitControls for camera movement.
- No external APIs or databases are involved. All assets load locally.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Bundler and Environment
    ProjectMeta["package.json & package-lock.json"]:::meta
    Vite["Vite Dev Server"]:::bundler
    Browser["Browser Environment"]:::browser

    ProjectMeta --> Vite
    Vite --> Browser

    %% Static Assets
    Textures(("Local Textures")):::assets
    PublicAssets(("Public Assets")):::assets

    Textures --> AL
    PublicAssets --> AL

    %% Browser Sandbox
    subgraph "Browser Sandbox"
        direction TB
        AL["Asset Loader Module"]:::frontend
        SG["Scene Graph Manager"]:::frontend
        REN["Renderer"]:::frontend
        CAM["Camera & Controls"]:::frontend
        UI["UI / Input Handler"]:::frontend
        loop(("requestAnimationFrame Loop")):::loop

        AL -->|"texture data"| SG
        SG -->|"scene graph"| REN
        CAM -->|"camera matrices"| REN
        UI -->|"user input events"| CAM
        loop -->|"render call"| REN
        REN -->|"draw frame"| Browser
    end

    %% Click Events
    click Browser "https://github.com/05sanjaykumar/solar-system-3-js/blob/main/index.html"
    click Vite "https://github.com/05sanjaykumar/solar-system-3-js/blob/main/vite.config.js"
    click AL "https://github.com/05sanjaykumar/solar-system-3-js/blob/main/src/main.js"
    click SG "https://github.com/05sanjaykumar/solar-system-3-js/blob/main/src/main.js"
    click REN "https://github.com/05sanjaykumar/solar-system-3-js/blob/main/src/main.js"
    click CAM "https://github.com/05sanjaykumar/solar-system-3-js/blob/main/src/main.js"
    click UI "https://github.com/05sanjaykumar/solar-system-3-js/blob/main/src/main.js"
    click Textures "https://github.com/05sanjaykumar/solar-system-3-js/tree/main/src/Textures/"
    click PublicAssets "https://github.com/05sanjaykumar/solar-system-3-js/tree/main/public/"
    click ProjectMeta "https://github.com/05sanjaykumar/solar-system-3-js/blob/main/package.json"

    %% Styles
    classDef frontend fill:#cce5ff,stroke:#2b6cb0,color:#2b6cb0
    classDef bundler fill:#ffe0b2,stroke:#fb8c00,color:#e65100
    classDef browser fill:#e8f5e9,stroke:#388e3c,color:#2e7d32,stroke-dasharray: 5 5
    classDef assets fill:#e0f7fa,stroke:#0097a7,color:#006064,shape:cylinder
    classDef loop fill:#f3e5f5,stroke:#8e24aa,color:#6a1b9a,stroke-dasharray: 2 2
    classDef meta fill:#f5f5f5,stroke:#9e9e9e,color:#616161
```
