# Railway UI

The UI layer for the [Railway IPC package](

## Installation

Include the Railway UI package in your `mix.exs` file:

def deps do
    {:railway_ui, "~> 0.0.1"}

## Getting Started

The router plug can be mounted inside the Phoenix router with Phoenix.Router.forward/4.

defmodule MyPhoenixApp.Web.Router do
  use MyPhoenixApp.Web, :router

  pipeline :mounted_apps do
    plug :accepts, ["html"]
    plug :put_secure_browser_headers

  scope path: "/railway-ipc" do
    pipe_through :mounted_apps
    forward "/", RailwayUiWeb.Router, namespace: "railway-ipc"

**Note:** There is no need to add `:protect_from_forgery` to the `:mounted_apps` pipeline because this package already implements CSRF protection. In order to enable it, your host application must use the Plug.Session plug, which is usually configured in the endpoint module in Phoenix.

Documentation can be generated with [ExDoc](
and published on [HexDocs](
Once published, the docs can
be found at [](