Inspiration

Any astronomer can tell you that great viewing conditions can be a rare occasion, making it difficult to plan the things you want to observe and capture. For me, dragging out all my equipment and setting it up is not a trivial affair, so I want to have a good idea of the targets I'll actually be able to capture, and how much data I'll be able to gather. There are some great tools out there which assist with planning, but I have not found a satisfactory solution that incorporates my actual surroundings into the predictions for visible targets. Sometimes I have to place my telescope in a position that is not ideal, where a large portion of the sky is blocked by trees or nearby houses.

I wanted to build a planner that answered a much more practical question:

"What can I actually see from my backyard tonight?"

That idea became Asterra... a web application that calculates visibility using a real representation of my horizon instead of assuming I live in a wide open field. The OpenAI Build Week event motivated me to take a crack at building this application using the new GPT 5.6 models.

How I Built It

Most of the work was performed in the Codex desktop app, using a combination of the Sol, Terra, and Luna models by OpenAI.

Asterra is a local-first Progressive Web App built with React 19, TypeScript, Vite, IndexedDB, and Web Workers. I wanted everything from observation sites to planning calculations to remain on the user's device without requiring an account or a powerful backend service.

The application preprocesses the entire 14,033-object OpenNGC catalog into deterministic runtime data, then performs visibility calculations completely in the browser using Astronomy Engine for astronomical positions. Each candidate target is evaluated against:

the observer's custom 360° horizon mask twilight conditions Moon phase and position optional Open-Meteo weather forecasts

To keep planning responsive, calculations run in parallel Web Workers while identical planning sessions are cached locally for nearly instant repeat loads. The result is a planner that works offline after setup, preserves user privacy, and requires no cloud infrastructure.

Challenges

The biggest challenge was the performance for calculating observable targets.

Evaluating thousands of celestial objects across an entire observing night means repeatedly combining astronomical calculations with obstruction geometry and ranking logic. Running all of that entirely in a browser (especially on mobile devices) required a lot of testing, rewriting, and optimization.

Another challenge was making the target recommendations understandable. Rather than showing some kind of mysterious "visibility score," I built a fixed, explainable ranking algorithm that considers observation duration, horizon clearance, darkness, and Moon impact. Weather is a tricky thing to predict with real certainty, so I treat it more as an advisory instead of a weight against the results.

A personal challenge for me was the time in which I was able to spend working on this project. Most of my coding sessions occur late at night, when it's not possible to test one of the primary features: using the camera to define the skyline around my observation site. For that reason, I made the Horizon Editor work with manual adjustments, even though it's not nearly as intuitive. Ultimately the camera functionality came together, but I have only had time to test it on my own mobile device.

What I Learned

The new generation of models by OpenAI are rather impressive, and feel like a real step forward from the rigor of carefully crafting air-tight prompts that force the agents to behave in a (mostly) consistent manner. I found a great deal of success when describing the goals of the application, rather than instructing the agent how to handle implementation.

Having a strong implementation framework in place reduces so much friction when dealing with AI agents. I used a well crafted design spec to generate multiple phased implementation tasks, and saved these to the project with built in tracking for agent progress, deviations from the plan, and lightweight self-improvement instructions. I would say that 80% of the project was constructed with agents simply by telling them to "continue with the next implementation phase". In some cases I had to assist with some troubleshooting or decision making, and near the end it was easier for me to make some simple UI tweaks by hand rather than trying to describe those changes to an agent.

This project also reinforced that modern browsers are capable of far more than what I previously assumed. With careful architecture, deterministic preprocessing, background workers, and thoughtful caching, it's possible to perform sophisticated spatial and astronomical calculations entirely on the client while maintaining privacy and responsiveness.

Accomplishments

This was a fun project, and it involves a couple new accomplishments for me personally. I have never really released any of my projects officially as a product that I intend for others to use and/or contribute to. This is bringing me out of my shell a little bit to become a part of the community I've been lurking in the shadows of for years.

The OpenAI Build Week competition motivated me to act on an idea I had thought of long ago- using my phone's camera to identify a real horizon line for astronomical viewing. This is the first app I have built which leverages a mobile device camera and orientation features to capture input data.

What's next for Asterra

Even if this project doesn't gain a lot of visibility from the competition, I will likely continue to work on improvements as I get time, because I plan to make this app a part of my daily routine. The more streamlined and intuitive I can make it, the better it is doing it's job of informing me where to point my telescope!

Built With

Share this project:

Updates