{"id":46456443,"url":"https://github.com/nikosalonen/hsl-ticket-optimizer","last_synced_at":"2026-03-06T01:58:53.850Z","repository":{"id":310521155,"uuid":"1040187266","full_name":"nikosalonen/hsl-ticket-optimizer","owner":"nikosalonen","description":"Which HSL ticket is the most cost effective?","archived":false,"fork":false,"pushed_at":"2026-02-27T12:34:57.000Z","size":318,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-27T14:10:57.167Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://nikosalonen.github.io/hsl-ticket-optimizer/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nikosalonen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-18T15:30:53.000Z","updated_at":"2026-02-27T12:35:01.000Z","dependencies_parsed_at":"2025-08-18T17:48:40.256Z","dependency_job_id":null,"html_url":"https://github.com/nikosalonen/hsl-ticket-optimizer","commit_stats":null,"previous_names":["nikosalonen/hsl-ticket-selector"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nikosalonen/hsl-ticket-optimizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikosalonen%2Fhsl-ticket-optimizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikosalonen%2Fhsl-ticket-optimizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikosalonen%2Fhsl-ticket-optimizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikosalonen%2Fhsl-ticket-optimizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikosalonen","download_url":"https://codeload.github.com/nikosalonen/hsl-ticket-optimizer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikosalonen%2Fhsl-ticket-optimizer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30158600,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T22:39:40.138Z","status":"ssl_error","status_checked_at":"2026-03-05T22:39:24.771Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-03-06T01:58:53.468Z","updated_at":"2026-03-06T01:58:53.839Z","avatar_url":"https://github.com/nikosalonen.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HSL Ticket Optimizer\n\nFind the most cost‑effective HSL public transport ticket based on your zones, trips per week, and municipality. The app fetches prices from HSL and compares Single, Series (10/20), Season (30d), and Continuous (saver subscription) options.\n\n## Tech stack\n- Vite + TypeScript\n- Chart.js for charts\n- Tailwind CSS v4 + daisyUI for UI\n- Biome for linting \u0026 formatting\n- Vitest + jsdom for tests\n- i18n support (Finnish, English, Swedish)\n\n## Getting started\n```bash\n# Install deps\npnpm install\n\n# Start dev server\npnpm run dev\n\n# Run unit tests\npnpm test\n\n# Run tests in watch mode\npnpm run test:watch\n\n# Run tests with UI\npnpm run test:ui\n\n# Type-check\npnpm run type-check\n\n# Lint\npnpm run lint\n\n# Lint and auto-fix\npnpm run lint:fix\n\n# Format\npnpm run format\n\n# Check formatting\npnpm run format:check\n\n# Build for production\npnpm run build\n\n# Preview production build\npnpm run preview\n```\n\n## Usage\n1. Select zones (AB/ABC/ABCD/BC/BCD/CD/D), your home municipality, and trips per week.\n2. Submit the form to see:\n   - Comparison cards for each option with monthly/annual costs\n   - Expandable calculation details showing cost formulas per option\n   - Waste warnings when series ticket journeys would go unused\n   - Monthly cost comparison bar chart\n   - Cost vs. trips per week line chart (expandable to full-screen)\n3. Additional controls:\n   - Language selector (fi/en/sv) — persisted in localStorage, also via `?lang=` URL param\n   - Light/dark theme toggle (defaults to system preference)\n   - Monthly/annual cost view toggle\n   - Summer vacation checkbox (reduces annual costs by 1 month)\n\n## Pricing logic\n- Season: 30‑day price from HSL.\n- Continuous: prefers saver subscription (12‑month commitment). If unavailable, falls back to regular continuous, otherwise 5% discount from season.\n- Series:\n  - 10x: validity 30 days\n  - 20x: validity 60 days\n  - Availability filtered by your trips/week to reduce waste.\n\n## Zones\nThe UI uses zone letters; the app converts them to HSL API codes internally:\nAB→11, ABC→12, ABCD→13, BC→21, BCD→22, CD→31, D→40.\n\n## Troubleshooting\n- If charts overlap on re‑render, existing instances are destroyed before creating new ones.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikosalonen%2Fhsl-ticket-optimizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikosalonen%2Fhsl-ticket-optimizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikosalonen%2Fhsl-ticket-optimizer/lists"}