This repository has been officially migrated to Codeberg. Please find all up-to-date source code, issues, and documentation here: 👉 https://codeberg.org/chric/rhygfuehl 👈
☀️ rhygfuehl.ch shows the current Rhine temperature of Basel in a clear app that can be easily accessed via a web browser. The app also shows a simplified temperature history of the last 12 hours and the current air temperature at Untere Rheingasse.
The application uses Astro for pre-rendering a static site with extreme SEO optimization and zero baseline JavaScript.
Every 15 minutes, a GitHub Actions cron job triggers the data/aggregation.py script to fetch the latest Rhine temperatures and water levels from the Open Data Basel-Stadt APIs. The script writes this data into static JSON files.
Immediately after fetching, the GitHub Action builds the Astro site, directly injecting the latest temperatures into the HTML <meta name="description"> tags for immediate SEO indexing, and then deploys to GitHub Pages.
To run this project locally, ensure you have Node.js installed.
-
Install dependencies:
npm install
-
Start the local development server:
npm run dev
The site will be available at
http://localhost:4321. -
Build for production:
npm run build
The static output will be generated in the
dist/directory.
This project has a comprehensive testing suite covering frontend components, end-to-end user flows, and backend logic.
-
Frontend Unit Tests (Vitest):
npm run test:unit
-
E2E Tests (Playwright):
npx playwright install # First time only npm run test:e2e -
Backend Tests (pytest):
pip install -r data/requirements.txt PYTHONPATH=./data pytest tests/backend/
Tests are automatically executed on every Pull Request to master and must pass before any manual code change is deployed. Scheduled data updates skip UI testing to ensure high frequency and reliability.
Contributions, issues and feature requests are welcome! Feel free to check the issues page.
This project is licensed under the MIT License - see the LICENSE file for details.
