Skip to content

Repository files navigation

↟ Preact API Spaceflight Console

A desktop-first launch intelligence workspace with countdowns, mission details, pad mapping, and watchlists.

Preact TypeScript Tailwind CSS Launch Library 2 MapLibre Vite

Deploy with Vercel


✨ Highlights

  • Mission Queue: Lists upcoming launches with provider, countdown, webcast, and saved state.
  • Mission Briefing: Shows imagery, description, launch window, vehicle, destination, and site.
  • Global Pad Map: Maps launches with selected and watchlisted mission context.
  • Provider Filtering: Filters the active queue by agency and mission text.
  • Local Watchlist: Persists watched launch IDs in the browser.
  • Calendar Export: Produces an .ics file for the selected mission.
  • Quota-Aware UX: Uses manual refresh and a bundled snapshot for the public API limit.
  • Responsive Fallback: Stacks queue, briefing, and map on smaller screens.

🧱 Project Structure

public/
|-- favicon.svg
`-- sample-launches.json
src/
|-- app.tsx
|-- index.css
|-- main.tsx
|-- components/
|   |-- launch-map.tsx
|   |-- mission-detail.tsx
|   `-- mission-queue.tsx
|-- domain/
|   `-- launch.ts
`-- services/
    `-- launch-api.ts

🛠️ Tech Stack

  • Preact 10, TypeScript 6, Vite 8, Tailwind CSS 4
  • Prettier 3 for repeatable formatting checks
  • Launch Library 2, ky, and Zod
  • MapLibre GL JS with OpenStreetMap raster tiles
  • Lucide icons

📦 Included Demo Data

public/sample-launches.json provides six synthetic future missions with realistic providers, vehicles, orbits, pads, coordinates, and remote reference imagery.

All bundled missions, dates, providers, vehicles, pads, and coordinates are synthetic. Watchlist IDs remain in local browser storage.

🚀 Local Development

npm install
npm run dev

Open http://localhost:5173.

🔌 API Notes & Nuances

  • Live missions come from Launch Library 2.
  • Anonymous access is currently limited to 15 requests per hour; the UI deliberately avoids polling.
  • Launch requests do not auto-retry, and stale source responses are ignored.
  • Launch dates and status labels are provisional and can change without notice.
  • Calendar export uses the currently published NET value and does not update itself later.
  • Browsers without WebGL2 receive a selectable launch-pad fallback in place of the map.
  • This is a desktop-first operations interface, but all functions remain reachable on mobile.

🧪 Build & Checks

npm run format:check
npm run build
npm run preview
npm audit --omit=dev

🌐 Vercel Deployment

{
  "$schema": "https://openapi.vercel.sh/vercel.json",
  "framework": "vite",
  "buildCommand": "npm run build",
  "outputDirectory": "dist",
  "rewrites": [
    {
      "source": "/(.*)",
      "destination": "/index.html"
    }
  ]
}

📄 License

MIT License. See LICENSE.

Releases

Packages

Contributors

Languages