Skip to content

React full stack web application that showcases NASA's space data through modern web technologies.

Notifications You must be signed in to change notification settings

TonyCasey/nasa-explorer

Repository files navigation

NASA Space Explorer πŸš€

codecov

Version 2.1.4 - UI Improvements & Enhanced Readability Release

A full-stack web application that showcases NASA's space data through modern web technologies. This interactive platform provides access to stunning space imagery, Mars rover photos, Near Earth Object tracking, and more.

🌟 Features

Core Features

  • Space Mission Control Dashboard - Clean, space-themed interface with real-time data widgets
  • Astronomy Picture of the Day (APOD) - Daily featured space images with calendar navigation
  • Mars Rover Photo Gallery - Explore photos from Curiosity, Opportunity, Spirit, and Perseverance with advanced filters
  • Near Earth Objects (NEO) Tracker - Real-time asteroid tracking with interactive data visualizations

Advanced Features (v2.1.0)

  • Infinite Scroll - Seamless browsing experience in Mars Rover gallery
  • Favorites System - Save and organize your favorite space discoveries with persistent storage
  • Interactive Data Visualizations - Advanced charts for NEO data using Recharts
    • Hazard classification pie charts
    • Size distribution bar charts
    • Velocity distribution line graphs
    • Size vs Distance scatter plots
  • Smart Navigation - Favorites counter badge and dedicated favorites page
  • Comprehensive Logging - Daily rotating log files with configurable levels
  • Version Tracking - Automatic version management across frontend and backend

UI/UX Improvements (v2.1.4)

  • Horizontal Filter Layouts - Moved all filter components from sidebars to horizontal layouts for better space utilization
  • Enhanced Readability - Improved font colors and contrast ratios across all components
  • Custom Color System - Professional color palette for risk assessment:
    • Low Risk: #076041 (Dark Forest Green)
    • Medium Risk: #a6841b (Dark Gold)
    • High Risk: #851313 (Dark Burgundy Red)
  • White Background Overlays - Semi-transparent white backgrounds for better content readability
  • Responsive Design - Optimized layouts for mobile and desktop viewing
  • Accessibility Improvements - Better contrast ratios and ARIA attributes

Technical Highlights

  • Modern React 18+ with TypeScript
  • Express.js backend with NASA API integration
  • Responsive design with Tailwind CSS and space-themed UI
  • Real-time data caching and optimization
  • Performance-focused architecture with lazy loading
  • Intersection Observer API for infinite scroll
  • Local storage for favorites persistence

πŸ› οΈ Tech Stack

Frontend

  • React 18+ with TypeScript
  • Tailwind CSS for styling
  • React Query for data fetching and caching
  • Recharts for data visualization
  • React Router v6 for navigation
  • React Intersection Observer for infinite scroll
  • Axios with interceptors for API calls

Backend

  • Node.js with Express
  • TypeScript
  • NASA Open APIs integration
  • Winston for logging with daily rotation
  • Helmet.js for security
  • CORS with proper configuration
  • Compression and caching strategies
  • Environment-based configuration

πŸš€ Quick Start

Prerequisites

Installation

  1. Clone the repository:
git clone https://github.com/TonyCasey/nasa-explorer.git
cd nasa-explorer
  1. Install all dependencies:
npm run install:all
  1. Set up environment variables:
# Backend (.env in backend folder)
cp backend/.env.example backend/.env
# Edit backend/.env and add your NASA API key

# Frontend (.env in frontend folder)
cp frontend/.env.example frontend/.env
# Edit frontend/.env if needed
  1. Start the development servers:
# Terminal 1 - Start backend
cd backend
npm run dev

# Terminal 2 - Start frontend
cd frontend
npm start

The application will be available at:

πŸ“ Project Structure

nasa-space-explorer/
β”œβ”€β”€ frontend/               # React TypeScript application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/    # Reusable UI components
β”‚   β”‚   β”‚   β”œβ”€β”€ Navigation.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ PhotoGallery.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ NEOChart.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ FavoriteButton.tsx
β”‚   β”‚   β”‚   └── ...
β”‚   β”‚   β”œβ”€β”€ pages/        # Page components
β”‚   β”‚   β”‚   β”œβ”€β”€ Dashboard.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ APOD.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ MarsRovers.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ NEOTracker.tsx
β”‚   β”‚   β”‚   └── Favorites.tsx
β”‚   β”‚   β”œβ”€β”€ services/     # API service layer
β”‚   β”‚   β”‚   β”œβ”€β”€ api.ts
β”‚   β”‚   β”‚   β”œβ”€β”€ nasa.service.ts
β”‚   β”‚   β”‚   └── favorites.service.ts
β”‚   β”‚   β”œβ”€β”€ hooks/        # Custom React hooks
β”‚   β”‚   β”‚   └── useFavorites.ts
β”‚   β”‚   β”œβ”€β”€ types/        # TypeScript type definitions
β”‚   β”‚   └── utils/        # Utility functions
β”‚   β”‚       β”œβ”€β”€ logger.ts
β”‚   β”‚       └── version.ts
β”‚   └── public/           # Static assets
β”œβ”€β”€ backend/              # Express API server
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ routes/      # API route handlers
β”‚   β”‚   β”œβ”€β”€ services/    # Business logic and NASA API integration
β”‚   β”‚   β”œβ”€β”€ middleware/  # Express middleware
β”‚   β”‚   └── utils/       # Helper functions
β”‚   β”‚       β”œβ”€β”€ logger.ts
β”‚   β”‚       └── version.ts
β”‚   └── dist/            # Compiled JavaScript
β”œβ”€β”€ shared/              # Shared types and utilities
β”œβ”€β”€ scripts/             # Build and utility scripts
β”‚   β”œβ”€β”€ version.js      # Version management
β”‚   └── update-version.js # Version sync script
β”œβ”€β”€ logs/               # Application logs (auto-generated)
└── docs/               # Project documentation
    β”œβ”€β”€ TODO.md         # Project roadmap and tasks
    └── CLAUDE.md       # AI assistant instructions

πŸ“‘ API Documentation

Base URL

http://localhost:5000/api/v1

Core Endpoints

Astronomy Picture of the Day

GET /api/v1/apod
GET /api/v1/apod?date=YYYY-MM-DD

Mars Rover Photos

GET /api/v1/mars-rovers/photos
Query params:
  - rover: curiosity | opportunity | spirit | perseverance
  - sol: Mars day (integer)
  - earth_date: YYYY-MM-DD
  - camera: FHAZ | RHAZ | MAST | CHEMCAM | etc.
  - page: Page number for pagination

Near Earth Objects

GET /api/v1/neo/feed
Query params:
  - start_date: YYYY-MM-DD
  - end_date: YYYY-MM-DD

Health Check

GET /api/v1/health

πŸ§ͺ Development

Available Scripts

Root Level

npm run version:sync    # Sync version across all packages
npm run version:bump    # Bump version number
npm run install:all     # Install all dependencies

Frontend

npm start               # Start development server
npm run build          # Build for production
npm test               # Run tests
npm run lint           # Run ESLint
npm run type-check     # TypeScript type checking

Backend

npm run dev            # Start development server with hot reload
npm run build          # Compile TypeScript
npm start              # Start production server
npm run lint           # Run ESLint
npm test               # Run tests

πŸ“Š Performance Targets

  • Lighthouse Score: > 90
  • Core Web Vitals:
    • LCP: < 2.5s
    • FID: < 100ms
    • CLS: < 0.1
  • Bundle size: < 500KB (gzipped)
  • API response time: < 500ms (cached)

🎯 Project Status

Completed βœ…

  • Week 1 (Days 1-7)

    • Project setup and foundation
    • NASA API integration
    • Core UI components
    • Space Mission Control Dashboard
    • APOD Gallery with calendar
    • Mars Rover photo gallery
    • NEO Tracker with basic visualization
    • Comprehensive logging system
  • Week 2 (Days 8-10)

    • Infinite scroll implementation
    • Favorites/bookmark system
    • Advanced data visualization charts
    • Version management system

In Progress 🚧

  • Search and filter capabilities enhancement
  • Social media sharing functionality
  • Earth imagery (EPIC) feature
  • Space Weather dashboard

Planned πŸ“‹

  • Unit tests (>80% coverage)
  • E2E tests with Playwright
  • PWA configuration
  • AI-powered features
  • Performance optimizations
  • Production deployment

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ License

This project is built for educational purposes as part of the Bounce Insights coding challenge.

πŸ™ Acknowledgments

  • NASA Open APIs for providing amazing space data
  • The open-source community for the amazing tools and libraries
  • All contributors and testers

Built with passion for space exploration and modern web technologies 🌌

Latest Build: v2.1.4 - August 17, 2025

πŸ“ˆ Recent Updates (v2.1.4)

UI Improvements Session - August 17, 2025

  • βœ… Layout Optimization - Converted all filter sidebars to horizontal layouts
  • βœ… Readability Enhancement - Improved font colors and contrast across NEO cards
  • βœ… Custom Color System - Implemented professional risk assessment colors
  • βœ… Spacing Improvements - Added proper padding to image cards
  • βœ… Version Display Fix - Corrected footer build number display
  • βœ… Accessibility - Enhanced contrast ratios and ARIA attributes
  • βœ… Production Deployment - All changes live on Vercel and Heroku

Live URLs:

Code Coverage

About

React full stack web application that showcases NASA's space data through modern web technologies.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •