🌌 My Journey Building Cosmos Explorer

The Spark of Inspiration

I've always been fascinated by space, but I noticed that space education often feels static, like a history lesson. Meanwhile, real space exploration is happening right now! Rockets are launching, rovers are exploring other worlds, and new discoveries are made every day.

My goal was simple: build a platform that makes learning about space as dynamic and exciting as space exploration itself. I wanted to connect everyone—students, teachers, and enthusiasts—directly to the action, using real-time data and the power of AI to bring the cosmos to life.

What I Learned

This project was a deep dive into modern web development. I learned how to:

  • Wrangle Live Data: I integrated multiple, complex APIs from NASA, NOAA, and other space agencies. It taught me how to handle data that's constantly changing and sometimes unpredictable.
  • Build with AI: I didn't just use an AI, I learned how to teach it. Crafting the right personality and knowledge base for Luna, our AI guide, was a fun challenge in prompt engineering.
  • Design for Experience: I focused on creating an interface that was clean, intuitive, and could make complex topics like orbital mechanics easy to understand and explore.

How I Built It

I started with a powerful foundation using Next.js 15 and TypeScript.

  1. Core Structure: First, I laid out the main pages and navigation to ensure the app was easy to use.
  2. Live Data Feeds: Next, I plugged into real-time data sources for rocket launches, space weather, and satellite tracking. This formed the dynamic backbone of the application.
  3. The AI Assistant: The most exciting part was bringing Luna to life. I connected to the OpenRouter API and carefully trained Luna to be a friendly, knowledgeable space tutor.
  4. Interactive Features: Finally, I layered on the fun, interactive elements like the NASA TV live stream, the events calendar.

The Challenges I Overcame

It wasn't all smooth sailing!

  • Data Chaos: My biggest challenge was managing the different data feeds. Each API had its own format and quirks, so creating a unified, reliable experience took a lot of work.
  • Tuning the AI: Getting Luna's personality just right was a process of trial and error. It needed to be smart and accurate, but also fun and encouraging.
  • Keeping it Simple: With so much information, it was a constant challenge to present it in a way that wasn't overwhelming. I focused on clean design and letting users explore at their own pace.

APIs & Data Sources OpenRouter API: Serves as the gateway for accessing AI language models. OpenAI o4-mini: The specific AI model used for real-time educational responses in the Luna AI Assistant. Launch Library 2 API: Provides live, detailed data on upcoming rocket launches from global space agencies. NOAA Space Weather Prediction Center (SWPC) API: Delivers real-time alerts and data on solar activity and geomagnetic storms. NASA APIs: Used for a wide range of official content, including live video streams for NASA TV, imagery, and foundational space science data. Frameworks, Languages & Tools Next.js 15: The core React framework for building the full-stack application. React 19: The JavaScript library for creating the user interface. TypeScript: The language used for writing type-safe, robust code. Tailwind CSS: The utility-first CSS framework for all styling and responsive design. Vercel: The platform used for deploying, hosting, and scaling the application. Git & GitHub: For version control and source code management. Node.js: The JavaScript runtime environment. npm: The package manager for handling project dependencies.

Building Cosmos Explorer has been an incredible adventure. It pushed my skills to the limit and deepened my own passion for space. I hope it inspires others to look up at the stars and wonder. 🚀✨

Built With

  • api
  • nasa
  • nextjs
  • typescipt
Share this project:

Updates