AstroPixel is a FastAPI + React platform for exploring NASA gigapixel imagery with buttery-smooth deep zoom, annotations, and secure user/admin workflows. It ingests GeoTIFF/PSB files, generates tile pyramids with GDAL, and serves them through an optimized viewer.
- Purpose-built for planetary and space imagery: upload, tile, and explore at gigapixel scale.
- Modern stack: FastAPI backend, React/Vite frontend, OpenSeadragon viewer, optional Cloudflare R2 storage.
- Production-minded: Docker-ready, CI/CD workflows, issue/PR templates, and deployment guides.
- Viewing: Deep-zoom OpenSeadragon viewer for 100B+ pixel imagery; smooth pan/zoom and tile caching.
- Ingestion: GeoTIFF/PSB upload, GDAL-based tile pyramid generation, thumbnails/previews.
- Annotations: Points/regions with persistent storage; per-user auth; admin review.
- Auth & Roles: JWT authentication, admin panel, role-based access controls.
- Storage: Local filesystem or Cloudflare R2 (S3-compatible) for tiles/uploads.
- Ops: Health endpoints, rate limiting middleware, ready-to-run Dockerfile and compose.
- Backend: FastAPI, SQLAlchemy, GDAL, PostgreSQL/SQLite, Uvicorn
- Frontend: React 18, Vite, Tailwind CSS, OpenSeadragon
- Infra: Docker, GitHub Actions CI, optional Cloudflare R2, Hugging Face Spaces ready
cd Backend
conda create -n astropixel python=3.11 gdal -c conda-forge
conda activate astropixel
pip install -r requirements.txt
python create_admin.py
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reloadcd Frontend
npm install
npm run devCreate Backend/.env (example):
DATABASE_URL=postgresql://user:password@localhost:5432/astropixel
SECRET_KEY=change_me
CORS_ORIGINS=http://localhost:5173
USE_R2_STORAGE=false
Create Frontend/.env.local:
VITE_API_BASE_URL=http://localhost:8000
- Backend: Dockerfile provided;
docker-compose.ymlfor local stack. - Hugging Face Spaces: works out of the box when secrets are set (DATABASE_URL, SECRET_KEY, R2 keys).
- Reverse proxy: run Uvicorn behind Nginx/traefik for TLS and caching.
Backend/— FastAPI app, services, routers, DockerfileFrontend/— React/Vite client
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2025 Jayant Sunil Potdar