← Back to Insights

The Human, The AI, and The Code: Building JustInterval

By Magne & Gemini Jan 13, 2026

Most apps are built with a clear business plan. JustInterval was built with a clear learning plan.

Magne (33) Technology Consultant

Cycling enthusiast with the vision (and the legs).

Gemini Large Language Model

The coder without a bicycle.

This is the story of how we built a functional, serverless smart trainer controller from scratch—not to disrupt the market, but to understand how the pieces of modern web development actually fit together.

The Origin: Thursday Night Spin

The requirement specification came directly from a spinning room at the Velodrome in Sola. Magne instructs a high-intensity class for his local cycling club every Thursday. The existing tools on the market were either overly complex subscription services or poorly designed free tools that didn't work well in a dark room.

We needed something specific:

The Technical Challenge: Taming Bluetooth (FTMS)

We chose a "Vanilla" tech stack: standard HTML, CSS, and JavaScript hosted on Firebase. No complex frameworks like React or Vue—just raw code to keep the learning curve focused on the fundamentals.

The interval timer part was easy to develop and quick to deploy. Magne could even write some of the code, and when vibing with Gemini, the development went super quick, and the value was realized in a matter of hours.

However, the first time it was shown in a spin class, it did not work because I had already started to develop new features. But the framework was built.

The biggest technical hurdle was the Web Bluetooth API and the FTMS (Fitness Machine Service) protocol. Browsers can now talk directly to hardware, but the conversation is complex.

We spent hours and evenings debugging Hex codes and Byte arrays. A smart trainer doesn't just "set watts"; it requires a specific handshake, a request for control, and a precise data stream. If you send the wrong byte, the trainer disconnects. It was a tedious process of trial and error, reading protocol documentation, and creating a "Debug Console" in the app just to see what the hardware was screaming back at us.

The AI Pivot: From Assistant to Partner

This project began using the built-in AI assistant within the Firebase console. It was useful for snippets, but it struggled with "Project Context." It would often forget the file structure or suggest code that conflicted with logic we wrote an hour prior.

Midway through development, we shifted to the external Gemini Advanced model. The difference in stability was immediate. The external model could hold the entire logic of our Bluetooth state machine in memory. It stopped guessing and started reasoning. This shift was crucial for implementing the complex logic required to handle connection drops and re-connection attempts without refreshing the page.

The AdSense "Game"

While the app displays ads, the goal isn't huge revenue—it's understanding the ecosystem. We quickly learned that "putting ads on a site" is not a 5-minute task; it's a compliance project.

Google’s Webmaster policies are strict. To get approval, we had to build a robust infrastructure around the app itself: privacy policies, cookie banners, and layout stability checks. We treated the AdSense approval process as a gamified learning module: Can we build a site technically sound enough to pass Google's reviews?

The Goal

JustInterval is a "Learning Laboratory." It creates a space to experiment with Generative AI, web standards, and user experience design. The ads pay for the hosting, the code teaches us the logic, and the spin class gets a timer that actually works.