Skip to content

AI-Powered Space Research Companion. Globally Nominated for the NASA International Space Apps Challenge 2025.

Notifications You must be signed in to change notification settings

MAyman007/AstroLens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

32 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ AstroLens

Your AI-Powered Space Research Companion

AstroLens is a modern Flutter application that makes space biology research accessible to everyone. Browse curated research papers, get AI-powered summaries, and chat with an intelligent research assistant that helps you understand complex space science topics.

🌐 Live Demo

Web App: astrolens.pages.dev
API Documentation: api/README.md


✨ Features

πŸ“± Flutter Mobile & Web App

  • Modern Space-Themed UI - Beautiful cosmic color scheme with dark mode
  • Research Paper Browser - Explore curated space biology research papers
  • Advanced Search - Search by title, summary, or keywords
  • Paper Details - Comprehensive paper information with external links
  • AI Research Assistant - Chat interface powered by Google's Generative AI
  • Cross-Platform - Works on Android, iOS, Web, Windows, and macOS

πŸ€– AI-Powered Chat Assistant

  • Conversational Interface - Natural language queries about space research
  • Intelligent Responses - AI generates contextual answers based on research papers
  • Paper Recommendations - Get direct links to relevant research papers
  • Real-time Processing - Instant responses from deployed API

πŸ› οΈ FastAPI Backend

  • Paper Summarization - AI-powered research paper analysis
  • Chat Endpoint - Intelligent query processing with paper matching
  • CORS Enabled - Ready for web application integration
  • Auto-generated Documentation - Interactive API docs at /docs

πŸ—οΈ Project Structure

astrolens/
β”œβ”€β”€ lib/                          # Flutter application code
β”‚   β”œβ”€β”€ main.dart                # App entry point and theme configuration
β”‚   β”œβ”€β”€ models/                  # Data models
β”‚   β”‚   β”œβ”€β”€ research_paper.dart  # Research paper model
β”‚   β”‚   └── chat_message.dart    # Chat message model
β”‚   β”œβ”€β”€ pages/                   # Application screens
β”‚   β”‚   β”œβ”€β”€ home_page.dart       # Main research papers browser
β”‚   β”‚   β”œβ”€β”€ paper_detail_page.dart # Individual paper details
β”‚   β”‚   └── chat_page.dart       # AI chat interface
β”‚   └── services/               # Business logic
β”‚       └── paper_service.dart   # Paper data management
β”œβ”€β”€ api/                         # FastAPI backend
β”‚   β”œβ”€β”€ main.py                 # API server with AI integration
β”‚   β”œβ”€β”€ requirements.txt        # Python dependencies
β”‚   └── README.md              # API documentation
β”œβ”€β”€ assets/                     # App assets
β”‚   β”œβ”€β”€ papers.json            # Research papers database
β”‚   └── logo.png               # App logo
β”œβ”€β”€ test/                      # Unit and widget tests
└── pubspec.yaml              # Flutter dependencies

πŸš€ Getting Started

Prerequisites

  • Flutter SDK 3.9.2 or higher
  • Python 3.8+ (for API development)
  • Google API Key (for AI features)

πŸ“± Flutter App Setup

  1. Clone the repository

    git clone https://github.com/MAyman007/AstroLens.git
    cd astrolens
  2. Install Flutter dependencies

    flutter pub get
  3. Run the app

    # For development
    flutter run
    
    # For web
    flutter run -d chrome
    
    # For specific platform
    flutter run -d windows  # or macos, linux

πŸ”§ API Setup (Optional)

The app uses the deployed API by default, but you can run it locally:

  1. Navigate to API directory

    cd api
  2. Install Python dependencies

    pip install -r requirements.txt
  3. Set environment variables

    export GOOGLE_API_KEY="your_google_api_key_here"
    export NCBI_API_KEY="your_ncbi_api_key_here"  # Optional
  4. Run the API server

    python main.py
    # API available at http://localhost:9000

🧠 AI Integration

Google Generative AI

  • Model: Gemini 2.0 Flash Experimental
  • Features: Conversational responses, paper summarization
  • Prompting: Specialized prompts for space biology research

Chat Assistant Capabilities

  • Paper Matching: Advanced similarity matching using difflib.SequenceMatcher
  • Contextual Responses: AI generates relevant answers based on research content
  • Link Integration: Provides direct access to full research papers
  • Error Handling: Graceful fallbacks for API failures

πŸ“Š Research Paper Database

The app includes 608 curated research papers covering a wide range of space biology topics, for example:

  1. Animal Studies - Mouse experiments in space missions
  2. Bone Health - Microgravity effects on bone density and cellular processes
  3. Stem Cell Research - Tissue regeneration in space environments
  4. Gene Expression - RNA analysis and genetic studies on the ISS
  5. Space Biology - Various aspects of life sciences in microgravity

Each paper includes:

  • Full title and summary
  • Direct links to PMC articles
  • Relevant keywords for searching
  • AI-generated simplified explanations

πŸ”— API Endpoints

Chat Assistant

GET /chat?message={query}

Response:

{
  "response": "AI-generated conversational response...",
  "link": "https://pmc.ncbi.nlm.nih.gov/articles/PMC..."
}

Paper Summarization

POST /summarize
GET /summarize-get?url={paper_url}

Health Check

GET /health

πŸ“± Supported Platforms

  • βœ… Android - Native mobile experience
  • βœ… Web - Responsive web application
  • βœ… Windows - Desktop application
  • βœ… Linux - Desktop application

πŸ§ͺ Testing

# Run all tests
flutter test

# Run specific test files
flutter test test/models/research_paper_test.dart
flutter test test/services/paper_service_test.dart

πŸš€ Deployment

Releases

Web app is deployed at: astrolens.pages.dev.


Platform-specific builds (mobile and desktop) are provided on the project's GitHub Releases page. Look for the latest release to download:

  • Mobile
    • Android: APK / AAB packages
  • Desktop
    • Windows: MSI / EXE build
    • Linux: AppImage / DEB / RPM (when provided)

Visit the Releases page for binaries and installation instructions: https://github.com/MAyman007/AstroLens/releases

πŸ› οΈ Dependencies

Flutter Dependencies

  • google_fonts ^6.1.0 - Modern typography (Inter & Orbitron)
  • url_launcher ^6.2.2 - External link handling
  • http ^1.1.0 - API communication
  • cupertino_icons ^1.0.8 - iOS-style icons

API Dependencies

  • FastAPI - Modern Python web framework
  • Google Generative AI - AI-powered responses
  • BeautifulSoup - HTML parsing for paper content
  • Uvicorn - ASGI server

πŸ‘₯ Contributing

  1. Fork the repository
  2. Create a 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

πŸ™ Acknowledgments

  • NASA and PMC for providing access to space research papers
  • Google for Generative AI capabilities
  • Flutter team for the amazing cross-platform framework
  • FastAPI for the modern Python web framework

About

AI-Powered Space Research Companion. Globally Nominated for the NASA International Space Apps Challenge 2025.

Resources

Stars

Watchers

Forks