How qimingtian/pomfret-astro-website works
Pomfret Astro is a multi-observatory platform for member imaging requests, weather-aware scheduling, and autonomous observatory operation. Members submit sessions through the Remote dashboard; the server stores requests, reconciles them against weather and target constraints, and delivers eligible NINA sequences to an on-site agent. The agent runs imaging and reports progress; the app tracks completion and exposes session files. Other major capabilities include site membership and administration, planning and astronomy tools, weather and sky-camera views, and member galleries. The graph follows README-documented flows and sampled route calls; unsampled subsystem wiring is omitted.
Main entry points: nina_agent.py Observatory agent · tonight-weather-prediction/route.ts Weather forecast API · nina-sequence/route.ts NINA sequence API · store.ts Queue store
Components 29
Member access
- Remote dashboard
components/remote/remote-page.tsx - Member account
app/dashboard/account/page.tsx - Authentication API
app/api/auth/login/route.ts - Member store
lib/member-store.ts - Postgres
- Admin tools
app/dashboard/admin/page.tsx - Membership requests
app/api/admin/imaging-requests/route.ts
Planning and weather
- Weather gate
lib/tonight-weather-gate.ts - Weather forecast API
app/api/imaging/tonight-weather-prediction/route.ts - Weather dashboard
components/weather/ObservatoryWeatherDashboard.tsx - Plan workspace
components/plan/plan-page.tsx - Target and sky tools
lib/variable-star-catalog.ts - Camera and sky views
components/AllSkyCameraView.tsx
Imaging operations
- Imaging request API
app/api/imaging/queue/route.ts - Queue store
lib/imaging/queue/store.ts - Project planner
lib/imaging/project/planner.ts - Queue reconcile
lib/imaging/queue/reconcile.ts - NINA sequence API
app/api/imaging/nina-sequence/route.ts - Progress webhook
app/api/imaging/session-progress/route.ts - Session board
lib/imaging/session/board.ts
Observatory services
- Observatory agent
observatory/nina_agent.py - NINA and PDU
- Upstash Redis
- All-sky camera
observatory/camera_service.py
Media and results
- Cloudflare R2
- Session downloads
app/api/imaging/download/route.ts - Gallery submissions
app/api/member/gallery-submissions/route.ts
Other components
- Member
- Weather services
Connections 29
- Member → Remote dashboard: uses
- Remote dashboard → Imaging request API: submits request
- Imaging request API → Queue store: creates request
- Imaging request API → Project planner: plans project
- Project planner → Queue store: updates schedule
- Weather dashboard → Weather forecast API: requests forecast
- Weather forecast API → Weather services: fetches forecast
- Weather forecast API → Weather gate: evaluates conditions
- Weather forecast API → Queue reconcile: may reconcile
- Plan workspace → Target and sky tools: uses target data
- Observatory agent → NINA sequence API: polls sequences
- NINA sequence API → Queue store: reads queued work
- NINA sequence API → Session board: marks delivered
- NINA sequence API → Observatory agent: returns sequence
- Observatory agent → NINA and PDU: runs sequence
- Observatory agent → Progress webhook: reports progress
- Progress webhook → Session board: updates completion
- Queue store → Upstash Redis: persists state
- Session board → Upstash Redis: persists state
- Observatory agent → Cloudflare R2: uploads session files
- Member account → Session downloads: requests files
- Session downloads → Cloudflare R2: reads objects
- Member → Authentication API: authenticates
- Authentication API → Member store: verifies account
- Member store → Postgres: reads and writes
- Admin tools → Membership requests: manages requests
- Membership requests → Member store: approves affiliation
- Member → Gallery submissions: submits work
- All-sky camera → Camera and sky views: serves stream