• Stars
    star
    237
  • Rank 169,885 (Top 4 %)
  • Language
    JavaScript
  • License
    GNU Lesser Genera...
  • Created about 9 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Node.js application built to read JSON and translate it into HTML

Shunter

Shunter is a Node.js module built to read JSON and translate it into HTML.

It helps you create a loosely-coupled front end application which can serve traffic from one or more back end applications — great for use in multi-language, multi-disciplinary teams, or just to make your project more flexible and future-proofed.

Shunter does not contain an API client, or any Controller logic (in the MVC sense). Instead, Shunter simply proxies requests to a back end server, then:

  1. If the back end wants Shunter to render the response, it returns the application state as JSON, served with a certain HTTP header. This initiates the templating process in Shunter. Diagram of Shunter intercepting a JSON backend reply

  2. If the back end wishes to serve the response, it omits the header and Shunter proxies the request back to the client. Diagram of Shunter proxying a backend reply

  3. Shunter is also able to serve resources like CSS, JS, or images bundled with the templates as part of your application. Diagram of Shunter serving a bundled asset

NPM version Node.js version support Build status LGPL-3.0 licensed

Key features

  • Allows the creation of templates loosely coupled to the underlying back end applications.
  • Enables multiple back end applications to use the same unified front end.
  • Makes full site redesigns or swapping out back end applications very easy.
  • Completely technology-agnostic; if your application outputs JSON, it can work with Shunter.
  • Asset concatenation, minification, cache-busting, and other performance optimisations built-in.
  • Can output any type of content you like, e.g. HTML, RSS, RDF, etc.
  • Well-tested and supported, serving Scientific American as well as many high-traffic sites across the Springer Nature portfolio.

Getting started

You can find all the details about how to use Shunter in our documentation. If you're new to Shunter, we recommend reading the Getting Started Guide. This will teach you the basics, and how to create your first Shunter-based application.

Requirements

Shunter requires Node.js 10+ to run. You can find instructions for Windows, macOS and Linux below.

See the Getting started documentation for more information on Shunter's requirements.

Windows

On Windows 10, download a pre-built package from the Node.js website.

macOS

To install Node.js you can use the Node Version Manager (nvm) tool:

nvm install node

Alternatively, you can install the required dependency using Homebrew:

brew install node

You can also download pre-built packages from the Node.js website.

Linux

To install Node.js you can use the Node Version Manager (nvm) tool:

nvm install node

Depending on your flavour of Linux, you may also be able to use a package manager to install the required dependency.

Alternatively, download pre-built packages from the Node.js website.

Support and migration

We maintain a support guide which documents the major versions and their support levels.

We aim to support old major versions of Shunter for 6 months after a new major version is released. This means that security issues and bugs will be fixed whenever feasible.

If you'd like to know more about how we support our open source projects, including the full release process, check out our support practices document.

If you're migrating between major versions of Shunter, we maintain a migration guide to help you.

Contributing

We'd love for you to contribute to Shunter. We maintain a guide to help developers get started with working on Shunter itself. It outlines the structure of the library and some of the development practices we uphold.

We also label issues that might be a good starting-point for new developers to the project.

License

Shunter is licensed under the Lesser General Public License (LGPL-3.0).

Copyright © 2022, Springer Nature

More Repositories

1

frontend-playbook

The Frontend Playbook
464
star
2

boomcatch

A standalone, node.js-based beacon receiver for boomerang.
JavaScript
110
star
3

kotlin-playbook

How we write Kotlin code
99
star
4

webpagetest-mapper

Maps JSON result data from marcelduran/webpagetest-api into human-readable document formats.
JavaScript
96
star
5

immagine

Service that serves images and resize them if need be.
Ruby
93
star
6

scigraph

A Linked Open Data platform for the scholarly domain.
Java
73
star
7

bandiera

Simple Feature Flagging
Ruby
59
star
8

hasbin

Check whether a binary exists in the PATH environment variable from Node.js
JavaScript
31
star
9

truffler

Access web pages programmatically with PhantomJS, for running tests or scraping information
JavaScript
24
star
10

frontend-toolkits

Frontend Component Toolkits for the Elements Design System
SCSS
13
star
11

halfpipe

CLI for interacting with halfpipe
Go
12
star
12

fs2-pdf

Streaming PDF processor for Scala
Scala
12
star
13

thundermole

Proxy or redirect requests to different applications based on an API response
JavaScript
10
star
14

qs-middleware

Connect querystring middleware
JavaScript
9
star
15

cf-sonarqube-buildpack

Cloud Foundry SonarQube Buildpack
Shell
7
star
16

bandiera-client-php

A PHP client for the Bandiera feature flagging service
PHP
6
star
17

cf-rundeck-buildpack

Cloud Foundry Rundeck Buildpack
Shell
5
star
18

gcs-proxy

Google Cloud Storage proxy which supports file listing.
Go
5
star
19

bandiera-client-ruby

A Ruby client for the Bandiera feature flagging service
Ruby
5
star
20

cf-buildpack-update-action

A GitHub Action to allow you to scan projects for out-of-date Cloud Foundry buildpacks.
Kotlin
4
star
21

open-source-directory

A public listing of all the open source software published by Springer Nature.
4
star
22

halfpipe-cf-plugin

CF Plugin for doing cool deployments.
Go
4
star
23

vpat

Contains VPAT documents for SpringerNature products
3
star
24

sapTechWorkshopApp

a little sapui5 app for the NY workshop
JavaScript
3
star
25

eslint-config-springernature

ESLint shareable config used at Springer Nature
JavaScript
3
star
26

macmillan-utils

A collection of useful patterns we use in our Ruby applications.
Ruby
3
star
27

concourse-badger

Concourse pipeline badges
Go
2
star
28

frontend-express-demo

PUBLIC express demo
JavaScript
2
star
29

bandiera-client-node

A Node.js client for the Bandiera feature flagging service
JavaScript
2
star
30

diversity-hiring

2
star
31

accessibility-guide

Creating an accessibility guide for Springer Nature
CSS
2
star
32

buildpack-update-action

Please use cf-buildpack-update-action in place of this.
Kotlin
2
star
33

frontend-package-manager

Handles the creation, validation, and publication of frontend components in a monorepo
JavaScript
2
star
34

frontend-techtest-backend

Node backend for the frontend tech test
JavaScript
2
star
35

bandiera-client-scala

Scala
1
star
36

slack-channel-archiver

Simple archiver for infrequently used Slack channels.
Ruby
1
star
37

ux-elements-docs

UX Documentation for Elements design system
1
star
38

ee-snpaas-cli

SNPaaS client and docker image
Shell
1
star
39

varnish-boshrelease

Bosh release for Varnish HTTP Cache
Shell
1
star
40

omelet

Web Automation Framework for Selenium WebDriver built on top of TestNG
Java
1
star
41

DUL-Protocol-Validator

Distributed Usage Logging Protocol Validator
Scala
1
star
42

sasslint-config-springernature

Sass Lint shareable config used at Springer Nature
1
star
43

codingtests

Coding challenge for SNTPS recruitment candidates for java developers
Java
1
star