(CASE STUDY · 08)

MOMENTOMONTO

  • Python
  • Streamlit
  • Matplotlib
  • Docker

MomentoMonto checks one URL again and again, with half a second between checks, and shows what comes back: a response time, a status light and a live chart. It is one Python file, built with Streamlit.

ROLE
Design & Development
TIMELINE
6 Weeks
YEAR
2025
TEAM
Solo

(MY ROLE)

  • Built the app in one Streamlit file, from the URL input to the live chart.
  • Wrote the check loop with requests, and the rules for its three server states.
  • Added the alert sound for failed checks, the average, max and min overlay on the chart, and a Docker image.
  • Tuned the interval between checks, the readings kept and the request timeout.
(WHY IT EXISTS)
Watching a server during a deploy meant reading terminal output. MomentoMonto puts one server on one page and redraws it after every check.
(DAY TWO COUNTED BYTES)
On day two it added up header and body bytes every 30 seconds. A day later it timed each request instead. The chart's axis still reads Traffic(Sec).
(AFTER LAUNCH)
It ran on Render, then on Railway, where it read 29.95 ms against haroontrailblazer.vercel.app. Both hosts are offline now. The code is public on GitHub.

Process

  1. 01

    Request & Print

    The first commit sent one GET and printed the response. Everything since grew around that call.

  2. 02

    Timing & Chart

    Each check became one number: the milliseconds between two time.time() calls around requests.get. The session's numbers all go on one matplotlib chart.

  3. 03

    States & Alert

    A failed check plays a sound as well as turning the light red, so it can be noticed without watching the page. A healthy check stays silent.

  4. 04

    Docker & Hosting

    Streamlit runs inside a Docker image, and the repo holds no host config. The Dockerfile is the whole deploy.

How It Works

Paste a URL or an IP. The script adds https:// when it is missing, sends a GET with a 3 second timeout, sorts the answer into one of three states and redraws the page in place. Then it sleeps and checks again.

The Monitor

One column, top to bottom: the input, a response bar, the time in milliseconds, a light, the chart and the status code. The chart is drawn as main.py draws it: the overlay prints milliseconds with an s, and 1 on its Traffic(Sec) axis means 100 ms.

In The Detail

A 200 turns the light cyan, and under 100 ms the bar is full. Any other code, or no answer, turns it red, empties the bar and plays a one-second alert.

Tuning The Loop

51 of the 71 commits landed in the first 10 days. In that time the interval, the number of readings kept and the timeout each changed more than once.

(SCOPE)

lines of Python, in one file
249
server states
3
check intervals tried
6

WHAT THE LOOP WENT THROUGH

Interval
30 s → 10 s → 5 s → none → 0.30 s → 0.5 s
Readings kept
15 → 400 → 17,280 → 86,400 → 400 → 288,000
Timeout
5 s → none → 5 s → none → 3 s
Alert
Looped at first, then played once

One File

The whole product is main.py: one loop, from line 99, that requests the site with a 3 second timeout, sets the status and draws the chart, then sleeps half a second. Here: the chart code that follows the check, the 4 packages it needs, the loop's last lines and the 6-line Dockerfile that runs it.

  1. The chart code

  2. requirements.txt

  3. The loop ends

  4. Dockerfile

Shipped

As shipped at momentomonto.up.railway.app: the landing page, and a live check. The landing page's Privacy Notice says checks happen on your device. They run on the server that hosts the app.