Skip to content

usetrmnl/terminus

Repository files navigation

Terminus

CircleCI Docker Code Coverage Style

Terminus is a Ruby/Hanami web server that allows you to manage TRMNL devices running on your own local network or hosted cloud. This is our flagship BYOS implementation that aims to be compatible with our TRMNL Core server but also different since this open source solution provides features not possible in our Core application.

Deploy to Render

⚠️ This is a Beta software as we haven’t reached 1.0.0 status as of yet. This means — while we strive to reduce the number of changes that require effort on your part to a minimum — there will be times when changes can’t be avoided.

Features

  • Provides privacy first functionality by empowering you to run your own private server, network, and devices. You own the stack and the data. 🎉

  • Built atop Ruby and Hanami.

  • Uses esbuild for asset management.

  • Uses htmx for Hypermedia-Driven user interfaces.

  • Uses ImageMagick for image processing.

  • Uses Overmind for running multiple processes.

  • Uses PostgreSQL for the database.

  • Uses Puma for the server.

  • Uses Rodauth for authentication.

  • Uses Sidekiq for worker jobs.

  • Uses Valkey for the key/value cache.

  • Supports YJIT.

  • Supports Docker.

  • Supports TRMNL devices.

The following is a high level overview you can use to compare/contrast when deciding between using this Build Your Own Server (BYOS) implementation or our hosted solution.

Legend

  • ⚪️ Planned.

  • 🟢 Supported.

  • 🟡 Partially supported.

  • 🔴 Not supported, not implemented, or isn’t applicable.

Matrix

The following documents the features supported in this implementation which are similar to our TRMNL Core server. While we aim to be compatible with Core, the experience will be slightly different in look, feel, and behavior.

Terminus Hosted

Dashboard

🟢

🟢

Devices

🟢

🟢

Sensors

🟢

🟢

API

🟢

🟢

Screens

🟢

🟢

Playlists

🟢

🟢

Extensions

🟢

🟢

Models

🟢

🟢

Palettes

🟢

🟢

Firmware

🟢

🟢

Accounts

🟢

🔴

Users

🟢

🟢

Docker

🟢

🔴

Requirements

Quick Start

To immediately spin up Terminus on your local machine using Docker, run:

curl https://raw.githubusercontent.com/usetrmnl/terminus/refs/heads/main/scripts/docker/quick.sh | bash

Once launched, open http://localhost:2300 in your browser then click the Register link to register and log into the system.

⚠️ This script is not idempotent which means you can’t run it more than once since your database credentials will be different each time. This is only meant for getting up and running quickly to explore the feature set, not permanent use. For permanent use, see the Docker documentation.

Setup

To set up this project for local development, run:

git clone https://github.com/usetrmnl/terminus
cd terminus
bin/setup

💡 The setup script is idempotent so you can run it multiple times without harm. To rebuild a file managed by the setup script, delete the desired file and rerun setup to recreate.

Upgrade

‼️ If upgrading to Terminus 0.55.0 or higher, please make sure to run the bin/exchangize script to upgrade your extensions to use exchanges so you can manage multiple HTTP requests/responses. You only need to do this once. ‼️

To upgrade this project for local development, run:

cd terminus
bin/upgrade

Watch for any changes that need to be addressed in the output. Otherwise, if no changes are detected, you are set.

Usage

To launch the server, run:

# Development
overmind start --port-step 10 --procfile Procfile.dev --can-die assets,migrate

# Production
overmind start --port-step 10 --can-die assets,migrate

To view the app, use either of the following:

From your browser, you can then click on the Register link to register and log into the system.

Configuration

See Configuration documentation for details.

Users

When launching this application for the first time, there will be no users. The first user to register will automatically be given Verified status along with full access to the system. All subsequent users will marked as Unverified and must be manually Verified in order to have access to the system. In the future, more fine grained control will be provided for individual users, roles, and permissions.

Also, once logged in, you can manage your settings as follows:

  • Visit /me/login to update your email address.

  • Visit /me/password to update your password.

  • Visit /me/remember to enable, disable, or forget if you should be remembered.

Devices

See Devices documentation for details.

Firmware

In accordance with the Unbrickable Pledge, the latest version of Terminus always supports the latest version of our Firmware. If you are running on older firmware, you’ll need to use an older version of Terminus. Here’s a rough breakdown of the Firmware version history where changes were applied that might cause issues if you haven’t upgraded your devices in a while:

  • Firmware 1.6.9 (and lower): Supported by Terminus 0.41.0 and lower.

  • Firmware 1.6.10 (and higher): Supported by Terminus 0.42.0 and higher.

Extensions

See Extensions documentation for details.

Jobs

See Jobs documentation for details on Sidekiq worker jobs.

API

See API documentation for details.

Docker

See Docker documentation for details.

Raspberry Pi

See Raspberry PI documentation for details.

Kubernetes

See Kubernetes documentation for details.

Render

See Render documentation for details.

Development

See Development documentation for details.

Tests

To test, run:

bin/rake

Code Quality

Code quality is an important and vital aspect of the work on this project. The following gems are used to ensure our work remains consistent and of high quality:

  • Git Lint: Ensures Git commit messages are well written and consistent for code review but also for automatic release note generation via Milestoner.

  • Caliber: Ensures code is consistent in terms of style, layout, performance, best practices, etc.

  • Reek: Augments Caliber by detecting code smells and antipatterns.

  • RSpec: Provides a specification and testing framework for unit and integration tests.

  • SimpleCov: Generates interactive reports with every CI build. Will fail the build if quality drops below 95%. ⚠️ The badge at the top of this document isn’t updated in real-time, unfortunately, but is fairly accurate.

To view up-to-date code coverage details, follow these steps:

  • Visit the Circle CI build page.

  • Click on the latest "Success" build at the top of the page.

  • Click on build.

  • Click on ARTIFACTS.

  • Click on the coverage/index.html file.

At this point you can click through the tabs at the top of the page to inspect the various namespaces that make up this application.

Versions

To view all versions and the complete release history to this project — including detailed notes of all changes — run the following:

cd terminus
gem install milestoner
milestoner build --max 1000 --format web
ruby -run -e httpd tmp/milestones --port 3030
open http://127.0.0.1:3030

We are working on automating this across multiple projects, not only Terminus, because Milestoner also generates a complete syndicated feed of release notes as well. This means, in the future, you’ll be able to subscribe to all updates via your feed reader. 🎉

💡 You can also subscribe to our YouTube channel and get occasional version release video updates too.

License

While this project is distributed under the permissive MIT License, we strongly believe that technology should serve humanity’s best interests. We created this software with the intent that it be used to benefit people and communities, not to cause harm. We encourage individuals and organizations to consider the ethical implications and to use this project in ways that respect human rights, promote equity, and contribute positively to society. Though we cannot legally restrict usage under the MIT License, we ask that you join us in fostering a responsible technology ecosystem by avoiding applications that could cause harm, perpetuate discrimination, or undermine human dignity. Technology is best used to enrich lives, let’s ensure we build a better world together!

Credits

About

The flagship TRMNL BYOS application.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors