Advanced Earth Guard and Impact Simulation System
A cutting-edge web application for visualizing near-Earth asteroids and simulating impact scenarios with AI-powered analysis.
๐ Launch AEGIS
Experience real-time asteroid impact simulation with:
- ๐ก Live NASA asteroid data
- ๐ Interactive 3D Earth visualization
- ๐ฅ Scientific impact calculations
- ๐ค AI-powered impact analysis
- ๐บ๏ธ Detailed impact zone mapping
- 20+ NASA-verified asteroids with live orbital data
- Real-time threat level classification (High/Medium/Low)
- Comprehensive physical parameters (diameter, mass, velocity, orbit period)
- Direct links to NASA JPL Small-Body Database
- Photorealistic Earth with NASA Blue Marble textures
- Day/night lighting with city illumination
- Atmospheric glow effects
- Smooth orbital controls (drag to rotate, scroll to zoom)
- Auto-rotation with manual override
- Click anywhere on Earth to select impact location
- Precise crater diameter calculations
- Impact energy analysis (megaton TNT equivalent)
- Blast radius visualization
- Affected area calculations (kmยฒ)
- Impact velocity and trajectory modeling
- Google Gemini 1.5 Flash integration
- Detailed impact scenario analysis
- Environmental effect predictions
- Population and infrastructure risk assessment
- Real-time AI-generated insights
- Interactive impact zone maps (Leaflet/OpenStreetMap)
- Crater zone highlighting with radius indicators
- Blast damage zones with color-coded severity
- Coordinate display and location details
- Zoom and pan for detailed inspection
- Cyberpunk-inspired cyan and gold color scheme
- Glassmorphism UI effects with backdrop blur
- Smooth animations and transitions
- Responsive design for all screen sizes
- Professional SVG icons throughout
- Smart search with real-time filtering
- Threat level filtering (All/High/Medium/Low)
- Modern card-based layout
- Shimmer loading effects
- Smooth scrolling with custom scrollbar
- NASA JPL direct links per asteroid
- Intuitive click-to-select interface
- Loading states with progress indicators
- Error handling with graceful fallbacks
- Deselect functionality for easy reset
- Educational disclaimers
- Responsive controls panel
Interactive 3D Earth with asteroid selection sidebar
Detailed impact statistics and AI analysis
Interactive map showing crater and blast zones
-
Select an Asteroid
- Browse 20+ NASA-verified near-Earth asteroids
- Filter by threat level or search by name
- View detailed orbital and physical parameters
-
Choose Impact Location
- Click anywhere on the interactive 3D Earth
- Precise latitude/longitude selection
- Visual location indicator appears
-
Simulate Impact
- Click "Simulate Impact" button
- Scientific calculations using real physics
- Crater size, blast radius, and energy computed
-
Analyze Results
- View detailed impact statistics
- Explore interactive impact zone map
- Read AI-generated analysis and predictions
- Understand potential effects and risks
-
Explore Scenarios
- Try different asteroids and locations
- Compare impact effects
- Learn about planetary defense
Visit aegis-neo.vercel.app to use AEGIS instantly - no installation required!
# Start backend
cd backend
python -m venv venv
venv\Scripts\activate # On Windows
pip install -r requirements.txt
python main.py
# Start frontend (in a new terminal)
cd frontend
npm install
npm run dev# Configure environment variables
cp .env.example .env
# Edit .env with your NASA API key
# Start with Docker Compose
docker-compose up -dVisit http://localhost for the application.
- Deployment Guide - Comprehensive deployment instructions for various platforms
- Deployment Checklist - Pre-deployment verification checklist
- User Guide - Application user documentation
- API Documentation - Interactive API documentation (when running)
Aegis-frontend_change/
โโโ backend/ # Python FastAPI backend
โ โโโ main.py # Main API application
โ โโโ nasa_client.py # NASA API integration
โ โโโ orbital_calculator.py # Orbital mechanics calculations
โ โโโ impact_calculator.py # Impact simulation
โ โโโ requirements.txt # Python dependencies
โ โโโ Dockerfile # Backend container configuration
โ โโโ .env.example # Environment variables template
โ โโโ start-production.bat # Production startup script
โโโ frontend/ # React frontend with Vite
โ โโโ src/ # React source code
โ โ โโโ components/ # React components
โ โ โโโ contexts/ # React contexts
โ โ โโโ utils/ # Utility functions
โ โโโ package.json # Node.js dependencies
โ โโโ vite.config.js # Vite configuration
โ โโโ Dockerfile # Frontend container configuration
โ โโโ nginx.conf # Nginx configuration
โ โโโ vercel.json # Vercel deployment config
โ โโโ build-and-serve.bat # Production build script
โโโ docker-compose.yml # Multi-container orchestration
โโโ .env.example # Root environment template
โโโ DEPLOYMENT.md # Deployment documentation
โโโ README.md # This file
- Backend: Python 3.11+
- Frontend: Node.js 18+ and npm
- NASA API Key: Get yours at https://api.nasa.gov/
- Docker (optional): For containerized deployment
- Navigate to the
backenddirectory - Create and activate virtual environment:
python -m venv venv venv\Scripts\activate # Windows source venv/bin/activate # Linux/Mac
- Install dependencies:
pip install -r requirements.txt
- Configure environment variables:
cp .env.example .env # Edit .env and add your NASA API key - Run the development server:
python main.py
The backend will be available at: http://localhost:8000
- Navigate to the
frontenddirectory - Install dependencies:
npm install
- Configure environment variables (optional):
cp .env.example .env # Edit if you need custom API URL - Start the development server:
npm run dev
The frontend will be available at: http://localhost:5173
For convenience, use the provided startup scripts:
Windows:
start-backend.bat- Starts the backend serverstart-frontend.bat- Starts the frontend server
Linux/Mac:
chmod +x backend/start-production.sh- Make executable./backend/start-production.sh- Start backend
-
Configure environment:
cp .env.example .env # Edit .env with your NASA API key and configuration -
Build and start services:
docker-compose up -d
-
View logs:
docker-compose logs -f
-
Stop services:
docker-compose down
The application will be available at:
- Frontend: http://localhost
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
Backend:
cd backend
docker build -t aegis-backend .
docker run -p 8000:8000 --env-file .env aegis-backendFrontend:
cd frontend
docker build -t aegis-frontend --build-arg VITE_API_BASE_URL=http://localhost:8000 .
docker run -p 80:80 aegis-frontendProject Aegis supports two main deployment methods:
Complete containerized deployment with Docker Compose:
- โ Both frontend and backend together
- โ Production-ready configuration
- โ Works on any platform (local, VPS, cloud)
- โ Easy updates and rollback
docker-compose up -dSee DEPLOYMENT.md for full Docker deployment instructions.
Deploy frontend to Vercel's global CDN:
- โ Automatic HTTPS and CDN
- โ Instant deployments
- โ Preview deployments for PRs
- โ Built-in analytics
Backend deployment options:
- Railway (Recommended for FastAPI)
- Render
- Google Cloud Run
- Docker on any VPS
See DEPLOYMENT.md for Vercel + backend deployment instructions.
Before deploying, complete the Deployment Checklist
- Python 3.11+ - Programming language
- FastAPI - Modern, high-performance web framework
- Poliastro - Orbital mechanics calculations
- Astropy - Astronomical calculations and constants
- NumPy/SciPy - Scientific computing and numerical analysis
- Requests - NASA API integration
- Uvicorn - Lightning-fast ASGI server
- Pydantic - Data validation and settings management
- Google Gemini API - AI-powered impact analysis
- React 19 - Modern UI framework with concurrent features
- Vite - Next-generation frontend tooling
- Three.js - 3D graphics library
- @react-three/fiber - React renderer for Three.js
- @react-three/drei - Useful helpers for React Three Fiber
- Leaflet - Interactive mapping library
- react-leaflet - React components for Leaflet
- Axios - Promise-based HTTP client
- GSAP - Professional-grade animation library
- Custom AEGIS Theme - Cyberpunk-inspired UI design
- NASA JPL Small-Body Database - Asteroid orbital data
- NASA NEO Web Service - Near-Earth Object information
- Google Gemini 1.5 Flash - AI analysis generation
- OpenStreetMap - Impact zone mapping
- Docker - Containerization platform
- Docker Compose - Multi-container orchestration
- Nginx - High-performance web server and reverse proxy
- Vercel - Frontend hosting and CDN
- Railway - Backend API hosting (recommended)
- GitHub Actions - CI/CD automation (optional)
# NASA API Configuration
NASA_API_KEY=your_nasa_api_key_here
# Google Gemini AI Configuration
GEMINI_API_KEY=your_gemini_api_key_here
# Server Configuration
ENVIRONMENT=development
HOST=0.0.0.0
PORT=8000
DEBUG=True
# CORS Configuration
ALLOWED_ORIGINS=http://localhost:5173,https://aegis-neo.vercel.app
# Logging
LOG_LEVEL=INFO# API Configuration
VITE_API_BASE_URL=http://localhost:8000
# App Configuration
VITE_APP_ENV=development
VITE_APP_NAME="AEGIS - Asteroid Impact Simulator"
VITE_ENABLE_DEBUG_LOGGING=true- NASA API Key: Free at https://api.nasa.gov/ (instant approval)
- Gemini API Key: Free at https://ai.google.dev/ (requires Google account)
See .env.example files for full documentation.
GET /- Root endpoint, API informationGET /health- Health check with NASA API status
GET /api/asteroids/list- Get list of Near-Earth ObjectsGET /api/asteroid/{asteroid_name}- Get specific asteroid dataGET /api/trajectory/{asteroid_name}- Calculate orbital trajectory
POST /api/impact/calculate- Calculate impact effectsPOST /api/impact/deflection- Simulate deflection scenarios
GET /docs- Interactive API documentation (Swagger UI)GET /redoc- Alternative API documentation (ReDoc)
cd backend
pytest
pytest --cov=. --cov-report=html # With coverage reportcd frontend
npm test
npm run test:watch # Watch mode- Backend: Follow PEP 8, use Black formatter
- Frontend: ESLint configuration included
# Frontend
cd frontend
npm run lint
# Backend
cd backend
pip install black flake8
black .
flake8 .- โ Environment variables for sensitive data
- โ CORS configured for specific origins
- โ Input validation with Pydantic
- โ Security headers in production
- โ HTTPS enforced in production
- โ No secrets in version control
- Code splitting for faster initial load
- Lazy loading for 3D components
- API response caching
- Optimized bundle sizes
- CDN for static assets (production)
- Compression (gzip/brotli)
- Health check endpoints
- Error tracking (configure Sentry)
- Performance monitoring
- API rate limiting
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- NASA JPL - For providing the Near-Earth Object API and Small-Body Database
- Google Gemini AI - For powering intelligent impact analysis
- Poliastro - For accurate orbital mechanics calculations
- Three.js Community - For 3D visualization capabilities
- React & Vite Teams - For modern web development tools
- OpenStreetMap - For detailed mapping data
- Vercel - For seamless frontend hosting and deployment
- Live Demo: aegis-neo.vercel.app
- Documentation: See DEPLOYMENT.md and USER_GUIDE.md
- Issues: Submit via GitHub Issues
- NASA API: api.nasa.gov
- Gemini AI: ai.google.dev
AEGIS is an educational simulation tool designed for learning and awareness about asteroid impacts and planetary defense. All impact calculations are approximations based on simplified physics models. Actual asteroid impact effects would vary significantly based on numerous factors not fully modeled here including:
- Atmospheric entry dynamics
- Asteroid composition and structure
- Local geology and terrain
- Weather conditions
- Ocean depth (for water impacts)
This tool should not be used for actual emergency planning or scientific research without proper validation.
๏ฟฝ๏ธ Built with โค๏ธ for planetary defense awareness ๐
Launch AEGIS | Documentation | Report Issue
Protecting Earth, one simulation at a time ๐
- Interactive 3D Earth visualization
- Real-time NASA asteroid data integration
- Scientific impact calculations
- AI-powered impact analysis (Gemini)
- Impact zone mapping with Leaflet
- Modern AEGIS theme with glassmorphism
- Responsive design for all devices
- Enhanced asteroid sidebar with search & filters
- Production deployment (Vercel + Railway)
- Advanced deflection method simulations
- Historical impact event database
- Comparison mode for multiple asteroids
- Real-time asteroid tracking notifications
- User authentication and saved simulations
- Database integration for favorites
- Mobile app (React Native)
- Advanced atmospheric entry modeling
- Multi-asteroid collision scenarios
- Educational mode with guided tours
- Multi-language support (i18n)
- API rate limiting dashboard
- Custom asteroid parameters input
Built with โค๏ธ for planetary defense awareness