1 |
|
2 | # ![Shunter](docs/shunter-logo.png)
|
3 |
|
4 | Shunter is a [Node.js][node] application built to read JSON and translate it into HTML.
|
5 |
|
6 | It helps you create a loosely-coupled front end 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.
|
7 |
|
8 | Shunter does not contain an API client, or any Controller logic (in the [MVC](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller) sense). Instead, Shunter simply proxies requests to a back end server, then:
|
9 |
|
10 | 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.
|
11 | 2. If the back end wishes to serve the response, it omits the header and Shunter proxies the request back to the client.
|
12 |
|
13 | [![NPM version][shield-npm]][info-npm]
|
14 | [![Node.js version support][shield-node]][info-node]
|
15 | [![Build status][shield-build]][info-build]
|
16 | [![Dependencies][shield-dependencies]][info-dependencies]
|
17 | [![LGPL-3.0 licensed][shield-license]][info-license]
|
18 |
|
19 | ## Key Features
|
20 | - Enforces decoupling of templates from underlying applications
|
21 | - Enables multiple applications to use the same unified front end
|
22 | - Makes full site redesigns or swapping out back end applications a doddle
|
23 | - Completely technology-agnostic; if your application outputs JSON, it can work with Shunter
|
24 | - Asset concatenation, minification, cache-busting, and other performance optimisations built-in
|
25 | - Outputs any type of content you like, e.g. HTML, RSS, RDF
|
26 | - Well-tested and supported, serving [Scientific American](http://www.scientificamerican.com) as well as [many](http://www.nature.com/npjscilearn/) [high-traffic](http://www.nature.com/srep) [sites](http://www.nature.com/search) across nature.com
|
27 |
|
28 |
|
29 | ## Getting Started
|
30 |
|
31 | If you're new to Shunter, we recommend reading the [Getting Started Guide](docs/getting-started.md). This will teach you the basics, and how to create your first Shunter-based application.
|
32 |
|
33 | Once you're familiar with Shunter's basics you can refer to the [API Documentation](docs/usage/index.md) for a full breakdown about how to work with Shunter.
|
34 |
|
35 |
|
36 | ## Requirements
|
37 |
|
38 | Shunter requires [Node.js][node] 4.x–6.x. This should be easy to get running on Mac and Linux.
|
39 |
|
40 | One of Shunter's dependencies is a native addon module so it requires a working C compiler. Windows doesn't come with one by default so you may find the following links helpful:
|
41 |
|
42 | - [node-gyp on Windows][node-gyp-on-windows]
|
43 | - [node-gyp Visual Studio 2010 Setup][node-gyp-vs]
|
44 | - [contextify – Specified platform toolset (v110) is not installed or invalid][contextify]
|
45 |
|
46 | See the [Getting started documentation](docs/getting-started.md#prerequisites)
|
47 | for more information on Shunter's requirements.
|
48 |
|
49 |
|
50 | ## Support and Migration
|
51 |
|
52 | The last major version of Shunter is version 4. Old major versions are supported for 6 months after a new major version is released. This means that patch-level changes will be added and bugs will be fixed. We maintain a [support guide](docs/support.md) which documents the major versions and their support levels.
|
53 |
|
54 | 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][support].
|
55 |
|
56 | If you're migrating between major versions of Shunter, we maintain a [migration guide](docs/migration/index.md) to help you.
|
57 |
|
58 |
|
59 | ## Contributing
|
60 |
|
61 | We'd love for you to contribute to Shunter. We maintain a [developer guide](docs/developer-guide.md) to help people get started with working on Shunter itself. It outlines the structure of the application and some of the development practices we uphold.
|
62 |
|
63 | We also label [issues that might be a good starting-point][starter-issues] for new developers to the project.
|
64 |
|
65 |
|
66 | ## License
|
67 |
|
68 | Shunter is licensed under the [Lesser General Public License (LGPL-3.0)][info-license].
|
69 | Copyright © 2015, Springer Nature
|
70 |
|
71 |
|
72 |
|
73 | [contextify]: http://zxtech.wordpress.com/2013/02/20/contextify-specified-platform-toolset-v110-is-not-installed-or-invalid/
|
74 | [node]: https://nodejs.org/
|
75 | [node-gyp-on-windows]: https://github.com/nodejs/node-gyp#on-windows
|
76 | [node-gyp-vs]: https://github.com/TooTallNate/node-gyp/wiki/Visual-Studio-2010-Setup
|
77 | [npm]: https://www.npmjs.com/
|
78 | [starter-issues]: https://github.com/springernature/shunter/labels/good-starter-issue
|
79 | [support]: https://github.com/springernature/frontend/blob/master/practices/open-source-support.md
|
80 |
|
81 | [info-coverage]: https://coveralls.io/github/springernature/shunter
|
82 | [info-dependencies]: https://gemnasium.com/springernature/shunter
|
83 | [info-license]: LICENSE
|
84 | [info-node]: package.json
|
85 | [info-npm]: https://www.npmjs.com/package/shunter
|
86 | [info-build]: https://travis-ci.org/springernature/shunter
|
87 | [shield-coverage]: https://img.shields.io/coveralls/springernature/shunter.svg
|
88 | [shield-dependencies]: https://img.shields.io/gemnasium/springernature/shunter.svg
|
89 | [shield-license]: https://img.shields.io/badge/license-LGPL%203.0-blue.svg
|
90 | [shield-node]: https://img.shields.io/badge/node.js%20support-4–6-brightgreen.svg
|
91 | [shield-npm]: https://img.shields.io/npm/v/shunter.svg
|
92 | [shield-build]: https://img.shields.io/travis/springernature/shunter/master.svg
|