Skip to content

GuildMasterDev/Astronomer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

25 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Astronomer

A secure, React-free Electron desktop application for exploring astronomy data and planning observations. Built with vanilla JavaScript, HTML, and CSS โ€” plus a static browser build that runs the same UI without Electron.

License: MIT Electron Platform

Live demo: https://guildmasterdev.github.io/Astronomer/

Astronomer Observe tab โ€” interactive map and all-sky chart

โœจ Features

๐ŸŒŒ Explore

  • NASA APOD: Browse Astronomy Picture of the Day with date picker and random selection
  • Image & Video Library: Search NASA's extensive media collection
  • EPIC Earth Images: View recent natural color images of Earth from space
  • ISS Tracker: Real-time International Space Station position and pass predictions

๐ŸŽ‚ Hubble on Your Birthday

  • Discover what Hubble saw on your birthday
  • Browse through years of Hubble observations
  • Smart date matching with ยฑ3 day tolerance

๐Ÿ”ญ Observe Tonight

  • Location-based observation planning (manual or GPS)
  • Twilight times (civil, nautical, astronomical)
  • Moon phase and illumination calculations
  • Planet visibility predictions
  • ISS pass predictions for your location

๐Ÿช Objects

  • Solar System object catalog with real-time data
  • Notable exoplanet database
  • Distance calculations and tracking
  • Quick facts and observation windows

โญ Favorites & Sharing

  • Save any image, object, or observation
  • Export favorites as JSON
  • Share functionality with system integration

โš™๏ธ Settings

  • NASA API key configuration
  • Dark/Light theme switching
  • Metric/Imperial units
  • Location defaults
  • Performance modes and caching

๐ŸŒ Web demo

The live demo at https://guildmasterdev.github.io/Astronomer/ runs the same UI directly in the browser โ€” no download required. A few notes:

  • It defaults to NASA's shared DEMO_KEY, which has tight hourly rate limits. A one-minute signup at https://api.nasa.gov/ yields a free personal key; drop it into Settings โ†’ NASA API Key and the demo-mode banner disappears.
  • Favorites and settings persist to localStorage, so they stay on the device you used.
  • Everything astronomical โ€” twilight, moon phase, planet positions, ISS passes โ€” runs client-side via astronomy-engine and satellite.js.
  • Location can come from the browser's Geolocation API (you'll be prompted) or from a manual entry.

The desktop build remains the better option for heavy usage (no CORS constraints, persistent encrypted store, native dialogs).

๐Ÿ”’ Security Features

  • Context Isolation: Enabled by default
  • Sandbox Mode: All renderer processes sandboxed
  • CSP Headers: Strict Content Security Policy
  • API Whitelisting: Only approved endpoints accessible
  • Rate Limiting: Built-in request throttling
  • No Remote Code: No external script execution

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 20+
  • npm
  • NASA API Key (optional, uses DEMO_KEY by default โ€” configure in the in-app Settings)

Installation

# Clone the repository
git clone https://github.com/guildmasterdev/Astronomer.git
cd Astronomer

# Install dependencies
npm install

# Run the desktop app
npm run dev

Get Your NASA API Key

  1. Visit api.nasa.gov
  2. Register for a free API key
  3. Add it in Settings โ†’ NASA API Key (desktop or web)

๐Ÿ“ฆ Building

# Desktop production build (TypeScript + Vite renderer)
npm run build

# Package desktop app for a specific platform
npm run pack:mac
npm run pack:win
npm run pack:linux

# Static web build (output: dist-web/)
npm run build:web
npm run preview:web   # local preview

๐ŸŽฎ Keyboard Shortcuts

Shortcut Action
1-6 Switch tabs (Explore, Birthday, Observe, Objects, Favorites, Settings)
Cmd/Ctrl+F Focus search
Cmd/Ctrl+K Quick actions
R Refresh current view
Cmd/Ctrl+E Export favorites
Esc Close modal

๐Ÿ—๏ธ Architecture

Astronomer/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ main/           # Electron main process
โ”‚   โ”‚   โ”œโ”€โ”€ main.ts     # App entry point, BrowserWindow + CSP
โ”‚   โ”‚   โ”œโ”€โ”€ menu.ts     # Application menu
โ”‚   โ”‚   โ”œโ”€โ”€ store.ts    # Persistent storage (electron-store)
โ”‚   โ”‚   โ”œโ”€โ”€ ipc.ts      # IPC handlers
โ”‚   โ”‚   โ”œโ”€โ”€ endpoints.ts # API whitelist
โ”‚   โ”‚   โ”œโ”€โ”€ astronomy.ts # Sun/moon/planet compute
โ”‚   โ”‚   โ”œโ”€โ”€ iss.ts      # TLE + SGP4 pass prediction
โ”‚   โ”‚   โ””โ”€โ”€ rate-limiter.ts
โ”‚   โ”œโ”€โ”€ preload/        # Secure context bridge
โ”‚   โ”‚   โ””โ”€โ”€ preload-simple.js
โ”‚   โ”œโ”€โ”€ renderer/       # UI (vanilla JS, shared by desktop + web)
โ”‚   โ”‚   โ”œโ”€โ”€ index.html
โ”‚   โ”‚   โ”œโ”€โ”€ styles.css
โ”‚   โ”‚   โ”œโ”€โ”€ app-complete.js   # application logic
โ”‚   โ”‚   โ””โ”€โ”€ public/vendor/    # bundled Leaflet
โ”‚   โ””โ”€โ”€ web/            # Static browser build
โ”‚       โ”œโ”€โ”€ index.html  # web shell with demo banner
โ”‚       โ”œโ”€โ”€ main.js     # window.astronomer shim + loader
โ”‚       โ””โ”€โ”€ prepare.mjs # stages shared renderer assets
โ”œโ”€โ”€ dist/               # Compiled desktop output
โ”œโ”€โ”€ dist-web/           # Compiled web output
โ””โ”€โ”€ dist-electron/      # Packaged installers

๐Ÿ”ง Development

npm run dev        # Compiles TS then launches Electron
npm run dev:vite   # Vite-hosted renderer (for live reload)
npm run build:web  # Static web build
npm test           # vitest
npm run test:e2e   # playwright
npm run lint       # ESLint 9 (flat config)
npm run typecheck  # tsc --noEmit

API Endpoints

The app uses these NASA and astronomy APIs (whitelisted in both the desktop CSP and the web fetch adapter):

  • NASA APOD API
  • NASA Image and Video Library
  • NASA EPIC API
  • JPL Horizons API
  • ISS Location API (wheretheiss.at)
  • ISS TLE (tle.ivanstanojevic.me)
  • NASA Exoplanet Archive

๐Ÿ” Privacy & Security

  • No tracking: Zero telemetry by default
  • Local storage: All data stored locally (electron-store on desktop, localStorage in the web demo)
  • No accounts: No user accounts or cloud sync
  • Whitelisted APIs: Desktop builds route every external call through a validated allow-list; CSP blocks everything else
  • Open source: Full code transparency

๐Ÿค Contributing

Contributions are welcome! Please read our contributing guidelines before submitting PRs.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“ License

MIT License โ€” see LICENSE file for details.

๐Ÿ™ Credits

  • NASA APIs for providing amazing space data
  • astronomy-engine for celestial calculations
  • satellite.js for SGP4/SDP4 propagation
  • Electron team for the framework
  • All contributors and testers

๐Ÿ“ฎ Support


Built with โค๏ธ for space enthusiasts everywhere