A heurestic predictive data model project to see if going to the cabin is worth the trip.

Mökkisää

Cottage weather oracle built with weather data, modelling and production infrastructure. Status: Published
Demo image for Mokkisaa project
Demo image for Mokkisaa project

Problem

People rarely think about weather as a set of independent variables. Nobody says, "The temperature will be 21 degrees, the wind 4 meters per second and rainfall 0.7 millimeters, therefore happiness equals 82 percent." Instead, we make intuitive judgments. Looks excellent. Could be better. Maybe next weekend. Absolutely not. The goal of the project was to teach a computer to make a similar judgment. Not to predict weather in the strict meteorological sense, but to estimate whether the overall conditions are likely to feel favorable for cottage life. A slightly opinionated weather butler.

What I built

A professional Full-Stack weather intelligence platform that transforms historical FMI (Finnish Meteorological Institute) mass data into weighted cottage-life suitability forecasts. This project demonstrates a modern decoupled architecture: a high-performance **Python/FastAPI** analytical engine integrated with a reactive **React.js** frontend.

What I learned

Full-stack development and architecture AI assisted development best practices Linux / Bash as a development environment (LOVE IT!!!) Herzner server deployment Docker deployment Codeberg repos Heurestical statistical modeling Relational database design with loads of automated features and hierarchical layers

Next iteration

Will focus on automation, validation and depth of information. Coming out end of May,

Roadmap

  • [planned] Data layer re-do
  • [planned] New data source for short term predictions
  • [planned] Validation
  • [planned] Machine learning
  • [planned] Depth of information

Build log

May 7, 2026

10: Current State

Cottage Weather Oracle now operates as: A self-hosted full-stack application A statistical weather intelligence engine A mobile-friendly web interface An automated deployment system A production-ready platform The project combines data engineering, probabilistic modelling, frontend development, infrastructure design and operational automation into a single coherent application.

May 7, 2026

9: System Integration & End-to-End Validation

Once the data was in place, the more interesting question emerged: how should the system interpret it? Several important modelling decisions were made. Daily averaging Early versions relied too heavily on isolated peaks and anomalies. A brief sunny interval could make an otherwise miserable day appear attractive. By this stage, the project had become a coherent operating system rather than a collection of scripts. The full chain was verified repeatedly: Local development Git push to Codeberg Webhook-triggered deployment Container rebuild HTTPS validation Health checks Live production updates Multiple successful deployment cycles confirmed that the system was both technically sound and operationally reliable.

May 7, 2026

8: Mobile UI & Layout Stabilization

Responsive design always seems simpler in theory than in practice. The mobile interface required substantial work to address: 100vh inconsistencies Safe-area issues Fixed-position overlays Scrolling constraints Layout collisions Absolute full-screen overlays were replaced with scrollable layouts, multi-column components were collapsed into single-column flows, and performance problems caused by fixed background attachments were removed. The result was a mobile experience that behaved like a proper application rather than a desktop prototype wearing a smaller hat.

May 7, 2026

7: Rollback & Operational Safety

Automation is useful only if mistakes are easy to undo. A rollback.sh script was introduced to restore the last known working commit. This reduced recovery from a potentially stressful debugging session to a single command. It also reinforced an important operational principle: Production is controlled, not edited directly.

May 7, 2026

6: CI/CD Pipeline (Webhook-Based)

Codeberg is an excellent Git hosting platform, but it does not provide the same built-in automation tools as some larger platforms. That turned out to be a feature rather than a limitation. A lightweight deployment pipeline was built from first principles: git push → Codeberg webhook → secure server endpoint → deploy.sh → Docker rebuild → live application The solution includes: A Python webhook listener Shared secret validation HTTPS protection A persistent systemd service Deploy locking Structured logs via journalctl In practice, a git push now updates the production application automatically. There is something deeply satisfying about that.

May 7, 2026

5: Production Deployment & Infrastructure Hardening

A project becomes more interesting the moment it leaves the safety of a laptop. The application was containerized using Docker and deployed to a Hetzner Cloud server running Ubuntu 24.04. The frontend runs in an Nginx container, the backend in a FastAPI container, and Caddy handles reverse proxying and automatic HTTPS via Let's Encrypt. Health checks were added to ensure that services start in the correct order and that the frontend only launches once the backend is ready. This was the point where the project moved from "works on my machine" to "works on a server, repeatedly and without drama."

May 7, 2026

4: Full-Stack Transformation (Current)

At this point the project was still essentially an analytical engine. Useful, but not especially friendly. The next step was to turn it into a full web application. The backend was rebuilt as a FastAPI service exposing forecast endpoints through a REST API. The frontend was developed with React, Vite, Tailwind CSS and Framer Motion. The user interface evolved into a clean, animated experience designed to make probability feel approachable rather than intimidating.

May 7, 2026

3: Statistical Modeling (The Oracle)

Once the data was in place, the more interesting question emerged: how should the system interpret it? Several important modelling decisions were made. Daily averaging Early versions relied too heavily on isolated peaks and anomalies. A brief sunny interval could make an otherwise miserable day appear attractive. The model was shifted to daily averages so that the general character of the day would matter more than short-lived spikes. Regional fallback logic Not every Finnish municipality has a conveniently located weather station. When local data is missing, the system automatically constructs a regional average from nearby stations. This allows the application to provide meaningful forecasts for the entire country rather than only for well-instrumented locations. Input hardening Dates are validated carefully, and future requests are mapped to corresponding historical patterns. In other words, the model asks: what has this time of year usually been like in this location?

April 5, 2026

1-2: Data Infrastructure & Integrity

Every forecasting system begins with data, and weather data is rarely as tidy as one might hope. The first step was to design a SQLite database capable of storing large volumes of FMI observations while remaining lightweight and fast enough for local experimentation. The data pipeline was built to: Download and import bulk weather data Resume automatically after interruptions Remove duplicates Validate observations Normalize values for analysis This stage was not particularly glamorous, but it established the foundation on which everything else depended. As with plumbing, one tends to appreciate it most when it does not leak.