๐ An unofficial BVG Stations Game
The ideia is to learn more about functional programming & front-end applications with Elm.
Disclaimer don't take the code here too seriously, it's probably crappy since it's my first attempt to build an SPA and also my first app with Elm. ๐
The game is about Subway Stations and Lines from the Berliner Verkehrsbetriebe BVG. The players must guess at least one train Line that cross a given station.
How does it work?
Static SPA served with GitHub Pages
The code of the application is written in Elm. During build, the Elm files are compiled to a single Javascript, application.js
that is served statically, together with raw CSS and HTML files. Everything under dist/
is served with Github Pages, built from the master
branch of this repo to the gh-pages
branch by Travis-CI.
The application also requires data coming from the dist/data
folder, which is generated from the pipeline.
Gathering data for the game
In order to gather information about the stations, a small pipeline was created, heavily inspired by derhuerst work on the VBB libraries.
The output of the pipeline is copied to dist/data/
as JSON files, consumed by the web-application as data source.
Last updated at: 22.01.2022
Help us to improve the codebase
Found a bug? Have a suggestion? Please open an issue.
Want to contribute with code?
- Star the project. โญ๏ธ
- Open or find an issue here
- Fork it (https://github.com/marceloboeira/BVGame/fork)
- Create your feature branch (git checkout -b feature/awesome-parrot)
- Commit your changes
- Push to the branch (git push origin feature/awesome-parrot)
- Create a new Pull Request
Available commands
make run
- Run the webserver athttp://localhost:1928
.make build
- Build theapplication.js
file to thedist/
folder.make setup
- One time setup of dependencies.make setup_pipeline
- Install dependencies for the pipeline. (It's triggered by the setup)make build_pipeline
- Run the pipeline and copy the files to thedist/
folder. (It's triggered by the setup)make test
- Run the tests.make test_watch
- Run the tests watching for changes.make check_format
- Check if the code is formatedmake format
- Format the code following elm standards.
- Data Sources
- derhuerst/vbb-stations - List of Stations
- derhuerst/vbb-lines - List of Lines
- Wikipedia