Real-time train tracking visualization for Hungarian public transport. This application collects and displays train positions, delays, schedules, and other related data through an undocumented public transport API.
- Real-time train tracking
- Delay information and schedule data
- Interactive map visualization
- Historical data collection
- Flexible data distribution:
- S3-compatible storage support (e.g., Cloudflare R2)
- Local file system storage
- Highly configurable client application:
- Adjustable update intervals
- Configurable API endpoints and parameters
This project pays tribute to holavonat.hu, the first open-source project that pioneered third-party train tracking visualization in Hungary. Unfortunately, due to concerns about potential governmental actions, the original author had to discontinue the service. Their courage to innovate and their commitment to open-source principles continue to inspire this and similar projects.
The application is configured using a YAML file. Here's a detailed explanation of the configuration parameters:
GraphqlEndpoint: "https://example.com/graphql" # Upstream API endpoint
Output:
NamePrefix: "data" # Base filename for outputs
Format:
JSON: true # Currently only JSON is supported (future: ProtoBuf)
Archive: true # Enable ISO8601 suffixed archive files
When Archive is enabled, files are saved as: {NamePrefix}_{ISO8601}.json
ObjectStorage:
Compression: "br" # Supported: gzip, br, zstd (default: none)
AccessKeyID: "<access-key>"
SecretAccessKey: "<secret-key>"
BucketName: "<bucket-name>"
ObjectPath: "<optional-path>"
EndpointURL: "<s3-endpoint>"
PublicEndpointURL: "https://cdn.example.com"
File:
Path: "/path/to/output" # Output directory (created if not exists)
Headers:
User-Agent: "holavonatis/v0.0.1 (https://instance.example.com/)"
Referrer: "https://instance.example.com/"
Origin: "https://instance.example.com"
Cron:
Mode: "fix" # Options: "fix" or "window"
Duration: "second" # Options: "second", "minute", "hour"
Fix:
Interval: 30 # Run every 30 seconds
# OR for window mode:
# Window:
# Min: 30 # Minimum interval
# Max: 45 # Maximum interval (random selection)
Source:
Origin: "https://instance.example.com/" # Instance visualization URL
Latest: "https://instance.example.com/" # Base URL for latest data
Schema:
Version: "v0.0.1" # Schema version
Link: "https://instance.example.com/schema.json"
Format: "json" # Currently only JSON supported
Network:
Proxy: "socks5://127.0.0.0:3124" # Optional proxy for API communication
For a complete example, see config_example.yaml.
Currently Available: A live data feed is accessible at https://cdn.holavonat.is/train_data_v3.json
- CORS Policy: Unrestricted (
*
) - accessible from any domain - Format: JSON (following the v3 schema)
- Update Frequency: Real-time updates (typically every 60 seconds)
- Public Use: Available for third-party applications and research
- No Service Guarantee: The data feed may become unavailable at any time without notice
- Data Accuracy: The authors cannot guarantee the accuracy, completeness, or timeliness of the data
- No Liability: Users of this data source assume all responsibility for its use
- Third-Party Risk: The underlying data comes from an undocumented API and is subject to the same risks outlined in the main disclaimer
- Implement proper error handling for data unavailability
- Cache data locally when possible to reduce dependency
- Consider this a convenience service, not a guaranteed API
- Always have fallback mechanisms in your applications
For schema information, see internal/api/schema.go.
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). This means:
- You can freely use, modify, and distribute this software
- If you modify and distribute the software, you must:
- Make your modifications available under the AGPL-3.0
- Provide the complete source code to users who interact with the software over a network
- Include the original copyright notice and license
For the complete license terms, see the LICENSE file.
This project uses the following third-party data and services:
- OpenStreetMap: © OpenStreetMap contributors. The map data is available under the Open Data Commons Open Database License (ODbL).
- OpenRailwayMap: © OpenRailwayMap and contributors. The railway data is available under the Open Data Commons Open Database License (ODbL).
- Leaflet: © Vladimir Agafonkin. Leaflet is used for map rendering and is available under the BSD 2-Clause License.
For complete licensing information of all dependencies, please refer to the vendor directory and respective package licenses.
By using this software, you acknowledge and agree to the following:
-
This application interfaces with an undocumented API that was not officially intended for third-party use.
-
Risks:
- The API provider may restrict or block access at any time without notice
- The API provider may take legal action against end users
- The API provider may seek damages for unauthorized API usage
- The application may cease to function without prior notice
-
No Warranty:
- The software is provided "AS IS" without warranty of any kind
- The authors make no warranties regarding functionality, reliability, or legality
- No guarantee of continued functionality or service availability
-
Liability and Indemnification:
- Users assume all risks associated with using this software
- The authors are not liable for any damages or legal consequences
- Users agree to indemnify and hold harmless the authors from any claims
By using this software, you accept all these terms and conditions. If you do not agree, you must not use this software.
For complete terms, please see the EULA file.