Files
padelnomics/CHANGELOG.md
Deeman fa09fc81c9 add CI/CD pipeline with blue-green deployment
GitLab CI runs pytest + ruff on master/MRs, then auto-deploys via SSH.
Blue-green strategy using Docker Compose profiles with an nginx router
on port 5000 for zero-downtime switching between slots.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 14:39:15 +01:00

2.5 KiB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog.

[Unreleased]

Added

  • Server-side financial calculator (planner/calculator.py) — ported JS calc(), pmt(), calcIRR() to Python so the full financial model is no longer exposed in client-side JavaScript
  • POST /planner/calculate endpoint for server-side computation
  • Pre-computed initial data (window.__PADELNOMICS_INITIAL_D__) injected on page load for instant first render
  • Debounced API fetch pattern in planner.js with AbortController for in-flight request cancellation
  • Computing indicator CSS (.planner-app--computing) with subtle "computing..." text
  • Comprehensive test suite for calculator (tests/test_calculator.py — 227 tests) covering all 4 venue/ownership combos, edge cases, and Hypothesis property-based fuzzing
  • Comprehensive billing test suite (371 tests total):
    • tests/conftest.py — shared fixtures (DB, app, clients, subscriptions, webhook helpers)
    • tests/test_billing_helpers.py — unit tests for SQL helpers, feature/limit access, plan determination (60+ tests + parameterized + Hypothesis)
    • tests/test_billing_webhooks.py — integration tests for LemonSqueezy webhooks (signature verification, all lifecycle events, Hypothesis fuzzing)
    • tests/test_billing_routes.py — route tests (pricing, checkout, manage, cancel, resume, subscription_required decorator)
    • Added hypothesis>=6.100.0 and respx>=0.22.0 to dev dependencies for property-based testing and httpx mocking
    • Factored into Copier template — all billing tests now generate as .jinja templates with provider-specific conditionals for Stripe, Paddle, and LemonSqueezy
  • GitLab CI/CD pipeline (.gitlab-ci.yml) — runs pytest + ruff on master/MRs, auto-deploys on master
  • Blue-green deployment with Docker Compose profiles (docker-compose.prod.yml, deploy.sh)
    • nginx router on port 5000 proxies to active blue/green slot
    • Zero-downtime: new slot health-checked before traffic switch
    • Automatic rollback on failed health check

Changed

  • planner.js no longer contains calc(), pmt(), or calcIRR() functions — computation moved server-side
  • render() split into render() (tab switching + schedule calc) and renderWith(d) (DOM updates from data)
  • Tab switching now renders from _lastD cache (instant, no API call)
  • Slider input triggers 200ms debounced server call instead of synchronous client-side calc