Skip to content

Rockstatata/ASTROWORLD

Repository files navigation

🌌 ASTROWORLD

Your Gateway to the Cosmos

React Django TypeScript PostgreSQL NASA API

A comprehensive, full-stack astronomical exploration platform that transforms NASA's vast data repositories into an immersive cosmic experience.

🚀 Features📸 Screenshots🛠️ Tech Stack⚡ Quick Start📖 Documentation


📋 Table of Contents


🌟 Overview

ASTROWORLD is not just another space app—it's a complete astronomical ecosystem that brings together cutting-edge web technologies, real-time space data, AI-powered assistance, and stunning 3D visualization to create an unparalleled cosmic exploration experience.

🎯 Vision

To democratize space exploration by making complex astronomical data accessible, interactive, and engaging for enthusiasts, students, researchers, and anyone fascinated by the cosmos.

✨ What Makes It Special

  • 🌍 17+ NASA APIs integrated in real-time
  • 🔭 3D Sky Visualization powered by Stellarium Web Engine (WebAssembly + WebGL)
  • 🤖 AI-Powered Assistant for personalized cosmic guidance
  • 📊 200+ React Components with enterprise-grade architecture
  • 🎨 Modern UI/UX with Framer Motion animations and TailwindCSS 4
  • 📱 Fully Responsive design from mobile to 4K displays
  • 🚀 50+ REST API Endpoints with comprehensive data models
  • Real-time Data Sync via Celery background tasks
  • 🔐 JWT Authentication with secure session management
  • 🌌 Interactive Starfield with physics-based animations

🚀 Features

🏠 Home Dashboard - NASA Data Hub

Transform your homepage into a live mission control center:

🖼️ APOD Hero Section

  • Daily Astronomy Picture of the Day as cinematic hero banner
  • Full metadata with title, date, and copyright
  • Smooth fade-in animations with Framer Motion
  • High-resolution image loading with lazy loading

⭐ Animated Starry Background

  • Canvas-based 1000+ star rendering
  • Physics-based twinkling effects
  • Shooting star animations with realistic trajectories
  • Cosmic nebula overlays with gradient effects

☀️ Space Weather Alerts (DONKI)

  • Real-time solar flares and coronal mass ejections
  • Geomagnetic storm predictions
  • Radiation storm warnings
  • Interactive event cards with detailed metadata

🌑 Near-Earth Objects (NeoWs)

  • Daily asteroid tracking with orbital data
  • Hazardous object highlighting (PHA)
  • Velocity, diameter, and miss distance calculations
  • Visual danger indicators

🌍 Earth from Space (EPIC)

  • Latest imagery from DSCOVR satellite (1M miles away)
  • Natural color Earth photography
  • Lightbox viewer for full-resolution images
  • Coordinate and timestamp metadata

🔴 Mars Rover Photos

  • Real-time photos from Curiosity, Perseverance, and Opportunity
  • Camera-specific filtering (NAVCAM, MASTCAM, etc.)
  • Sol date and Earth date tracking
  • Interactive gallery with full-screen view

🔭 Skymap - 3D Cosmic Visualization

The crown jewel of ASTROWORLD—a fully interactive 3D sky powered by Stellarium Web Engine:

Core Features:

  • 🌌 1+ Billion Stars from ESA Gaia database
  • 🪐 Real-time Planetary Positions with accurate ephemeris
  • 🌟 110,000+ Deep Sky Objects (nebulae, galaxies, clusters)
  • 🛰️ Satellite Tracking with TLE orbital data
  • 🗺️ Multi-Cultural Constellations (Western, Chinese, Egyptian, etc.)
  • 📍 GPS-Based Observer Location with automatic coordinate detection
  • ⏱️ Time Control - Past, present, future sky states
  • 🔍 Object Search with fuzzy matching
  • 📌 Custom Markers with AI-generated descriptions
  • 💾 Sky View Saving for favorite configurations

Technical Implementation:

  • WebAssembly for near-native performance
  • WebGL 2.0 for hardware-accelerated rendering
  • Custom marker overlay system with coordinate projection
  • Real-time sky coordinate transformations (ICRS, J2000, Alt-Az)

🤖 Murph AI - Your Cosmic Companion

An intelligent astronomy assistant powered by state-of-the-art LLMs:

Capabilities:

  • 💬 Contextual Conversations about astronomy, astrophysics, and space science
  • 🔭 Celestial Object Descriptions with rich formatting
  • 📚 Research Paper Summarization for academic content
  • 🎓 Learning Path Recommendations based on user interests
  • 🗂️ Multi-turn Dialogue with conversation memory
  • 📝 Markdown Support for formatted responses
  • 💾 Conversation Persistence and export
  • 🔄 Session Management with multiple threads

Integration Points:

  • Direct integration with Skymap for object descriptions
  • Research paper analysis in Explore section
  • Personalized content recommendations
  • Learning assistance throughout the platform

🔬 Explore - Research Discovery Platform

A comprehensive research and social discovery system:

Research Features:

  • 📄 17,000+ Research Papers from arXiv, NASA ADS, and Crossref
  • 🔍 Advanced Filtering by category, date, citations, and keywords
  • 📊 Citation Metrics and author information
  • 🏷️ Tagging System for personal organization
  • 📥 PDF Downloads with metadata preservation
  • 🤖 AI Summaries for complex papers

Social Features:

  • 👥 User Discovery - Find researchers with similar interests
  • 🔔 Following System - Track favorite astronomers
  • 📖 Public Journals - Share observations and discoveries
  • 💬 Comment System - Discuss papers and findings
  • ❤️ Like & Save - Curate personal research library

👤 Profile - Personal Cosmic Dashboard

Your centralized command center for all astronomy activities:

Content Management:

  • 🗂️ Unified Content Library - All saved NASA data in one place
  • 📌 Sky Markers - Personal celestial object bookmarks
  • 📚 Research Papers - Academic library with notes
  • 📓 Observation Journals - Personal cosmic diary
  • 🗃️ Collections - Organize content into themed playlists
  • Favorites - Quick access to most-loved content

User Statistics:

  • 📈 Activity Tracking - Comprehensive usage analytics
  • 🎯 Engagement Metrics - Content interaction statistics
  • 🏆 Achievements - Astronomy knowledge milestones
  • 📊 Learning Progress - Track cosmic education journey

Social Profile:

  • 👥 Follower/Following - Network management
  • 🌐 Public Content - Share discoveries with community
  • 📰 Activity Feed - Recent actions and updates
  • 🖼️ Profile Customization - Avatar, bio, interests

📅 Events - Cosmic Calendar

Never miss a celestial spectacle:

Event Types:

  • 🌑 Solar & Lunar Eclipses with visibility maps
  • ☄️ Meteor Showers with peak times and ZHR data
  • 🪐 Planetary Alignments and conjunctions
  • 🛰️ ISS Passes with viewing times
  • 🚀 Rocket Launches from multiple agencies
  • 🌟 Special Astronomical Events curated by experts

Notification System:

  • 📧 Email Alerts with customizable timing
  • 🔔 In-App Notifications for upcoming events
  • 📍 Location-Based Visibility calculations
  • Multi-timezone Support with local time conversion

📰 News - Space News Aggregator

Stay updated with the latest from the cosmos:

News Sources:

  • 🚀 NASA Official announcements and press releases
  • 🌍 Space Agencies - ESA, JAXA, Roscosmos, CNSA
  • 🔬 Scientific Journals - Nature, Science, Astronomy
  • 💼 Commercial Space - SpaceX, Blue Origin, Virgin Galactic
  • 📡 Space Industry news and updates

Features:

  • 🏷️ Category Filtering - Missions, discoveries, technology, etc.
  • 🔍 Search Functionality with keyword matching
  • 💾 Save for Later with personal news library
  • 🔗 Share on Social media integration
  • 📱 Mobile-Optimized cards with lazy loading

🖼️ Gallery - NASA Image Library

Explore millions of stunning space images:

Image Collections:

  • 🔭 Hubble Space Telescope - Deep space imagery
  • 🌌 James Webb Space Telescope - Infrared universe
  • 🔴 Mars Rovers - Surface photography
  • 🌍 Earth Observatory - Satellite imagery
  • 🌙 Apollo Missions - Historic lunar photography
  • 🛰️ ISS Photography - Earth from orbit

Gallery Features:

  • 🔍 Advanced Search with metadata filtering
  • 📏 Multiple Resolutions from thumbnails to full-size
  • 📋 Technical Metadata - Camera, date, location
  • 💾 Download Options for personal use
  • 🗂️ Collection Management - Organize favorites
  • 🎨 Lightbox Viewer with zoom and pan

🚀 SpaceX Integration

Real-time SpaceX mission tracking:

  • 🚀 Launch Schedule with countdown timers
  • 🎯 Mission Details - Payload, orbit, outcome
  • 📍 Launchpad Information with geographic data
  • 🔧 Rocket Specifications - Falcon 9, Falcon Heavy, Starship
  • 📊 Success Statistics and historical data
  • 🛰️ Starlink Tracking with constellation status

📸 Screenshots

🏠 Home Dashboard

Experience NASA data like never before

Home Hero Home Panels
Space Weather Asteroids

🔭 Skymap Visualization

3D interactive cosmic exploration

Skymap Overview Skymap Markers
Skymap AI Skymap Objects

🤖 Murph AI Assistant

Your personal astronomy guide

Murph Chat Murph Responses

🔬 Explore & Discover

Research meets social networking

Research Papers User Discovery

👤 User Profile

Your cosmic dashboard

Profile Overview Saved Content
Collections Statistics

📅 Events & 📰 News

Stay informed about the cosmos

Events Calendar Space News

🖼️ Gallery

Millions of stunning space images

Gallery Grid Gallery Detail

🎨 Welcome Experience

Onboarding that inspires

Welcome 1 Welcome 3 Welcome 5

🏗️ Architecture

graph TB
    subgraph "Frontend Layer"
        A[React 19 + TypeScript]
        B[TailwindCSS 4 + Framer Motion]
        C[Stellarium WebGL/WASM]
        D[TanStack Query]
    end
    
    subgraph "API Layer"
        E[Django REST Framework]
        F[JWT Authentication]
        G[API Endpoints 50+]
    end
    
    subgraph "Data Layer"
        H[PostgreSQL]
        I[Redis Cache]
        J[Celery Workers]
    end
    
    subgraph "External Services"
        K[17 NASA APIs]
        L[OpenAI GPT]
        M[Research DBs]
        N[News APIs]
    end
    
    A --> D
    B --> A
    C --> A
    D --> E
    E --> F
    F --> G
    G --> H
    G --> I
    J --> K
    J --> L
    J --> M
    J --> N
    K --> E
    L --> E
    M --> E
    N --> E
Loading

🔄 Data Flow Architecture

User Interface
    ↓
React Components (200+)
    ↓
TanStack Query (State Management)
    ↓
API Services (Axios)
    ↓
Django REST API (50+ Endpoints)
    ↓
Database Models (PostgreSQL)
    ↓
External APIs (NASA, OpenAI, etc.)
    ↓
Background Tasks (Celery + Redis)
    ↓
Real-time Data Synchronization

🎯 Key Architectural Decisions

  • Microservices-Ready Monolith: Modular Django apps for easy future scaling
  • API-First Design: All features accessible via REST API
  • Server State Management: TanStack Query for optimal caching and synchronization
  • Component-Based UI: Reusable React components with strict TypeScript
  • Background Processing: Celery for data synchronization without blocking users
  • Multi-Level Caching: Redis + in-memory + browser cache for performance
  • JWT Authentication: Stateless authentication for horizontal scaling

🛠️ Tech Stack

Frontend Technologies

Category Technology Version Purpose
Framework React 19.1 UI library with latest features
Language TypeScript 5.8 Type-safe development
Build Tool Vite 7.1 Lightning-fast HMR
Styling TailwindCSS 4.1 Utility-first CSS
Animation Framer Motion 12.23 Smooth transitions
State TanStack Query 5.90 Server state management
Routing React Router 7.8 Client-side navigation
HTTP Axios 1.12 API communication
Icons Lucide React 0.545 Beautiful icons
3D Engine Stellarium WASM - WebGL sky rendering

Backend Technologies

Category Technology Version Purpose
Framework Django 5.2 Web framework
API Django REST Framework - RESTful API
Database PostgreSQL 15+ Primary database
Auth Simple JWT - Token authentication
Tasks Celery - Background processing
Cache Redis 7+ Caching & message broker
CORS django-cors-headers - Cross-origin requests
Language Python 3.11+ Server-side logic

External Services

Service Purpose APIs Used
NASA Space data 17 different APIs
OpenAI AI assistance GPT models
arXiv Research papers Academic database
NASA ADS Astronomy papers Scientific database
Crossref Paper metadata DOI resolution
Spaceflight News Space news News aggregation
SpaceX Launch data SpaceX API

⚡ Quick Start

Prerequisites

# Required
- Python 3.11+
- Node.js 18+
- PostgreSQL 15+
- Git

# Optional (for full features)
- Redis 7+ (for Celery)
- NASA API Key (free from api.nasa.gov)
- OpenAI API Key (for AI features)

1️⃣ Clone the Repository

git clone https://github.com/Rockstatata/ASTROWORLD.git
cd ASTROWORLD

2️⃣ Backend Setup

# Navigate to backend
cd astroworld-backend

# Create virtual environment
python -m venv venv

# Activate virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Create PostgreSQL database
psql -U postgres
CREATE DATABASE astroworld;
\q

# Configure environment variables
cp .env.example .env
# Edit .env with your credentials

# Run migrations
python manage.py migrate

# Create superuser
python manage.py createsuperuser

# Start development server
python manage.py runserver

Backend will run at http://localhost:8000

3️⃣ Frontend Setup

# Open new terminal
cd astroworld-frontend

# Install dependencies
npm install

# Configure environment variables
# Create .env file with:
echo "VITE_API_URL=http://localhost:8000/api" > .env
echo "VITE_NASA_API_KEY=your_nasa_api_key_here" >> .env

# Start development server
npm run dev

Frontend will run at http://localhost:5173

4️⃣ Optional: Celery Setup (Background Tasks)

# Install Redis
# On Windows: Download from https://github.com/microsoftarchive/redis/releases
# On macOS: brew install redis
# On Linux: sudo apt install redis

# Start Redis
redis-server

# In new terminal, start Celery worker
cd astroworld-backend
celery -A astroworld worker -l info

# In another terminal, start Celery beat (scheduler)
celery -A astroworld beat -l info

5️⃣ Access the Application

  1. Frontend: http://localhost:5173
  2. Backend API: http://localhost:8000/api
  3. Admin Panel: http://localhost:8000/admin

🔑 Get API Keys

Service URL Required For
NASA API https://api.nasa.gov/ All NASA data features
OpenAI https://platform.openai.com/ Murph AI assistant
Groq (Alternative) https://groq.com/ Faster AI responses

📁 Project Structure

ASTROWORLD/
│
├── 📂 astroworld-backend/          # Django Backend
│   ├── 📂 astroworld/              # Project Configuration
│   │   ├── settings.py             # Django settings
│   │   ├── urls.py                 # URL routing
│   │   ├── wsgi.py                 # WSGI config
│   │   └── asgi.py                 # ASGI config
│   │
│   ├── 📂 users/                   # User Management App
│   │   ├── models.py               # User, UserContent, UserJournal
│   │   ├── views.py                # User API endpoints
│   │   ├── serializers.py          # DRF serializers
│   │   └── explore_views.py        # Social discovery
│   │
│   ├── 📂 nasa_api/                # NASA API Integration
│   │   ├── services.py             # NASA API clients
│   │   ├── views_extended.py       # 17 NASA endpoints
│   │   ├── models.py               # NASA data models
│   │   ├── tasks.py                # Background sync
│   │   └── management/commands/    # Data import commands
│   │
│   ├── 📂 murphai/                 # AI Chat System
│   │   ├── models.py               # Conversation, Message
│   │   ├── views.py                # Chat API
│   │   ├── groq_service.py         # AI service
│   │   └── urls.py                 # Chat routes
│   │
│   ├── 📂 skymap/                  # Sky Visualization
│   │   ├── models.py               # SkyMarker, SkyView
│   │   ├── views.py                # Skymap API
│   │   └── serializers.py          # Skymap data
│   │
│   ├── 📂 research_papers/         # Academic Papers
│   │   ├── services.py             # arXiv, NASA ADS
│   │   └── tasks.py                # Paper sync
│   │
│   ├── 📂 spaceflightnews/         # News Aggregation
│   │   ├── models.py               # NewsArticle
│   │   ├── services.py             # News APIs
│   │   └── tasks.py                # News sync
│   │
│   ├── 📂 spacex_api/              # SpaceX Integration
│   │   ├── models.py               # Launch, Rocket
│   │   ├── services.py             # SpaceX API
│   │   └── tasks.py                # Launch sync
│   │
│   ├── manage.py                   # Django CLI
│   ├── requirements.txt            # Python dependencies
│   └── db.sqlite3 / PostgreSQL     # Database
│
├── 📂 astroworld-frontend/         # React Frontend
│   ├── 📂 public/                  # Static Assets
│   │   └── astroworld-engine/      # Stellarium WASM
│   │
│   ├── 📂 src/
│   │   ├── 📂 components/          # React Components (200+)
│   │   │   ├── common/             # Reusable UI
│   │   │   ├── Home/               # Home components
│   │   │   ├── Skymap/             # 3D sky components
│   │   │   ├── murphai/            # AI chat UI
│   │   │   ├── explore/            # Research discovery
│   │   │   ├── profile/            # User dashboard
│   │   │   ├── events/             # Event calendar
│   │   │   ├── news/               # News feed
│   │   │   └── gallery/            # Image gallery
│   │   │
│   │   ├── 📂 pages/               # Route Components
│   │   │   ├── home/               # Home page
│   │   │   ├── skymap/             # Skymap page
│   │   │   ├── murph_ai/           # AI chat page
│   │   │   ├── explore/            # Research page
│   │   │   ├── profile/            # Profile page
│   │   │   ├── events/             # Events page
│   │   │   ├── news/               # News page
│   │   │   ├── gallery/            # Gallery page
│   │   │   └── auth/               # Auth pages
│   │   │
│   │   ├── 📂 hooks/               # Custom React Hooks
│   │   │   ├── nasa/               # NASA data hooks
│   │   │   ├── useUserContent.ts   # Content management
│   │   │   ├── useSkymap.ts        # Sky visualization
│   │   │   ├── useMurphAi.ts       # AI chat
│   │   │   └── useExplore.ts       # Research discovery
│   │   │
│   │   ├── 📂 services/            # API Clients
│   │   │   ├── nasa/               # NASA API
│   │   │   ├── userInteractions.ts # User API
│   │   │   ├── exploreAPI.ts       # Research API
│   │   │   └── skymapApi.ts        # Skymap API
│   │   │
│   │   ├── 📂 context/             # React Contexts
│   │   │   └── authContext.tsx     # Auth state
│   │   │
│   │   ├── 📂 routes/              # Routing
│   │   │   └── AllRoutes.tsx       # Route definitions
│   │   │
│   │   ├── 📂 types/               # TypeScript Types
│   │   │   ├── index.ts            # Common types
│   │   │   └── stellarium.ts       # Stellarium types
│   │   │
│   │   ├── 📂 utils/               # Utilities
│   │   │   ├── murphaiUtils.ts     # AI utilities
│   │   │   └── stellarium.ts       # Sky utilities
│   │   │
│   │   ├── App.tsx                 # Root component
│   │   └── main.tsx                # Entry point
│   │
│   ├── package.json                # Dependencies
│   ├── tsconfig.json               # TypeScript config
│   ├── vite.config.ts              # Vite config
│   ├── tailwind.config.js          # Tailwind config
│   └── .env                        # Environment variables
│
├── 📂 screenshots/                 # Project Screenshots
│   ├── home*.png                   # Home page screens
│   ├── skymap*.png                 # Skymap screens
│   ├── murphai*.png                # AI chat screens
│   └── ...                         # Other screens
│
├── README.md                       # This file
├── Project_Report.md               # Detailed analysis
└── NASA_INTEGRATION.md             # NASA API guide

🛰️ API Integrations

NASA APIs (17 Integrated)

API Purpose Endpoints Update Frequency
APOD Astronomy Picture of the Day /planetary/apod Daily
DONKI Space Weather Database /DONKI/* Real-time
NeoWs Near-Earth Objects /neo/rest/v1/* Daily
EPIC Earth Imagery /EPIC/api/* Daily
Mars Rovers Mars Photos /mars-photos/api/* Daily
Exoplanet Archive Confirmed Exoplanets Caltech TAP Weekly
Image Library NASA Media Collection /search On-demand
TLE Satellite Tracking TLE API Daily
GIBS Earth Imagery Tiles WMTS Daily
+ 8 more APIs including GeneLab, TechPort, Patents, SSD, CNEOS, Horizons, MPC, Space Weather

Rate Limits & Optimization

  • Demo Key: 30 requests/hour, 50 requests/day
  • Personal Key: 1,000 requests/hour, unlimited daily
  • Backend Caching: 15-minute cache for most endpoints
  • Frontend Caching: TanStack Query with 5-minute stale time
  • Background Sync: Celery tasks for periodic data updates

💻 Development

Running Tests

# Backend tests
cd astroworld-backend
python manage.py test

# Frontend tests
cd astroworld-frontend
npm run test

Code Quality

# Frontend linting
npm run lint

# TypeScript checking
npm run type-check

# Backend formatting (if using Black)
black .

# Check for issues
flake8

Database Migrations

# Create new migration
python manage.py makemigrations

# Apply migrations
python manage.py migrate

# Show migration status
python manage.py showmigrations

Development Workflow

  1. Feature Branch: Create from master

    git checkout -b feature/your-feature-name
  2. Development: Make changes with hot reload

    • Backend: Django auto-reload
    • Frontend: Vite HMR
  3. Testing: Write and run tests

  4. Commit: Use conventional commits

    git commit -m "feat: add new NASA API endpoint"
  5. Pull Request: Submit for review

Environment Variables

Backend (.env)

# Django
SECRET_KEY=your-secret-key-here
DEBUG=True
ALLOWED_HOSTS=localhost,127.0.0.1

# Database
DATABASE_URL=postgresql://user:password@localhost:5432/astroworld
# Or individual settings:
DB_NAME=astroworld
DB_USER=postgres
DB_PASSWORD=your_password
DB_HOST=localhost
DB_PORT=5432

# NASA API
NASA_API_KEY=your_nasa_api_key

# AI Services
GROQ_API_KEY=your_groq_api_key
OPENAI_API_KEY=your_openai_key

# Celery
USE_CELERY=True
CELERY_BROKER_URL=redis://localhost:6379/0
CELERY_RESULT_BACKEND=redis://localhost:6379/0

# Email (optional)
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USE_TLS=True
EMAIL_HOST_USER=your-email@gmail.com
EMAIL_HOST_PASSWORD=your-app-password
DEFAULT_FROM_EMAIL=noreply@astroworld.dev

# Frontend URL (for CORS)
FRONTEND_URL=http://localhost:5173

Frontend (.env)

# API Configuration
VITE_API_URL=http://localhost:8000/api

# NASA API Key (for client-side calls)
VITE_NASA_API_KEY=your_nasa_api_key

# Optional: Feature Flags
VITE_ENABLE_AI=true
VITE_ENABLE_CELERY=true

🚀 Deployment

Production Checklist

  • Set DEBUG=False in Django settings
  • Configure secure SECRET_KEY
  • Set up PostgreSQL database
  • Configure Redis for Celery and caching
  • Set up static file serving (WhiteNoise or CDN)
  • Configure HTTPS with SSL certificates
  • Set up domain and DNS
  • Configure CORS for production domain
  • Set up email service (SendGrid, AWS SES, etc.)
  • Configure backup strategy for database
  • Set up monitoring (Sentry, New Relic, etc.)
  • Configure CI/CD pipeline

Docker Deployment

# Build images
docker-compose build

# Start services
docker-compose up -d

# View logs
docker-compose logs -f

# Stop services
docker-compose down

Platform-Specific Guides

Heroku

# Install Heroku CLI
heroku login

# Create app
heroku create astroworld-app

# Add PostgreSQL
heroku addons:create heroku-postgresql:hobby-dev

# Add Redis
heroku addons:create heroku-redis:hobby-dev

# Set environment variables
heroku config:set NASA_API_KEY=your_key

# Deploy
git push heroku master

AWS / DigitalOcean / VPS

  1. Server Setup: Ubuntu 22.04 LTS recommended
  2. Install Dependencies: Python, Node.js, PostgreSQL, Redis, Nginx
  3. Clone Repository: Git clone and configure
  4. Environment: Set up virtual environment and .env files
  5. Database: Create PostgreSQL database and run migrations
  6. Static Files: Collect and serve with Nginx
  7. Process Manager: Use Gunicorn + Supervisor/Systemd
  8. Reverse Proxy: Configure Nginx for both frontend and backend
  9. SSL: Set up Let's Encrypt certificates
  10. Monitoring: Configure logging and monitoring tools

Performance Optimization

  • Frontend:

    • Enable production build: npm run build
    • Serve static files via CDN
    • Enable Gzip/Brotli compression
    • Implement service workers for offline support
  • Backend:

    • Use Gunicorn with 4-8 workers
    • Enable PostgreSQL connection pooling
    • Configure Redis for session storage
    • Set up database query optimization
    • Enable Django's caching framework

🌟 Key Features Deep Dive

Universal Save System

ASTROWORLD implements a unified content management system that allows users to save any type of content:

// Save any NASA content with one component
<SaveButton
  contentType="apod"
  contentId="2024-10-29"
  title="Galaxy NGC 1365"
  description="A stunning barred spiral galaxy"
  thumbnailUrl="https://..."
  sourceUrl="https://..."
/>

Supported Content Types:

  • 🖼️ APOD images
  • 🔴 Mars rover photos
  • 🌍 Earth EPIC images
  • 🌑 Near-Earth objects
  • 🪐 Exoplanets
  • ☀️ Space weather events
  • 📰 News articles
  • 🔭 Celestial objects from Skymap
  • 📅 Cosmic events
  • 🖼️ NASA image library items
  • 🚀 Space launches

Backend Model:

class UserContent(models.Model):
    user = models.ForeignKey(User, on_delete=models.CASCADE)
    content_type = models.CharField(max_length=50)
    content_id = models.CharField(max_length=255)
    title = models.CharField(max_length=500)
    description = models.TextField(blank=True)
    thumbnail_url = models.TextField(blank=True)
    source_url = models.TextField(blank=True)
    notes = models.TextField(blank=True)
    tags = models.JSONField(default=list)
    is_favorite = models.BooleanField(default=False)
    created_at = models.DateTimeField(auto_now_add=True)

AI-Powered Features

Murph AI Architecture:

User Input
    ↓
Conversation Context (Multi-turn)
    ↓
Astronomy-Specific Prompting
    ↓
LLM Processing (Groq/OpenAI)
    ↓
Response Formatting (Markdown)
    ↓
Database Persistence
    ↓
User Display

AI Capabilities:

  • 🔭 Object Descriptions: Rich astronomy information
  • 📚 Paper Summaries: Academic content digestion
  • 🎓 Learning Paths: Personalized education
  • 💬 Q&A: Contextual astronomy assistance
  • 🧠 Memory: Multi-turn conversation context

Background Task System

Celery Beat Schedule:

CELERY_BEAT_SCHEDULE = {
    'sync-daily-nasa-data': {
        'task': 'nasa_api.tasks.sync_daily_nasa_data',
        'schedule': crontab(hour=2, minute=0),  # 2 AM daily
    },
    'sync-space-weather': {
        'task': 'nasa_api.tasks.sync_space_weather',
        'schedule': crontab(minute=0),  # Every hour
    },
    'send-neo-alerts': {
        'task': 'nasa_api.tasks.send_neo_alerts',
        'schedule': crontab(hour=9, minute=0),  # 9 AM daily
    },
    # ... more tasks
}

Background Tasks:

  • 📊 Daily NASA data synchronization
  • ☀️ Hourly space weather updates
  • 🌑 Daily near-Earth object tracking
  • 📰 News aggregation and curation
  • 📚 Research paper indexing
  • 🚀 SpaceX launch data updates
  • 📧 Email notification delivery
  • 🗑️ Old data cleanup

📊 Project Statistics

Codebase Metrics

Category Count Details
Frontend Components 200+ React/TypeScript components
Backend Endpoints 50+ REST API endpoints
Database Models 25+ Django ORM models
Custom Hooks 25+ React custom hooks
Pages/Routes 15+ Main application pages
NASA APIs 17 Integrated space data sources
Background Tasks 12+ Celery periodic tasks
Lines of Code ~80,000 Frontend + Backend combined

Development Timeline

  • Phase 1: Core infrastructure and authentication ✅
  • Phase 2: NASA API integration (17 APIs) ✅
  • Phase 3: Stellarium 3D skymap implementation ✅
  • Phase 4: AI assistant (Murph AI) ✅
  • Phase 5: Research discovery platform ✅
  • Phase 6: User content management system ✅
  • Phase 7: Events and notifications ✅
  • Phase 8: SpaceX integration ✅
  • Phase 9: Gallery and news aggregation ✅
  • Phase 10: Polish and optimization ✅

Feature Completion

  • Core Features: 100%
  • NASA Integration: 100%
  • AI Features: 95%
  • Social Features: 90%
  • Advanced Analytics: 85%
  • 🔄 Mobile App: Planned
  • 🔄 AR/VR: Future enhancement

🤝 Contributing

We welcome contributions from the community! Here's how you can help:

Ways to Contribute

  1. 🐛 Report Bugs: Open an issue with detailed reproduction steps
  2. 💡 Suggest Features: Share your ideas for new features
  3. 📝 Improve Documentation: Help make our docs better
  4. 🔧 Submit Pull Requests: Fix bugs or add features
  5. 🌟 Star the Repository: Show your support!

Development Setup

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Write/update tests
  5. Commit your changes: git commit -m 'Add amazing feature'
  6. Push to the branch: git push origin feature/amazing-feature
  7. Open a Pull Request

Code Standards

  • Frontend: ESLint + Prettier configuration
  • Backend: PEP 8 Python style guide
  • Commits: Conventional Commits specification
  • Tests: Write tests for new features
  • Documentation: Update docs for API changes

📖 Documentation

  • 📘 NASA Integration Guide - Detailed NASA API setup
  • 📗 Project Report - Comprehensive technical analysis
  • 📕 API Documentation - Auto-generated from DRF (available at /api/docs)
  • 📙 Component Storybook - (Coming soon)

🐛 Troubleshooting

Common Issues

Issue: NASA API Rate Limit

# Solution: Get a personal API key from api.nasa.gov
# Update .env file with your key
VITE_NASA_API_KEY=your_personal_key_here

Issue: PostgreSQL Connection Error

# Solution: Verify PostgreSQL is running
# Windows: Check Services
# Mac: brew services start postgresql
# Linux: sudo systemctl start postgresql

Issue: Celery Not Working

# Solution: Ensure Redis is running
redis-cli ping  # Should return "PONG"

# Check Celery worker is running
celery -A astroworld worker -l info

Issue: Stellarium Not Loading

# Solution: Verify WASM files are in public/astroworld-engine/
# Check browser console for errors
# Ensure HTTPS is used in production (WASM requirement)

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

MIT License

Copyright (c) 2025 ASTROWORLD

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

🙏 Acknowledgments

  • NASA - For providing incredible open APIs and data
  • Stellarium - For the amazing WebGL sky engine
  • React Team - For the fantastic frontend framework
  • Django Team - For the robust backend framework
  • Open Source Community - For countless helpful libraries

📞 Contact & Support


🌠 Future Roadmap

Q1 2025

  • Mobile applications (React Native)
  • Advanced AI recommendations
  • Real-time WebSocket features
  • Enhanced social networking

Q2 2025

  • AR sky overlay for mobile
  • VR space exploration
  • Advanced analytics dashboard
  • API for third-party developers

Q3 2025

  • Educational platform launch
  • Gamification system
  • Community forums
  • Live event streaming

Q4 2025

  • Machine learning recommendations
  • Advanced visualization tools
  • Citizen science integration
  • International language support

⭐ Show Your Support

If you find this project helpful or interesting, please consider giving it a star! ⭐

Star History Chart


🌌 "Explore the cosmos, one click at a time."

Made with ❤️ and countless hours of dedication

⬆ Back to Top

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors