Interactive 3D Space Situational Awareness & Keplerian Orbital Explorer
AstroDex is an interactive 3D space situational awareness (SSA) dashboard and mission control simulator. Powered by Next.js 16, React Three Fiber, and custom GLSL shaders, AstroDex renders 600+ instanced asteroids and orbital debris items on real-time Keplerian trajectories around a cinematic Earth.
- π Cinematic Earth Shaders: Custom GLSL shaders blending day/night textures, city light glow, specular ocean reflections, procedural clouds, and Rayleigh atmospheric scattering.
- π°οΈ Keplerian Orbital Engine: Analytical orbit solver in
src/lib/kepler.tssolving Kepler's Equation ($M = E - e \sin E$ ) via Newton-Raphson and calculating per-frame Vis-Viva velocities ($v = \sqrt{\mu (2/r - 1/a)}$ ). - βοΈ 600+ Instanced Space Objects: 400 natural rocky asteroids ($e \in [0, 0.28)$) and 200 artificial debris items rendered in 2 GPU draw calls using React Three Fiber
<InstancedMesh>. β οΈ Real-Time Conjunction Alerting: Continuous 3D proximity screening detecting near-Earth object approaches, triggering flashing threat indicators, sidebar alerts, and monospaced terminal logs.- π LEO Orbital Decay & Re-Boost: Realistic atmospheric drag simulation continuously decaying ISS altitude; interactive Delta-V boost burn maneuver to restore stable orbit.
- ποΈ Manual Trajectory Planner: Real-time 3D orbit manipulation adjusting Altitude, Inclination, RAAN, and Eccentricity parameters.
- π» Agent Terminal: Monospaced telemetry log dock auto-recording sensor sweeps, conjunction screenings, and burn maneuvers.
- βΏ Accessible Mission Control HUD: Keyboard navigation, screen-reader support, focus traps, and reduced-motion toggles.
| Layer | Technology | Purpose |
|---|---|---|
| Framework | Next.js 16 (App Router) | Client/Server rendering, routing, and dynamic imports |
| UI Library | React 19 | Component architecture & state hooks |
| 3D Rendering | Three.js (r184) | WebGL scene graph & shaders |
| React β 3D | React Three Fiber (v9) | Declarative 3D canvas management |
| 3D Helpers | @react-three/drei (v10) | Starfield background & instanced mesh utilities |
| Post-Processing | @react-three/postprocessing (v3) | Selective Bloom and Vignette effects |
| Shaders | Custom GLSL | Earth day/night, cloud layer, and scattering shaders |
| Language | TypeScript 5 | Type safety and strict mode validation |
| Styling | Tailwind CSS v4 | Glassmorphic HUD overlay system |
| Testing | Vitest & React Testing Library | Unit and component testing |
- Node.js:
v18.0.0or higher - npm:
v9.0.0or higher
-
Clone the repository:
git clone https://github.com/Omnikon-Org/Astrodex.git cd Astrodex -
Install dependencies:
npm install
-
Launch the development server:
npm run dev
-
Open http://localhost:3000 in your browser.
Note
Upon first launch, WebGL shader compilation and procedural texture generation take 1β2 seconds to complete.
Tip
Hardware acceleration enabled in a Chromium-based browser (Chrome, Edge, Brave) is recommended for optimal 60 FPS rendering.
| Command | Action |
|---|---|
npm run dev |
Start development server with hot-reload at http://localhost:3000 |
npm run build |
Build optimized Next.js production bundle |
npm run start |
Serve built production app locally |
npm run typecheck |
Run TypeScript type checks (tsc --noEmit) |
npm run test |
Run Vitest unit tests |
npm run analyze |
Analyze production bundle sizes |
npm run format |
Format code using Prettier |
AstroDex separates state management from WebGL rendering to preserve 60 FPS performance:
AppProvider (src/lib/store.tsx)
βββ Home (src/app/page.tsx)
βββ Scene (dynamic, ssr: false)
β βββ R3F Canvas
β βββ SceneContent
β βββ Earth, CloudLayer, Atmosphere (GLSL)
β βββ SatelliteSystem (ISS, Envisat, Hubble)
β βββ AsteroidField (Dual InstancedMeshes)
β βββ Effects (Bloom, Vignette)
βββ Mission Control HUD
βββ Header & SimStatusBadge
βββ LeftSidebar (Catalog filter, search, conjunction feed)
βββ RightSidebar (Trajectory planner, LEO decay monitor)
βββ AgentTerminal (Telemetry log dock)
βββ AsteroidCard (Target inspector)
For full technical specifications, shader derivations, and Keplerian physics models, refer to ARCHITECTURE.md.
Astrodex/
βββ docs/ # Screenshots and technical guides
βββ public/ # Static icons and assets
βββ src/
β βββ app/ # Next.js App Router pages and CSS
β βββ components/ # HUD overlays and 3D WebGL components
β β βββ earth/ # GLSL Earth, clouds, atmosphere, and procedural textures
β β βββ ui/ # Reusable UI controls and dialogs
β βββ hooks/ # Custom React hooks
β βββ lib/ # Keplerian mechanics, store, and types
β βββ types/ # Global TypeScript definitions
βββ tests/ # Integration and E2E tests
βββ ARCHITECTURE.md # In-depth architectural guide
βββ CONTRIBUTING.md # Contribution guidelines
βββ LICENSE # MIT License
βββ package.json # Dependencies and npm scripts
Made with β€οΈ by the AstroDex contributors
