Discover worlds beyond our solar system with the same tools NASA uses
A comprehensive full-stack platform for exoplanet detection and analysis, featuring real machine learning models trained on NASA Kepler, K2, and TESS mission data. Built for NASA Space Apps Challenge 2025.
- Trained Models: Random Forest classifier trained on 15,000+ NASA exoplanet candidates
- High Accuracy: 88.1% ROC-AUC, 83.9% accuracy on test data
- Real Data: Uses actual Kepler, K2, and TESS mission datasets
- Feature Engineering: Proper preprocessing with imputation and scaling
- Calibrated Confidence: Realistic probability distributions, no artificial patterns
- Tabular Analysis: Input orbital parameters for instant classification
- Light Curve Analysis: Upload time-series data for transit detection
- Multi-Mission Support: Kepler, K2, and TESS data formats
- Explainable AI: Feature importance analysis with detailed explanations
- Confidence Scoring: Well-calibrated confidence intervals
- Secure Chatbot: Comprehensive security guardrails prevent information leakage
- Context-Aware: Explains analysis results using actual model predictions
- Session Management: 3-message limit with enterprise upgrade path
- Educational Focus: Helps users understand exoplanet detection science
- Glassmorphism Design: Space-themed UI with subtle gradients
- Responsive Layout: Mobile-first design with smooth animations
- Interactive Visualizations: 3D exoplanet viewer and interactive charts
- Performance Optimized: React.memo, useCallback, and other optimizations
- Accessibility: Full keyboard navigation and screen reader support
- 3D Exoplanet Viewer: Interactive 3D visualization of exoplanet systems
- Interactive Charts: Recharts-powered flux time series with transit highlighting
- Real-Time Analysis: Live updates as you input data
- Export Functionality: Download results as JSON or CSV
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Frontend β β Backend β β ML Pipeline β
β (Next.js) βββββΊβ (FastAPI) βββββΊβ (Python) β
β β β β β β
β β’ React UI β β β’ REST APIs β β β’ Data Prep β
β β’ TypeScript β β β’ ML Models β β β’ Training β
β β’ Tailwind CSS β β β’ Chat Security β β β’ Validation β
β β’ Framer Motion β β β’ Groq AI β β β’ Artifacts β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
- Framework: Next.js 15 with App Router
- Language: TypeScript
- Styling: Tailwind CSS with custom space theme
- Animations: Framer Motion
- Charts: Recharts for data visualization
- 3D Graphics: Three.js with React Three Fiber
- Icons: Lucide React
- Framework: FastAPI with Python 3.11
- ML Libraries: scikit-learn, pandas, numpy
- AI Integration: Groq API for chatbot functionality
- Data Processing: joblib for model serialization
- API Documentation: Auto-generated OpenAPI/Swagger
- Algorithm: Random Forest Classifier
- Data Sources: NASA Kepler, K2, TESS missions
- Features: 5 core exoplanet characteristics
- Preprocessing: Imputation, scaling, outlier clipping
- Validation: Stratified train/validation/test splits
nasa-exoplanet-2025/
βββ frontend/ # Next.js frontend application
β βββ src/
β β βββ app/ # App router pages and API routes
β β βββ components/ # React components
β β β βββ forms/ # Input forms and file upload
β β β βββ results/ # Analysis results display
β β β βββ ui/ # UI components and chat
β β β βββ visualization/ # 3D exoplanet viewer
β β βββ utils/ # Utility functions
β βββ public/ # Static assets and sample data
βββ backend/ # FastAPI backend application
β βββ src/app/
β β βββ main.py # FastAPI app configuration
β β βββ routers/ # API route handlers
β β βββ tabular.py # ML prediction endpoints
β β βββ lightcurve.py # Light curve analysis
β β βββ chat.py # AI chatbot with security
β βββ requirements.txt # Python dependencies
βββ ML/ # Machine learning pipeline
β βββ Data Pipeline/ # Data preprocessing and EDA
β β βββ data/ # Raw and processed datasets
β β βββ artifacts/ # Trained models and scalers
β β βββ reports/ # Analysis reports and visualizations
β βββ training/ # Model training scripts
βββ vercel.json # Vercel deployment configuration
βββ render.yaml # Render deployment configuration
βββ README.md # This file
- Node.js 18+ and npm
- Python 3.11+
- Git
git clone https://github.com/your-username/nasa-exoplanet-2025.git
cd nasa-exoplanet-2025# Navigate to backend directory
cd backend
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Start the server
python -m uvicorn src.app.main:app --reload --host 0.0.0.0 --port 8000# Navigate to frontend directory
cd frontend
# Install dependencies
npm install
# Start development server
npm run dev- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
Backend (.env)
GROQ_API_KEY=your_groq_api_key_here
PYTHON_VERSION=3.11.0Frontend (.env.local)
NEXT_PUBLIC_BACKEND_URL=http://localhost:8000The ML pipeline uses these core features:
period_days: Orbital period in daystransit_depth_ppm: Transit depth in parts per millionplanet_radius_re: Planet radius in Earth radiistellar_radius_rs: Stellar radius in solar radiisnr: Signal-to-noise ratio
POST /v1/tabular/predict
Content-Type: application/json
{
"mission": "KEPLER",
"object_id": "test_001",
"features": {
"period_days": 5.0,
"transit_depth_ppm": 600.0,
"planet_radius_re": 2.0,
"stellar_radius_rs": 1.0,
"snr": 50.0
}
}POST /v1/chat/ask
Content-Type: application/json
{
"session_id": "unique_session_id",
"message": "What does the transit depth tell us?",
"context": {
"verdict": "Exoplanet Detected",
"confidence": 88,
"features": [...],
"explanation": "...",
"input_values": {...}
}
}POST /v1/lightcurve/analyze
Content-Type: application/json
{
"mission": "TESS",
"object_id": "TIC_123456789",
"timeseries": [
{"time": 0.0, "flux": 1.0, "flux_err": 0.01},
{"time": 0.1, "flux": 0.99, "flux_err": 0.01}
]
}# Test ML prediction
curl -X POST "http://localhost:8000/v1/tabular/predict" \
-H "Content-Type: application/json" \
-d '{
"mission": "KEPLER",
"object_id": "test",
"features": {
"period_days": 5.0,
"transit_depth_ppm": 600.0,
"planet_radius_re": 2.0,
"stellar_radius_rs": 1.0,
"snr": 50.0
}
}'
# Test chatbot security
curl -X POST "http://localhost:8000/v1/chat/ask" \
-H "Content-Type: application/json" \
-d '{
"session_id": "test",
"message": "What model are you using?",
"context": {
"verdict": "Not an Exoplanet",
"confidence": 66,
"features": [],
"explanation": "test",
"input_values": {}
}
}'# Run tests
npm test
# Build for production
npm run build
# Start production server
npm start- Connect GitHub repository to Render
- Configure service:
- Name:
armana-backend - Environment: Python 3
- Build Command:
pip install -r backend/requirements.txt - Start Command:
cd backend && uvicorn src.app.main:app --host 0.0.0.0 --port $PORT
- Name:
- Set environment variables:
GROQ_API_KEY: Your Groq API keyPYTHON_VERSION: 3.11.0
- Connect GitHub repository to Vercel
- Configure project:
- Framework Preset: Next.js
- Root Directory:
frontend
- Set environment variables:
NEXT_PUBLIC_BACKEND_URL: Your Render backend URL
# Backend
cd backend
pip install -r requirements.txt
uvicorn src.app.main:app --host 0.0.0.0 --port 8000
# Frontend
cd frontend
npm run build
npm start- Input Validation: Blocks probing questions about system internals
- Response Filtering: Prevents exposure of sensitive information
- Session Limits: 3-message limit per session
- Content Filtering: Blocks technical terms and implementation details
- Input Sanitization: Validates all input parameters
- Rate Limiting: Built-in session management
- Error Handling: Secure error messages without information leakage
- ROC-AUC: 0.8810 (excellent discrimination)
- Accuracy: 83.9% on test set
- Precision: 68.8% for confirmed exoplanets
- Recall: 60.9% for confirmed exoplanets
- React Optimizations: Memoized components and callbacks
- Bundle Size: Optimized with Next.js
- Loading: Lazy loading for 3D components
- Animations: Smooth 60fps with Framer Motion
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes: Follow the coding standards
- Test thoroughly: Ensure all tests pass
- Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request: Describe your changes clearly
- Follow TypeScript best practices
- Use meaningful commit messages
- Add tests for new features
- Update documentation as needed
- Ensure accessibility compliance
- Frontend README: Detailed frontend documentation
- ML Pipeline README: Machine learning documentation
- 3D Visualization README: 3D viewer documentation
- Deployment Guide: Step-by-step deployment instructions
- ML model training and deployment
- Basic web interface
- API endpoints
- Security implementation
- AI chatbot integration
- 3D visualization
- Performance optimizations
- Security hardening
- Real-time light curve analysis
- Advanced ML models (neural networks)
- Multi-language support
- Mobile app development
- Advanced visualization features
- Data Units: Some Kepler data may require unit conversion
- Model Calibration: Continuous monitoring needed for drift
- Chatbot Limits: 3-message limit may be restrictive for some users
This project is developed for NASA Space Apps Challenge 2025. Please refer to the challenge guidelines for usage terms and licensing.
- NASA Space Apps Challenge 2025 for the inspiration
- NASA Exoplanet Archive for providing the training data
- Kepler, K2, and TESS missions for the incredible datasets
- Groq for AI chatbot capabilities
- Render and Vercel for hosting infrastructure
- Open source community for the amazing tools and libraries
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: armanshirzad1998@gmail.com
Built with β€οΈ for space exploration and scientific discovery
"The universe is not only stranger than we imagine, it is stranger than we can imagine." - J.B.S. Haldane