Web Application · Astronomy
A full-stack single-page application delivering real-time astronomical calculations — sunrise, tides, moon phases, planets, and more — for any city on Earth, any date.
Ten dedicated views, each backed by a precision astronomy API.
Exact rise and set times with a parabolic altitude chart, sun direction compass, real-time altitude and distance, and a full monthly table.
Moon events with illumination percentage, phase name, altitude arc chart, direction, and distance. Noon / Now toggle updates all values in real time.
Civil, nautical, and astronomical twilight periods displayed on a midnight-to-midnight stacked bar chart and a segmented donut showing the current period.
New moon, first quarter, full moon, and last quarter with exact times, a monthly illumination table, and a donut chart scaled to the lunar cycle.
Precise solstice and equinox dates and times for the current year, with duration of each season and a circular chart aligned to the calendar year.
Real-time altitude, direction, rise/set, and distances to Earth and Sun for all seven naked-eye planets, plus a grouped bar distance chart.
High and low tide predictions from the EOT20 global ocean tide model. Smooth spline chart with height in metres, available for 1 500+ coastal cities.
Daily major and minor solunar periods, overall activity rating, and moon phase — useful for planning fishing, hunting, and wildlife observation.
All events for the day merged into a single chronological feed — a consolidated view replacing twelve separate API requests with one aggregated endpoint.
Current local time in major cities worldwide with time-zone comparison. Persists the user's city selection across sessions via cookies.
Modern frontend built on Vue 2 with a Python/Django astronomy backend.
Clean separation across four layers with a caching strategy optimised for SEO and API cost.
Engineering decisions worth noting.
Custom canvas chart engine. All seven data visualisations are drawn directly on HTML5 Canvas with no chart library dependency — stacked bar charts, parabolic altitude arcs, grouped bar charts, SVG donut charts — all with full HiDPI/retina support via devicePixelRatio scaling and ResizeObserver redraws.
Noon-defaulting caching strategy. All point-in-time API requests default to noon, ensuring responses are cache-hit regardless of when users visit. A midnight cron job pre-warms the cache for the default city. Users can switch to live "Now" mode with a single click.
Journal endpoint fan-out elimination. The Astronomic Journal originally fired twelve parallel API requests. A dedicated /astra/journal/ backend endpoint now aggregates, sorts, and injects a "Now" marker in a single round-trip, with an RSS feed for subscribers.
Component architecture refactor. The original monolithic AstroDashboard.vue was split into ten independent tab components sharing a common astroTab mixin for location state, date range helpers, and Noon/Now toggling — reducing per-file complexity and enabling per-tab lazy behaviour.
Adaptive tide loading. Tide prediction time varies by server RAM. The backend automatically selects eager or lazy ephemeris loading based on available memory (8 GB → eager, 4 GB → lazy chunk loading), giving consistent response times across hardware configurations.
Geolocation with visited city history. Browser geolocation feeds into a reverse-geocode lookup that enriches the city object with formatted coordinates, country flag emoji, and timezone slug. The last five visited cities are persisted in a cookie and surfaced as quick-select badges in the city picker.