Skip to content

About

An immersive, high-performance 3D Solar System and deep-space cosmic explorer built with React 19, Three.js (React Three Fiber), TypeScript, and Tailwind CSS. Features real-time orbital physics, planetary comparison suite, and procedural deep-space phenomena.

Topics

Resources

Stars

5 stars

Watchers

0 watching

Forks

Repository files navigation

πŸͺ Solar System Explorer

An interactive 3D space exploration experience built for the modern web

React Three.js TypeScript Tailwind CSS Vite Tests License


Explore our solar system and deep space through real-time WebGL rendering, custom GLSL shaders, and procedural astrophysical models β€” all running in your browser.


Live Demo Β· Report Bug Β· Request Feature


πŸ“‹ Table of Contents


πŸ”­ Overview

Solar System Explorer is a high-performance, WebGL-powered space exploration application that lets you orbit planets, compare celestial bodies, and journey into deep space β€” all from your browser window.

The app opens directly into an interactive 3D view of Earth and the Moon, with no loading screens or artificial delays. Every planet features physically-inspired materials with directional sunlight, and the experience extends beyond the solar system into an illustrated Cosmic Atlas with 11 deep-space destinations.

Note: This is an educational visual explorer. Orbital sizes, distances, and timing are illustrative β€” this is not an ephemeris or physical simulation.


✨ Features

Solar System

Feature Description
11 Celestial Bodies Sun, Mercury, Venus, Earth, Moon, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto
Earth Materials Day/night terminator Β· city lights at night Β· specular ocean reflections Β· animated cloud layer Β· Rayleigh atmospheric scattering
Saturn Rings Double-sided textured rings with planet-on-ring and ring-on-planet shadow casting
Free Camera Drag to orbit Β· scroll/pinch to zoom Β· click any planet to fly to it
System Overview Compressed bird's-eye view with selectable planets, orbital paths, and labels
Comparison Suite Side-by-side visual comparison with true astronomical diameter ratios and presets
Guided Tour Automated cinematic tour cycling through major landmarks
Display Settings High / Balanced / Low quality Β· atmosphere/cloud toggles Β· reduced-motion support
Audio & Fullscreen Optional ambient space audio Β· native fullscreen toggle
WebGL Fallback Clearly labelled static fallback UI if WebGL 2 is unavailable

Deep Space β€” Cosmic Atlas

# Destination Type Highlights
01 Milky Way Spiral Galaxy Multi-arm disk Β· central bar/bulge Β· Solar System position marker
02 Black Hole Gravitational Singularity Luminous accretion disk Β· real-time gravitational lensing Β· Einstein ring
03 Messier 13 Globular Cluster Dense spherical star distribution Β· Hercules Cluster
04 Orion Nebula Stellar Nursery Volumetric gas Β· dark dust Β· embedded young Trapezium stars
05 Pulsar Neutron Star Tilted magnetic dipole Β· sweeping radiation beams Β· slowed rotation
06 Crab Nebula Supernova Remnant Expanding filament shell Β· turbulent gas volume
07 Andromeda Neighbour Galaxy Broad stellar disk Β· galactic core Β· dark dust lanes
08 TRAPPIST-1 Exoplanet System 7 planets orbiting an ultracool dwarf Β· imagined surfaces
09 Comet Ice & Dust Rough nucleus Β· coma Β· straight ion tail Β· curved dust tail
10 Solar Frontiers Belt Systems Main Asteroid Belt Β· Kuiper Belt Β· planetary landmarks
11 Wormhole Theoretical Embedding diagram Β· clearly labelled as hypothetical

Atlas Features:

  • Searchable destination browser with category filters (Galaxies & Gravity Β· Life of Stars Β· Worlds & Frontiers Β· Theoretical)
  • Interactive field notes with model limitations and NASA source references for every scene
  • Three camera perspectives (Home / Above / Edge) with zoom, reset, and pause controls
  • Adaptive quality budgets that cap shader iterations and render resolution on high-DPI screens
  • Lazy-loaded chapter β€” mounts one renderer at a time; returning restores your previous state

πŸ› οΈ Tech Stack

Layer Technologies
Frontend React 19 Β· TypeScript 6 Β· Tailwind CSS 4
3D Engine Three.js r185 Β· React Three Fiber Β· React Three Drei
Shaders Custom GLSL (volumetrics Β· raymarching Β· gravitational lensing Β· atmospheric scattering)
State Zustand Β· React hooks
Animation Framer Motion Β· requestAnimationFrame with delta-time
Build Vite 8 Β· code-split lazy loading
Testing Vitest 5 Β· Testing Library Β· Node test runner
Linting Oxlint

πŸš€ Getting Started

Prerequisites

  • Node.js ^22.22.2 or ^24.15.0 or >=26.0.0
  • npm >=10.0.0

Installation

# Clone the repository
git clone https://github.com/rakeshkumar0804/Solar-System-Explorer.git

# Navigate to the project directory
cd Solar-System-Explorer

# Install dependencies
npm ci

# Start the development server
npm run dev

Open http://localhost:5173 in your browser. Planetary textures are bundled locally β€” no external CDN required.

Production Build

# Type-check and build for production
npm run build

# Preview the production build locally
npm run preview

⌨️ Keyboard Shortcuts

Key Action
Space Pause / resume animation
← β†’ Previous / next world or destination
1–8 Direct select Mercury through Neptune
0 Select Sun
9 Select Pluto
C Open comparison suite
O System overview
R Reset camera
Esc Close dialog / stop tour

Form fields and buttons retain their native keyboard behavior.


πŸ“ Project Architecture

Solar-System-Explorer/
β”œβ”€β”€ public/
β”‚   └── textures/                    # 27 locally bundled planet maps & thumbnails
β”‚       β”œβ”€β”€ earth.jpg                # Diffuse Β· night Β· clouds Β· normal Β· specular
β”‚       β”œβ”€β”€ saturn-rings.png         # Translucent ring texture
β”‚       └── thumbs/                  # Optimized WebP previews
β”‚
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ App.tsx                      # Chapter router with lazy loading
β”‚   β”œβ”€β”€ main.tsx                     # Entry point
β”‚   β”‚
β”‚   β”œβ”€β”€ explorer/                    # ── Core Solar System ──────────────────
β”‚   β”‚   β”œβ”€β”€ SolarExplorer.tsx        # Main UI Β· navigation Β· settings Β· audio
β”‚   β”‚   β”œβ”€β”€ SolarScene.tsx           # R3F Canvas Β· lighting Β· camera Β· stars
β”‚   β”‚   β”œβ”€β”€ Planet.tsx               # Planet meshes Β· texture loading Β· materials
β”‚   β”‚   β”œβ”€β”€ Dialogs.tsx              # Comparison modal Β· info drawer Β· credits
β”‚   β”‚   β”œβ”€β”€ shaders.ts              # Earth day/night Β· atmosphere Β· ring GLSL
β”‚   β”‚   β”œβ”€β”€ catalog.ts              # Planet data Β· presentation Β· tour order
β”‚   β”‚   β”œβ”€β”€ math.ts                 # Scale factors Β· animation helpers
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ deep/                    # ── Cosmic Atlas (Deep Space) ─────────
β”‚   β”‚   β”‚   β”œβ”€β”€ DeepSpaceExplorer.tsx  # Atlas UI Β· destination strip Β· search
β”‚   β”‚   β”‚   β”œβ”€β”€ DeepScene.tsx          # Core 3 scenes (galaxy Β· hole Β· cluster)
β”‚   β”‚   β”‚   β”œβ”€β”€ ExpandedScenes.tsx     # 8 expansion scenes
β”‚   β”‚   β”‚   β”œβ”€β”€ catalog.ts            # 11 destinations Β· quality budgets
β”‚   β”‚   β”‚   β”œβ”€β”€ shaders.ts            # Galaxy Β· black hole Β· cluster GLSL
β”‚   β”‚   β”‚   β”œβ”€β”€ expandedShaders.ts     # Nebula Β· pulsar Β· comet Β· wormhole GLSL
β”‚   β”‚   β”‚   β”œβ”€β”€ particles.ts          # Point-cloud generators
β”‚   β”‚   β”‚   └── deep.css              # Deep Space styling
β”‚   β”‚   β”‚
β”‚   β”‚   └── __tests__/               # ── Test Suites ──────────────────────
β”‚   β”‚       β”œβ”€β”€ app.test.tsx           # 12 explorer interaction tests
β”‚   β”‚       β”œβ”€β”€ deep.test.tsx          # 19 deep space boundary tests
β”‚   β”‚       └── math.test.ts          # 8 numerical precision tests
β”‚   β”‚
β”‚   β”œβ”€β”€ components/                  # Legacy 3D components (retained for reference)
β”‚   β”œβ”€β”€ data/                        # Planet data Β· themes Β· spacecraft catalog
β”‚   β”œβ”€β”€ types/                       # TypeScript type definitions
β”‚   └── utils/                       # Audio Β· WebGL detection Β· comparison math
β”‚
β”œβ”€β”€ verification/                    # 13 model & shader verification screenshots
β”œβ”€β”€ ASSET-CREDITS.md                 # Full NASA/USGS texture attribution
β”œβ”€β”€ DEEP_SPACE_REVIEW.md            # Atlas audit & remaining checks
β”œβ”€β”€ LOCAL_REVIEW.md                  # Solar explorer verification records
└── UPDATE-INSTRUCTIONS.md          # Patch application guide

πŸ§ͺ Testing & Quality

# Run all tests (legacy Node runner + Vitest)
npm test

# Run linter
npm run lint

# Type-check + production build
npm run build

Test Coverage

Suite Tests Focus
comparison.test.ts 11 Diameter ratios Β· string encoding Β· WebGL state contracts
math.test.ts 8 Scale factors Β· coordinate transforms Β· ratio bounds
app.test.tsx 12 Direct mount Β· world selection Β· comparison presets Β· speed controls Β· dialog focus
deep.test.tsx 19 All 11 scene transitions Β· atlas search Β· geometry bounds Β· ray budget caps
Total 50 All passing βœ…

πŸ“„ Attribution

All planetary textures and NASA mission data references are documented in ASSET-CREDITS.md. Visual models and deep-space shaders are illustrative educational models β€” not research-grade simulations.

Third-party imagery retains its respective NASA / USGS / public domain licensing.


Built with ❀️ by Rakesh Kumar

⭐ Star this repo if you found it interesting!

About

An immersive, high-performance 3D Solar System and deep-space cosmic explorer built with React 19, Three.js (React Three Fiber), TypeScript, and Tailwind CSS. Features real-time orbital physics, planetary comparison suite, and procedural deep-space phenomena.

Topics

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages