Explore the cosmos with NASA's real data through an immersive, AI-enhanced, interactive space exploration experience.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Full Stack Architecture โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ React Frontend โ โ
โ โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ โ
โ โ โ APODCard โ โ MarsRover โ โ NeoChart โ โ โ
โ โ โ Gallery โ โ Gallery โ โ Dashboard โ โ โ
โ โ โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโ โ โ
โ โ โ โ โ โ โ
โ โ โโโโโโโโผโโโโโโโ โโโโโโโโผโโโโโโโ โโโโโโโโผโโโโโโโ โ โ
โ โ โ AIInsights โ โ useNasaData โ โ api.js โ โ โ
โ โ โ Component โ โ Hook โ โ Service โ โ โ
โ โ โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโ โ โ
โ โ โ โ โ โ โ
โ โ โโโโโโโโผโโโโโโโ โโโโโโโโผโโโโโโโ โโโโโโโโผโโโโโโโ โ โ
โ โ โ AIService โ โ soundManagerโ โ aiService โ โ โ
โ โ โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ โ โ
โ โผ โผ โผ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Express Backend โ โ
โ โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ โ
โ โ โ APODRoutes โ โ MarsRoutes โ โ NeoRoutes โ โ โ
โ โ โ /api/apod โ โ /api/mars โ โ /api/neo โ โ โ
โ โ โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโ โ โ
โ โ โ โ โ โ โ
โ โ โโโโโโโโผโโโโโโโ โโโโโโโโผโโโโโโโ โโโโโโโโผโโโโโโโ โ โ
โ โ โAPODControllerโ โMarsControllerโ โ NeoControllerโ โ
โ โ โ โ โ โ โ โ โ โ
โ โ โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโ โ โ
โ โ โ โ โ โ โ
โ โ โโโโโโโโผโโโโโโโ โโโโโโโโผโโโโโโโ โโโโโโโโผโโโโโโโ โ โ
โ โ โ NasaService โ โ NasaService โ โ NasaService โ โ โ
โ โ โ (APOD API) โ โ (Mars API) โ โ (NEO API) โ โ โ
โ โ โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโ โ โ
โ โโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ External APIs โ โ
โ โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ โ
โ โ โ NASA API โ โ Hugging Faceโ โ Other โ โ โ
โ โ โ - APOD โ โ AI โ โ Services โ โ โ
โ โ โ - Mars โ โ Models โ โ โ โ โ
โ โ โ - NEO โ โ โ โ โ โ โ
โ โ โ - Library โ โ โ โ โ โ โ
โ โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Data Flow โ
โ โ
โ User Interaction โ
โ โ โ
โ โผ โ
โ โโโโโโโโโโโโโโโ HTTP Request โโโโโโโโโโโโโโโ โ
โ โ React โ โโโโโโโโโโโโโโโโโโโบ โ Express โ โ
โ โ Components โ โ Backend โ โ
โ โ โ โโโโโโโโโโโโโโโโโโโ โ โ โ
โ โโโโโโโโโโโโโโโ JSON Response โโโโโโโโฌโโโโโโโ โ
โ โ โ โ
โ โ โผ โ
โ โ โโโโโโโโโโโโโโโ โ
โ โ โ NASA API โ โ
โ โ โ Integration โ โ
โ โ โโโโโโโโฌโโโโโโโ โ
โ โ โ โ
โ โ โผ โ
โ โ โโโโโโโโโโโโโโโ โ
โ โ โ AI Models โ โ
โ โ โ (Hugging โ โ
โ โ โ Face) โ โ
โ โ โโโโโโโโฌโโโโโโโ โ
โ โ โ โ
โ โผ โผ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โ โ Enhanced โ โโโโโโโโโโโโโโโโโโ Processed โ โ
โ โ UI with โ โ Data โ โ
โ โ AI Insights โ โ โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- ๐ Frontend Application: [Your Deployed Frontend URL]
- โก Backend API: [Your Deployed Backend URL]
- ๐ API Health Check: [Your Backend URL]/health
- ๐๏ธ System Architecture
- โจ Features
- ๐ ๏ธ Tech Stack
- ๐ฏ Prerequisites
- โก Quick Start
- ๐ Project Structure
- ๐ง Configuration
- ๐ API Endpoints
- ๐ค AI Features
- ๐จ UI/UX Features
- ๐ฑ Screenshots
- ๐งช Testing
- ๐ Deployment
- ๐ค Contributing
- ๐ License
- ๐ผ๏ธ Astronomy Picture of the Day (APOD): Daily space imagery with detailed explanations
- ๐ Mars Rover Gallery: Browse thousands of photos from NASA's Mars missions
- โ๏ธ Near Earth Objects (NEO) Tracker: Monitor asteroids and comets approaching Earth
- ๐ NASA Library Search: Search through NASA's vast media collection
- ๐ง Intelligent Image Analysis: AI-powered image description and analysis
- ๐ Content Summarization: Automatic text summarization of complex explanations
- ๐ญ Sentiment Analysis: Emotional tone analysis of NASA content
- ๐ฌ AI Space Assistant: Interactive chatbot with space knowledge
- ๐ Reading Complexity Analysis: Content difficulty assessment
- ๐ก Smart Astronomy Tips: Context-aware educational suggestions
- ๐ต Immersive Sound Effects: Space-themed audio feedback
- โจ Smooth Animations: Framer Motion powered transitions
- ๐ Animated Background: Dynamic starfield with moving particles
- ๐จ Space-Themed Typography: Custom fonts for futuristic feel
- ๐ฑ Responsive Design: Optimized for all device sizes
- ๐ Dark Theme: Space-appropriate dark interface
- โก Performance Optimized: Lazy loading and efficient rendering
- ๐ Security: Rate limiting, CORS protection, input validation
- โก Performance: Caching, lazy loading, optimized API calls
- ๐งช Error Handling: Comprehensive error boundaries and user feedback
- โฟ Accessibility: WCAG compliant with proper ARIA labels
- ๐ Monitoring: Health checks and logging
- โ๏ธ React 18 - Modern React with hooks and functional components
- ๐ฌ Framer Motion - Advanced animations and transitions
- ๐ Howler.js - Web audio for sound effects
- ๐ก Axios - HTTP client for API communication
- ๐จ CSS3 - Advanced styling with custom properties and animations
- ๐ข Node.js - JavaScript runtime environment
- ๐ Express.js - Fast, minimalist web framework
- ๐ Helmet - Security middleware
- ๐ CORS - Cross-origin resource sharing
- ๐ Morgan - HTTP request logger
- โฑ๏ธ Express Rate Limit - API rate limiting
- ๐ค Hugging Face - Free AI models for image analysis and NLP
- ๐ง Custom AI Service - Rule-based conversational AI
- ๐ NASA APIs - Real-time space data integration
- ๐ฆ npm - Package management
- ๐ Concurrently - Run multiple processes
- ๐ง dotenv - Environment variable management
- ๐ฑ React DevTools - Development debugging
Before you begin, ensure you have the following installed:
- Node.js (version 14 or higher) - Download here
- npm or yarn - Comes with Node.js
- Git - Download here
- NASA API Key - Get free key
- Memory: 4GB RAM minimum, 8GB recommended
- Storage: 1GB free space
- Browser: Chrome 90+, Firefox 88+, Safari 14+, Edge 90+
git clone https://github.com/aishikasaha/nasa-react-express-app.git
cd nasa-react-express-app- Visit NASA API Portal
- Click "Get API Key"
- Fill out the form (free and instant)
- Copy your API key
# Backend environment
cat > backend/.env << EOF
PORT=5001
NODE_ENV=development
NASA_API_KEY=your_token
FRONTEND_URL=http://localhost:3000
HF_API_TOKEN=your_token
EOF
# Frontend environment
cat > frontend/.env << EOF
REACT_APP_NASA_API_KEY=your_nasa_api_key
REACT_APP_HF_API_TOKEN=your_hugging_face_token
REACT_APP_API_URL==http://localhost:5001/api
EOF# Install all dependencies (backend + frontend + root)
npm run install-deps
# Or manually:
cd backend && npm install
cd ../frontend && npm install
cd .. && npm install# Start both backend and frontend simultaneously
npm run dev
# Or start manually:
# Terminal 1: npm run server
# Terminal 2: npm run client- Frontend: http://localhost:3000
- Backend API: http://localhost:5001
- Health Check: http://localhost:5001/health
nasa-data-explorer/
โโโ ๐ backend/ # Express.js backend server
โ โโโ ๐ controllers/ # Route handlers
โ โ โโโ ๐ apodController.js # APOD endpoint logic
โ โ โโโ ๐ aiController.js # AI endpoint logic
โ โ โโโ ๐ marsController.js # Mars rover endpoints
โ โ โโโ ๐ neoController.js # Near Earth Objects
โ โโโ ๐ routes/ # API route definitions
โ โ โโโ ๐ apod.js # APOD routes
โ โ โโโ ๐ aiRoutes.js # Ai routes
โ โ โโโ ๐ mars.js # Mars rover routes
โ โ โโโ ๐ neo.js # NEO routes
โ โโโ ๐ services/ # Business logic
โ โ โโโ ๐ nasaService.js # NASA API integration
โ โ โโโ ๐ aiService.js # ai API integration
โ โโโ ๐ tests/ # Test files
โ โ โโโ ๐ controllers/
โ โ โโโ ๐ integration/
โ โ โโโ ๐ services/
โ โ โโโ ๐ setup.js
โ โโโ ๐ utils/ # Utilities
โ โ โโโ ๐ logger.js # Logging system
โ โโโ ๐ server.js # Main server file
โ โโโ ๐ package.json # Backend dependencies
โ โโโ ๐ .env # Backend configuration
โโโ ๐ frontend/ # React frontend application
โ โโโ ๐ public/ # Static assets
โ โ โโโ ๐ index.html # HTML template
โ โ โโโ ๐ favicon.ico # App icon
โ โ โโโ ๐ logo192.png # App icons
โ โ โโโ ๐ logo512.png # App icons
โ โ โโโ ๐ manifest.json # PWA config
โ โ โโโ ๐ robots.txt # SEO config
โ โโโ ๐ src/ # Source code
โ โ โโโ ๐ components/ # React components
โ โ โ โโโ ๐ Dashboard.js # Main navigation
โ โ โ โโโ ๐ APODCard.js # APOD display
โ โ โ โโโ ๐ MarsRoverGallery.js # Mars photos
โ โ โ โโโ ๐ NeoChart.js # NEO visualization
โ โ โ โโโ ๐ AIInsights.js # AI analysis panel
โ โ โ โโโ ๐ AIChat.js # AI chatbot
โ โ โ โโโ ๐ LoadingAnimation.js # Loading states
โ โ โ โโโ ๐ InteractiveButton.js # Custom buttons
โ โ โ โโโ ๐ AnimatedBackground.js # Background effects
โ โ โโโ ๐ hooks/ # Custom React hooks
โ โ โ โโโ ๐ useNasaData.js # Data fetching hooks
โ โ โโโ ๐ services/ # API integration
โ โ โ โโโ ๐ api.js # HTTP client setup
โ โ โ โโโ ๐ aiApi.js # AI api client setup
โ โ โโโ ๐ styles/ # Styling system
โ โ โ โโโ ๐ fonts.css # Typography system
โ โ โโโ ๐ utils/ # Utility functions
โ โ โ โโโ ๐ constants.js # App constants
โ โ โ โโโ ๐ soundManager.js # Audio system
โ โ โโโ ๐ App.js # Root component
โ โ โโโ ๐ App.css # Global styles
โ โ โโโ ๐ index.js # App entry point
โ โโโ ๐ package.json # Frontend dependencies
โ โโโ ๐ package-lock.json # Lock file
โ โโโ ๐ .env # Frontend configuration
โโโ ๐ package.json # Root package management
โโโ ๐ package-lock.json # Root lock file
โโโ ๐ yarn.lock # Yarn lock file
โโโ ๐ README.md # Project documentation
โโโ ๐ vercel.json # Deployment config
โโโ ๐ .gitignore # Git ignore rules
PORT=5001 # Server port
NODE_ENV=development # Environment (development/production)
NASA_API_KEY=your_api_key_here # NASA API key (required)
FRONTEND_URL=http://localhost:3000 # Frontend URL for CORS
HF_API_TOKEN=your_hugging_face_tokenREACT_APP_NASA_API_KEY=your_nasa_api_key
REACT_APP_HF_API_TOKEN=your_hugging_face_token
REACT_APP_API_URL=http://localhost:5001/api # Backend API endpoint- Free Tier: 1,000 requests per hour
- Demo Key: 30 requests per hour (limited)
- Rate Limit: Automatically handled by backend
- Endpoints Used: APOD, Mars Rover Photos, NEO Feed, Image Search
GET /health- Server health checkGET /api/health- API health with NASA key status
GET /api/apod- Today's APODGET /api/apod?date=YYYY-MM-DD- Specific date APODGET /api/apod/random- Random historical APOD
GET /api/mars/photos- Default rover photosGET /api/mars/photos?rover=curiosity&sol=1000&page=1- Filtered photos- Rovers: curiosity, opportunity, spirit, perseverance
GET /api/neo- Next 7 days NEO dataGET /api/neo?start_date=YYYY-MM-DD&end_date=YYYY-MM-DD- Date rangeGET /api/neo/stats- Statistical analysis
GET /api/search?q=galaxy&media_type=image- Search media- Media Types: image, video, audio
{
"success": true,
"data": { /* NASA API response */ },
"timestamp": "2024-01-15T10:30:00.000Z"
}- Model: Salesforce BLIP (Bootstrap Language-Image Pre-training)
- Capability: Automatic image captioning and description
- Usage: Describes astronomical images in natural language
- Summarization: Facebook BART model for content summarization
- Sentiment Analysis: RoBERTa model for emotional tone detection
- Complexity Analysis: Custom algorithm for reading level assessment
- Type: Rule-based conversational AI
- Knowledge Base: Astronomy, space science, planetary science
- Features: Context-aware responses, educational content
- Response Time: 1-3 seconds for AI analysis
- Accuracy: 85-95% for image descriptions
- Languages: English (primary), expandable
/* Space-themed fonts */
--font-heading-primary: 'Orbitron' /* Futuristic headings */
--font-heading-secondary: 'Exo 2' /* Clean sci-fi */
--font-body-primary: 'Rajdhani' /* Readable content */
--font-mono: 'Space Mono' /* Code/data display */
--font-ui: 'Electrolize' /* Interface elements *//* Primary colors */
--space-blue: #00d4ff /* Primary accent */
--cosmic-teal: #4ecdc4 /* Secondary accent */
--mars-red: #ff6b6b /* Warning/error states */
--void-black: #0c0c0c /* Background base */
--star-white: #ffffff /* Text primary */- Page Transitions: Smooth fade and slide effects
- Component Animations: Spring-based physics
- Loading States: Space-themed spinners and progress bars
- Hover Effects: Glow and transform animations
- Sound Integration: Audio feedback for interactions
- Mobile: 320px - 768px
- Tablet: 768px - 1024px
- Desktop: 1024px - 1440px
- Large Desktop: 1440px+
Main dashboard with space-themed interface
Astronomy Picture of the Day with AI insights
Interactive Mars rover photo gallery
AI-powered image analysis and insights
Interactive space assistant chatbot
# Frontend tests
cd frontend && npm test
# Backend tests
cd backend && npm test
# Run all tests
npm run test:all- Frontend: Component testing, hook testing, integration tests
- Backend: API endpoint testing, middleware testing, error handling
- E2E: User journey testing with Cypress (optional)
- APOD loads for current date
- Random APOD generates different content
- Mars rover photos load for different rovers/sols
- NEO data displays with correct statistics
- AI analysis provides meaningful insights
- Error handling works for invalid inputs
- Responsive design works on mobile/tablet
- Sound effects work properly
- All animations are smooth
- Connect to Render:
- Visit render.com
- Sign up with GitHub and connect your repository
- Click "New +" โ "Static Site"
- Configure Frontend:
Name: nasa-react-app-frontend
Root Directory: client
Build Command: npm run build
Publish Directory: build- Environment Variables:
- Add
REACT_APP_API_URLin Render dashboard - Point to your deployed backend URL
- Connect to Render:
- Visit render.com
- Connect your GitHub repository
- Click "New +" โ "Web Service"
- Configure Backend:
Name: nasa-react-app-backend
Root Directory: server
Build Command: npm install
Start Command: npm start- Environment Variables:
NODE_ENV=production
NASA_API_KEY=your_api_key
FRONTEND_URL=https://your-frontend-domain.onrender.com
REACT_APP_HF_API_TOKEN=your_hugging_face_token
PORT=10000- Netlify: Drag & drop deployment
- GitHub Pages: Free static hosting
- AWS S3 + CloudFront: Scalable solution
- Heroku: Easy deployment with git
- DigitalOcean App Platform: Affordable containers
- AWS Elastic Beanstalk: Auto-scaling solution
- HTTPS: Required for NASA API calls
- CORS: Update for production domains
- Rate Limiting: Adjust for production traffic
- Error Monitoring: Implement Sentry or similar
- Performance: Enable gzip compression
- Security: Environment variable management
We welcome contributions! Here's how to get started:
- Fork the repository
- Create feature branch:
git checkout -b feature/amazing-feature - Install dependencies:
npm run install-deps - Start development:
npm run dev
- Frontend: ESLint + Prettier configuration provided
- Backend: Standard Node.js conventions
- Commits: Follow conventional commit format
- Testing: Write tests for new features
- Update documentation for any API changes
- Add tests for new functionality
- Ensure all tests pass:
npm test - Update README if needed
- Create detailed PR description
Include:
- Steps to reproduce
- Expected vs actual behavior
- Browser/Node.js version
- Console errors/logs
- Screenshots (if UI related)
- Use case description
- Proposed implementation
- Alternative solutions considered
- Impact assessment
This project is licensed under the MIT License - see the LICENSE file for details.
- NASA APIs: Public domain (U.S. Government work)
- Google Fonts: SIL Open Font License
- Hugging Face Models: Various open source licenses
- React & Dependencies: MIT License
- ๐ NASA: For providing free access to space data APIs
- ๐ค Hugging Face: For free AI model inference
- ๐จ Google Fonts: For space-themed typography
- ๐ฎ NASA Mission Control: Interface design inspiration
- ๐ฌ Sci-Fi Movies: Visual and audio design elements
- ๐ Space Exploration: The wonder of cosmic discovery
- โ๏ธ React Team: For the excellent frontend framework
- ๐ข Node.js Contributors: For the powerful runtime
- ๐ฌ Framer Motion: For beautiful animations
- ๐ Howler.js: For web audio capabilities
๐ Built with โค๏ธ for space exploration enthusiasts ๐
"The universe is not only stranger than we imagine, it is stranger than we can imagine." - J.B.S. Haldane


