Trevorism
Trevorism

Why Trevorism?

Building software systems from scratch is difficult and expensive. Trevorism allows developers to bake best practices into applications and allows them to evolve over time with pluggable functionality.

How does Trevorism do this?

Software systems share common patterns: User Interfaces, Business Logic, Databases, Security, Logging, Testing, Deployment, etc. We bring our extensive experience in building and maintaining applications to enable fast construction of software systems. We achieve this by defining a hierarchy of interfaces for each common software system pattern and exposing them as a RESTful API. The highest level in the hierarchy is the simplest interface, and each level down unlocks additional functionality. Trevorism includes reference implementations of each interface which chooses sensible defaults. This allows consumers of Trevorism to rapidly establish common software patterns in their own systems.

What is Trevorism?

Trevorism.com is a set of distributed web services organized in a lightweight software platform. Together, they form a live reference implementation for an enterprise-grade software system.

Trevorism APIs
API Interactions

Using Trevorism

Users of Trevorism have several options for leveraging these services:
  • Make direct use of the reference implementation
  • Pull the code and host it in their environment; all code is open source
  • Use one or more interfaces but write a custom implementation
  • Create a tenant within Trevorism and get a dedicated instance of the services

Trevorism Achievements

  • Open source
  • Minimal technology maintenance cost
  • One button press for a new production service
  • Continuous delivery
  • Scale on demand
  • Automatic security key rotation
  • Synchronous or asynchronous function invocation
  • Debug any service locally
  • Discoverable inventory

This Documentation

The following pages of the documentation describe the purpose and usage of each Trevorism service.
The ecosystem is continuously growing and may not be fully documented. View the full Trevorism service registry here.
Each of the following entries describes the motivation of the service, the exposed API, and links to the code base and deployed reference implementation. One can use the service by registering as a user of Trevorism.
Feel free to contact us for more infomation, questions, or feedback.

Trevorism.com Tech Stack

The live reference implementation (this site) has chosen the following technologies:
  • Cloud Platform: Google Cloud Platform -- GCP was chosen for generous free quotas for many services, enabling Trevorism to run at very low cost.
  • Code Repository and CI/CD: Github and Github actions -- Github enables open source and provides free containerized compute for builds and tests.
  • Backend: Groovy on Micronaut -- Groovy enables rapid development and Micronaut is a elegant web framework which avoids reflection.
  • Frontend: Vue and Vuestic -- Vue is a progressive lightweight js framework, and the Vuestic component library eliminates most custom UI work.
  • Command Line Interface: Powershell -- Powershell's object pipeline and native web requests allow one to manage the system efficiently

Auth

Motivation

In order to securely access resources in Trevorism, authentication and authorization must be performed. The Trevorism Auth service allows for registration of users and applications, and issues signed JWT tokens based on those identities. All services can validate incoming tokens and read the included claims to determine if the request is authorized.

API

The service is deployed to https://auth.trevorism.com.

The interface documentation exists at https://auth.trevorism.com/help.

The code is available at https://github.com/trevorism/auth-provider.

Usage

In order to use the auth service, one must register an identity with the service. Identities may be either users or applications. Each identity has credentials; either a username and password or a clientId and clientSecret.

With valid credentials, a JWT token may be requested. Tokens are short-lived and encrypted such that only Trevorism services may read the tokens. Tokens are sent in the Authorization header of each request to a Trevorism service. For example: {"Authorization": "Bearer <token>"}

A service securing endpoints may do so by simply annotating the API method with a @Secure annotation. The code for implementation of security for each service exists in libraries that are included in each service.

The security utilities exist in https://github.com/trevorism/secure-utils.

The validation code exists in https://github.com/trevorism/micronaut-security-utils.

Result

The Auth service and associated libraries allow for a elegant and secure implementation of authentication and authorization.

Data

Motivation

An essential part of any web service is management of data. Trevorism provides a REST API for data operations which is agnostic to the underlying data store. Since different data stores make different decisions how to access, retrieve and manage data, the top level data API strikes a balance between flexibility and simplicity. Datastore specific APIs exists within Trevorism which may fully or partially implement the Data API. Clients of the Data API may opt for maximum flexibility by using the top-level interface, or a more optimized experience by using a datastore specific API.

API

The service is deployed to https://data.trevorism.com.

The interface documentation exists at https://data.trevorism.com/help.

The code is available at https://github.com/trevorism/data.

Usage

The Data API has the concept of named entities. Entities are weakly typed; the only requirement is that a given entity type must have a unique id. The API allows for CRUD and query operations on these entities.

Data may exist in multiple data stores. The Data API utilizes a data catalog service, deployed at https://catalog.data.trevorism.com to map entity names to data stores. A data locator in the format <datastore>:<entity name>:<entity id> is used to retrieve objects irrespective of their physical location. Further, one can perform cross data store transfers, joins and other multi-data-store operations.

Result

By exposing data as a service, any Trevorism service inherits the ability to seemlessly manage its data. For generic use cases, out-of-the-box data management dramatically increases development speed since service need not implement their own secure data access layer.
For more complex use cases, one can create data store specific APIs that are Trevorism Data API compliant. This allows for enterprise wide management of data and enables interactions across data stores via a simple RESTful API.

Action

Motivation

The Action API allows users to store REST based endpoint invocations and invoke them by name. This provides a convenient way to perform operations on the ecosystem.

API

The service is deployed to https://action.trevorism.com.

The interface documentation exists at https://action.trevorism.com/help.

The code is available at https://github.com/trevorism/action.

Usage

In addition to aliasing requests, the action subdomain hosts several useful APIs.

Result

The Action APIs may wrap external web services, applying Trevorism security model so users and apps can leverage them.

Testing

Motivation

The Testing API enables registration and periodic invocation of software tests. One can use tests to validate the ecosystem's functionality and monitor it over time.

API

The service is deployed to https://testing.trevorism.com.

The interface documentation exists at https://testing.trevorism.com/help.

The code is available at https://github.com/trevorism/testing.

Usage

When writing a new test; a developer adds it to a test suite, a runnable collection of tests. The Testing API allows for registration of test suites. Once registered, one can invoke the test suite via RESTful endpoint.

The Testing API currently supports testing suites of junit tests, cucumber, and cypress. We use github actions runners to execute the tests, which provides free compute resources ;)

The Testing API exposes an error endpoint. Test failures may be posted to this endpoint, and are periodically checked for triage.

Combining this API with the functionality Schedule Actions API, one can monitor any service on a cadence.

Result

By registering test suites, an inventory of current tests are maintained, which allows ecosystem members to discover what test exists, when they are being executed, and what the test results are over time. This enables confidence in the ecosystem's functionality.