Backend API & Frontent UI for live departure board for UK Rail.
This repository has been archived on 2023-08-24. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
2022-12-08 22:06:49 +00:00
src LDB is now working for CRS only and no auth 2022-12-08 21:08:54 +00:00
static Added and implemented URW Gothic Font 2022-12-08 22:06:49 +00:00
.gitignore Initial commit 2022-11-29 19:28:24 +00:00
app.js LDB is now working for CRS only and no auth 2022-12-08 21:08:54 +00:00
LICENSE General Development 2022-11-30 22:08:27 +00:00
package-lock.json corpus.utils now working 2022-12-08 16:39:13 +00:00
package.json corpus.utils now working 2022-12-08 16:39:13 +00:00
README.md update readme 2022-12-08 21:22:01 +00:00

OwlBoard

OwlBoard is both a backend API, and a frontend Arrival/Departure board webapp.

Powered by Node.JS and using the ldbs-json module, the OwlBoard API provides up to date train departure information for any station in the UK.

Whilst the application is open source, the webservice (owlboard.fb-infra.uk) is not openly available. National Rail Enquiries have limits on API access so to use this software yourself, you'll need to run your own instance after obtaining your own API key.

The webservice (owlboard.fb-infra.uk) may contain ads to support the running of the service, if ads are implemented, I intend to avoid 'dubious' advertisers that target and track users.

Currently only the public API is available as I am currently unable to request a key for the staff version.

Requirements:

To run this server you will need:

  • NodeJS
  • Caching Reverse Proxy Server
    • Not strictly neccessary but improves performance
    • Do not cache anything on the /api/ path, API caching is done internally
  • PostgreSQL Server
    • Create a database and user for OwlBoard:
    • DB Name: owlboard
    • DB User: owlboard
    • DB Pass: owlboard
    • Default Name, User & Pass can be changed in /src/configs/database.configs.js

WebApp Colours:

  • See CSS Variables

API Endpoints:

  • /api:
    • /test:

      • GET: Check your connection with the server
        • If Authentication: Basic header is provided your key will be checked, if not then just the conenction will be tested.
    • /list:

      • GET: Get list of stations
        • Request Header - Basic Auth -- Not Currently Implemented/Required on this route
        • Returns JSON: {"STATION NAME":{"CRS":"code","TIPLOC":"code"}}
    • /ldb:

      • /{crs}:
        • GET: Get departure board for {crs}
          • Request Header - Basic Auth -- Not Currently Implemented/Required on this route
          • Returns JSON: Formatted as per ldbs-json module.
    • /gitea:

Stack:

  • app.js -> Launches server, Entry Point, defines routers and middlewares.
    • routes -> Routers - Directs requests to controllers.

      • controllers -> Checks auth, sends response. Request doesn't pass further.
        • services -> Provide data and do tasks, uses other services and utils.
    • utils -> Provide utility functions that can be called by services.

    • configs -> Provide configuration details for other files.

    • static -> Holds files for static service, should be hosted behind a caching proxy.