██████╗ ██████╗ ███████╗███╗ ███╗ ██████╗ ███████╗██╗ ██╗
██╔════╝██╔═══██╗██╔════╝████╗ ████║██╔═══██╗██╔════╝╚██╗██╔╝
██║ ██║ ██║███████╗██╔████╔██║██║ ██║███████╗ ╚███╔╝
██║ ██║ ██║╚════██║██║╚██╔╝██║██║ ██║╚════██║ ██╔██╗
╚██████╗╚██████╔╝███████║██║ ╚═╝ ██║╚██████╔╝███████║██╔╝ ██╗
╚═════╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝
EXPLORE THE PAST · VISUALIZE THE PRESENT · SIMULATE THE FUTURE
An immersive 3D space exploration platform powered by real orbital mechanics, AI scenario analysis, and live space news.
Hero landing page — full-bleed Earth + galaxy backdrop with the COSMOSX wordmark
Default simulator view — real-time 3D solar system with all 8 planets in accurate orbital positions
Asteroid Strikes scenario — Groq AI breakdown rendered live in the right panel alongside the 3D impact
10× Speed selected — animated floating description with the "LEARN MORE ›" deep-dive trigger
Space News feed — latest articles from SpaceflightNewsAPI with year filter (2011–Latest)
CosmosX is a full-stack Next.js 15 web app that turns space exploration into an interactive experience. A live 3D solar system greets you on arrival, rendered with 6,000+ stars and real Keplerian orbital dynamics. From there you can step through the history of space exploration, browse live mission news, simulate "what if" cosmic scenarios with an AI engine, and discover your cosmic crew role — all without leaving the browser.
The AI scenario engine uses Groq (LLaMA 3.1-8b-instant) to analyze user-defined hypotheticals and returns structured scientific breakdowns. Text-to-speech narration is optionally powered by Deepgram so every analysis can be read aloud. Space news is pulled in real time from the public SpaceflightNewsAPI — no API key required.
A real-time WebGL universe built with Three.js and React Three Fiber. Six thousand stars twinkle in the background while all eight planets trace accurate elliptical orbits. The home page hero runs an animated solar system on a looping video backdrop — GPU instancing keeps it smooth even on mid-range hardware.
Type any "what if" about the cosmos — What if Jupiter disappeared? What if Earth had two moons? What if the Sun were twice as massive? — and the Groq-powered engine returns a structured breakdown: scientific explanation, physical impacts, a cascading timeline of effects, and a survivability rating. Three pre-built scenarios let you jump in immediately. Optional Deepgram text-to-speech narrates the full analysis on demand.
An interactive chronological record of humanity's greatest space milestones — from Sputnik (1957) through Apollo 11, Voyager, Hubble, the ISS, James Webb, Chandrayaan-3, and a projected Mars colony (2050). Each entry expands to show mission facts and a full description in an alternating left-right layout.
Aggregated articles from SpaceflightNewsAPI in an animated card grid. Filter by year from 2010 through the latest — every card shows the headline, summary, image, and a direct link to the source.
Four fictional crew members with detailed dossiers, security clearances, and sci-fi bios. A 3-question role-finder quiz — drawing on live Earth–Mars and Earth–Jupiter distance data calculated from real orbital elements — assigns you one of three roles: Quantum Propulsion Engineer, Deep Space Cartographer, or Astrobiologist.
| Role | What it means |
|---|---|
| Quantum Propulsion Engineer | You think in systems and love pushing boundaries |
| Deep Space Cartographer | You chart the unknown and thrive on discovery |
| Astrobiologist | You search for life and ask the biggest questions |
A sci-fi themed contact form that animates an "uplink" progress bar on submission and responds with mission-control flavor text.
Prerequisites: Node.js 18+ · A free Groq API key (for the simulator) · Optional Deepgram key (for narration)
git clone (https://github.com/aruu28249-boop/cosmosx-.git)
cd cosmosx-npm installcp .env.example .env.localFill in .env.local:
GROQ_API_KEY=gsk_...your_key_here
DEEPGRAM_API_KEY=...your_key_here # optional — narration onlyGet a free Groq key at console.groq.com/keys — the free tier is more than enough for personal use. Space news works without any key (public API).
Without a Groq key, the simulator still plays 3D visuals but the AI analysis panel shows a "not configured" message.
npm run dev
# → http://localhost:3000Most space apps give you static images and Wikipedia paragraphs. CosmosX is the only platform that combines a real-time 3D universe, AI-powered "what if" simulation, live mission news, and real orbital mechanics — all in a single browser tab, for free.
| Feature | CosmosX | NASA Eyes on the Solar System | SpaceEngine | Universe Sandbox | Star Walk 2 |
|---|---|---|---|---|---|
| Runs in the browser | ✅ | ✅ | ❌ Desktop only | ❌ Desktop only | ❌ Mobile only |
| Real-time 3D solar system | ✅ | ✅ | ✅ | ✅ | ✅ |
| AI "what if" scenario engine | ✅ | ❌ | ❌ | ❌ | ❌ |
| Text-to-speech narration | ✅ | ❌ | ❌ | ❌ | ❌ |
| Live space news feed | ✅ | ❌ | ❌ | ❌ | ❌ |
| Historical mission timeline | ✅ | ✅ | ❌ | ❌ | ❌ |
| Real Keplerian orbital mechanics | ✅ | ✅ | ✅ | ✅ | ❌ |
| Role-finder quiz | ✅ | ❌ | ❌ | ❌ | ❌ |
| Free & open source | ✅ | ✅ | ❌ Paid | ❌ Paid | ❌ Paid |
| No install required | ✅ | ✅ | ❌ | ❌ | ❌ |
The key gap CosmosX fills: interactive AI reasoning about space. No existing tool lets you ask "what if the asteroid belt disappeared?" and get a structured scientific analysis with a survivability rating in seconds. That's the core bet — curiosity-driven exploration, not just passive observation.
Live planetary distances shown in the quiz are not hardcoded. lib/orbital-mechanics.js computes each planet's current ecliptic longitude using the J2000.0 epoch and mean orbital elements (semi-major axis, eccentricity, mean anomaly, inclination), then derives the Earth–planet distance in AU via the law of cosines. The result updates on every quiz load.
CosmosX is a Next.js 15 app — Vercel deploys it in one step with zero config.
git push origin main- Go to vercel.com → Add New → Project → import your repo
- Vercel auto-detects Next.js — no build configuration needed
- Add environment variables in the Vercel dashboard:
| Variable | Value |
|---|---|
GROQ_API_KEY |
Your Groq API key |
DEEPGRAM_API_KEY |
Your Deepgram API key (optional) |
- Click Deploy — live in ~60 seconds
The Vercel free tier handles CosmosX comfortably. The Groq free tier supports thousands of scenario analyses per day.
- Real-time 3D solar system with accurate Keplerian orbital mechanics
- AI "what if" scenario engine (Groq / LLaMA 3.1) with structured analysis
- Time controls — pause, 1×, 10×, 100× speed with per-mode deep-dive modals
- Time Machine — jump to any date and watch planets reposition in real time
- Planet surface explorer — click any planet to orbit it up close
- Live space news feed with year filter (2011 – Latest)
- Historical mission timeline (Sputnik 1957 → Mars colony 2050)
- Crew registry, dossiers, and role-finder quiz with live orbital data
- Text-to-speech narration for AI scenario analysis (Deepgram)
- Shooting stars, asteroid belt, rogue planet, and scenario visual effects
- Shareable scenario cards — export AI analysis as a styled PNG
- Voice input for scenario prompts (Web Speech API)
- Mobile-optimised 3D with adaptive quality based on device GPU tier
- Webb telescope image gallery with NASA APOD integration
- Timeline deep-dive — expand each mission with crew bios, launch video, instrument breakdowns, and an interactive mission-path overlay on the solar system
- Gamified simulator — score points for predicting scenario outcomes, unlock harder "what ifs", leaderboard across users
- Planet surface mode — actual textured terrain to walk across: craters, canyons, atmosphere layers, day/night cycle per planet
- Beyond the solar system — zoom out to the Milky Way, visit nearby star systems, explore nebulae and black holes
- Sandbox / God mode — freeform universe editor: spawn aliens, ice comets, meteor showers, rogue stars, custom planets; run collisions, chain reactions, and watch the physics play out
- Exoplanet explorer — filter Kepler/TESS discoveries by habitability zone
- Multiplayer crew mode — share a quiz or sandbox session with friends in real time
MIT License — see LICENSE for details.
- AI analysis by Groq running LLaMA 3.1 (llama-3.1-8b-instant)
- Text-to-speech by Deepgram (aura-2-pluto-en)
- Space news from SpaceflightNewsAPI
- 3D powered by Three.js, React Three Fiber, and Drei
- Icons by Lucide
- Animations by Framer Motion
- Fonts: Cormorant Garamond, Plus Jakarta Sans