All posts

Building in public / Upstream

Upstream: looking for open source’s next breakout

Why I’m building a radar for emerging GitHub projects, with a seven-day forecast that has to earn its predictions.

By Ishaan Saraswat5 min read
A sketch of the idea: observe the past, then test a forecast. Illustration only; not measured data or a confidence interval.

Somewhere on GitHub, a project you’ve never heard of is starting to take off. The interesting question is whether we can notice the change early enough to do something with it. That’s the idea behind Upstream.

The interesting part is the change

A star count tells a story about everything that has already happened to a repository. It’s a useful signal, but it compresses years of attention into one number. A project with 50,000 stars might be holding steady. A project with 500 might be entering the most interesting week of its life.

I’m building Upstream to make that second story easier to find. I want a way to explore open source through movement: which tools are picking up speed, which are sustaining it, and which deserve a closer look before they appear on everyone’s radar. For a developer deciding what to learn or try next, that feels like a much more interesting starting point than a leaderboard of all-time totals.

The goal is discovery, not a verdict on software quality. Stars measure a kind of attention. They don’t tell you whether a library is reliable, whether people keep using it, or whether its maintainers can support it. A good signal should give you a reason to investigate, not make the decision for you.

First, build a memory for GitHub

You can’t measure momentum from a single snapshot. Upstream discovers public repositories, saves observations over time, and turns that history into dashboards, trend views, repository charts, and a watchlist. Popularity, measured momentum, and early discovery each get their own place in the product.

Underneath the interface is a Next.js frontend, a FastAPI service, PostgreSQL for the historical record, and Redis with Celery for background collection. The less visible details matter just as much: budgeted GitHub requests, rate-limit handling, conditional requests, and repository identities that survive a rename.

I’ve kept observations immutable so a later update doesn’t quietly rewrite the past. Coverage matters too. If collection misses a stretch of time, the system should acknowledge the gap instead of drawing a confident-looking trend through it. The historical record is the foundation for everything that comes next.

Then ask a harder question: what happens next?

Upstream Forecast pushes the idea one step further: which repositories might experience unusually strong growth over the next seven days? That turns a discovery tool into an experiment with an outcome we can actually check.

“Unusual” needs a definition. The initial target requires a repository to gain at least 20 net stars, at least 2% of its starting star count, and at least 1.5 times its average weekly growth over the previous two weeks. All three conditions must hold. These are starting product assumptions, not universal laws of open source, but they give the experiment a concrete target.

The first forecasting model is deliberately understandable. It starts from the most recent week’s star-growth rate and adjusts for the change from the preceding week, with a cap on that adjustment. It needs at least two weeks of sufficiently covered history. Its breakout score is a ratio against the target, not a probability.

Every eligible daily prediction is saved before its outcome is known. Seven days later, Upstream compares it with what happened. Missing outcomes stay missing. A prediction can’t improve retroactively just because the repository became popular. That constraint is one of my favorite parts of the project: the system has to commit to its answer, then wait.

Teaching the model without giving it the answers

The next layer is a supervised ML pipeline. I’ve implemented a regularized logistic classifier that uses six features derived from information available at prediction time, including repository size, recent and previous star velocity, relative growth, and acceleration. It learns to estimate the chance of meeting the seven-day breakout target. The separate numerical star-growth projection still comes from the trend baseline.

Starting with a small model makes the experiment easier to inspect. Before adding complexity, I want to know whether the history we already collect contains useful predictive information. If a simple model can’t beat a reasonable baseline, a more elaborate architecture shouldn’t get a free pass.

The difficult part is keeping tomorrow out of today’s training data. A random split could mix closely related forecasts from the same repository across training and testing. Instead, the pipeline divides history chronologically into training, calibration, and final test periods. It removes examples whose outcomes cross split boundaries and excludes overlapping outcome windows for each repository within a partition.

Calibration uses a separate, later period to adjust the probabilities. The final test period stays out of fitting. Evaluation checks how useful the ranking is, including precision among the top 20 candidates per day. It also checks how well the probabilities match outcomes. A candidate has to clear minimum evidence and baseline-comparison checks before it can be activated.

Training produces a versioned JSON artifact and an evaluation report. The application has a model registry, explicit activation, and a way to roll back to the trend model. That makes the pipeline more than a notebook that prints a score: it connects collecting evidence, fitting a model, reviewing the result, and serving a specific version.

The machinery works. The hypothesis is still open.

As of this post, the application, experimental trend forecast, and ML training pipeline are implemented. Synthetic smoke runs exercise the training machinery, but no model has been trained or activated on real collected outcomes yet. There is no established real-world predictive accuracy to report.

The next milestone is continuous collection across a varied set of repositories, followed by enough matured seven-day outcomes to train and evaluate honestly. The first labels can appear after roughly three weeks of covered collection; a useful pilot needs substantially more history and enough examples of both breakouts and ordinary weeks.

There are plenty of ways the idea could fail. A launch or viral post can change a project’s trajectory overnight. A sampled set of repositories can introduce bias. Attention can fade as quickly as it arrives. Those are reasons to measure the system carefully and learn where the signal holds up.

What makes Upstream exciting to me is the whole loop: turn a stream of activity into a historical record, turn that record into a testable prediction, and let the next seven days tell us whether it helped. If it works, it could make emerging tools easier to discover. Either way, it’s a chance to build a system that learns from being wrong.

Back to the blog