Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
This branch is 130 commits ahead, 486 commits behind iRail:master.

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Introducing the new The new iRail will be hypermedia driven!

We are using the following technologies:

  • laravel 4.1
  • bootstrap-sass
  • angularjs + angularui
  • and more (see composer)

Core concepts

Here below you'll find a brief description of the core concepts that play an important role in the new iRail.

Content negotiation


When a page is requested, the language preference is delegated from either the URL (using the GET parameter 'lang') or via accept headers. Accept headers take preference over any parameters.

Format (API)

iRail doesn't use a classic API on another URL. There's no '', instead you specify in the accept headers what kind of resource you'd like to request. By default, when visiting with a browser, you'll get a webpage that can be used by end-users.

You can also ask the application ( for other kinds of resources. For example, you can ask for a JSON version of the data that the routeplanner serves.

In order to ask the API to serve you JSON (and not just the plain HTML that you get when you visit in your browser), send a request to but specify the requested content-type in your accept headers, e.g. application/ld+json.

Hypermedia interface

Data returned through the API (when specifically requesting application/ld+json) should be structured and contains information about other possible paths (interaction) and contexts. Following the HATEOAS principle:

A REST client needs no prior knowledge about how to interact with any particular application or server beyond a generic understanding of hypermedia.

Data dumps

Data dumps and the data that is used (and will be used and queryable in the future) are available at

Authentication interface

OAuth URI namespace (WIP):

In order to log in with a oAuth provider, send a request to '{provider}' (supported provider: 'google').

The LoginController checks what provider it is and executes the corresponding login()-method of the specific provider. Every provider has it's own Provider-class which implements an OAuthProvider-interface.

Inside the login()-method of a Provider-class happens the oAuth-process.

Modify database.php

Vagrant automatically uses 'root' as username and password. For this reason you should go to app/config and create a folder named 'productie' and copy database.php in it. Also put this folder in .gitignore. Next, you open that file in 'productie' and modify the mysql section to this:

		'mysql' => array(
			'driver'    => 'mysql',
			'host'      => 'localhost',
			'database'  => 'hyperrail',
			'username'  => 'root',
			'password'  => 'root',
			'charset'   => 'utf8',
			'collation' => 'utf8_unicode_ci',
			'prefix'    => '',

Later when entering production, modify the vagrant file and app/config/database.php.

Connect to vagrant database

  • Open MySQL Workbench or any other tool you like.
  • Connect to a new database using the following settings:
Connection Method: Standard TCP/IP over SSH
SSH Hostname:
SSH Username: root
SSH Keyfile: select ~/.vagrant.d/insecure_private_key
MySQL hostname:
MySQL Server Port: 3306
Username: root
Password: root
port: 3306

OAuth2.0-server API (WIP)

You can read all about this in the file in de root directory or click here.


When going in production, you have to set the right credentials for OAuth-providers in: app/config/packages/artdarek/oauth-4-laravel/config.php

Thanks to

Special attribution to Melih Bilgil for the icon set. (


new hypermedia-driven iRail







No packages published


  • JavaScript 54.5%
  • PHP 27.8%
  • CSS 17.7%