Skip to content


Repository files navigation

RailsFlix :: Trestle Demo Application

Rails Flix is a simple application created to demonstrate the Trestle admin framework.

Admin: ( / demo)

Along with the core trestle gem, this demo also uses trestle-auth (for admin authentication) and trestle-search (for search in combination with pg_search).

Code of Interest

  1. Trestle admin definitions located in app/admin
  2. Custom view partials used by admins at app/views/admin/shared
  3. Custom JS/CSS for admin in app/assets/javascripts/trestle and app/assets/stylesheets/trestle
  4. Data models in app/models (all fairly standard ActiveRecord)

Local Development Setup

Requirements: Ruby 3.2.2, PostgreSQL, Yarn

  1. Clone the repository

  2. Run bundle install to install Ruby dependencies

  3. Run yarn install to install JavaScript/CSS dependencies

  4. (Optional) Seed the database from

    a) Register for an account at

    b) Obtain your API key at Either add this to a .env file in the project root as TMDB_API_KEY, or specify it on the command line as in the following commands.

    c) Create the database (default: RailsFlix_development), migrate and seed:

     $ TMDB_API_KEY={{YOUR_API_KEY}} bin/rails db:setup

    d) You can fetch more (or less) data from using the PAGES environment variable (1 page = 20 results)

     $ TMDB_API_KEY={{YOUR_API_KEY}} PAGES=1 bin/rails db:setup

    Note: If you choose not to seed the database, you will need to manually create an admin account. See db/seeds.rb or the trestle-auth README.

  5. Start the rails server

     $ bin/rails server
  6. Login to the admin at http://localhost:3000/admin. The default account created in 4c) is: / demo


This application is available as open source under the terms of the LGPLv3 License.