All Projects → clay → Amphora

clay / Amphora

Licence: mit
Middleware for Express that composes components into renderable pages

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Amphora

Hydra Express
A module which wraps Hydra and ExpressJS into a library for building distributed applications - such as microservices
Stars: ✭ 166 (+472.41%)
Mutual labels:  redis, express
Practice
💦 你没有见过的终极实战
Stars: ✭ 283 (+875.86%)
Mutual labels:  redis, express
2019 12
🎟 급증하는 트래픽에도 안정적인 예약 서비스, Atomic Pattern을 적용한 재사용 가능한 컴포넌트, 실용적인 Testing을 주제로 하는 이벤트 서비스
Stars: ✭ 169 (+482.76%)
Mutual labels:  redis, express
Qewd
Quick and Easy Web Development
Stars: ✭ 106 (+265.52%)
Mutual labels:  redis, express
Node Express Mongodb Jwt Rest Api Skeleton
This is a basic API REST skeleton written on JavaScript using async/await. Great for building a starter web API for your front-end (Android, iOS, Vue, react, angular, or anything that can consume an API). Demo of frontend in VueJS here: https://github.com/davellanedam/vue-skeleton-mvp
Stars: ✭ 603 (+1979.31%)
Mutual labels:  redis, express
Tokencaps
A middleware framework and persistence layer to aggregate and normalize crypto-currency data.
Stars: ✭ 118 (+306.9%)
Mutual labels:  redis, express
Blog Service
blog service @nestjs
Stars: ✭ 188 (+548.28%)
Mutual labels:  redis, express
Express Security
nodejs + express security and performance boilerplate.
Stars: ✭ 37 (+27.59%)
Mutual labels:  redis, express
Node Tutorial
☺️Some of the node tutorial -《Node学习笔记》
Stars: ✭ 364 (+1155.17%)
Mutual labels:  redis, express
Jianshu
仿简书nx+nodejs+nestjs6+express+mongodb+angular8+爬虫
Stars: ✭ 296 (+920.69%)
Mutual labels:  redis, express
Chat.io
A Real Time Chat Application built using Node.js, Express, Mongoose, Socket.io, Passport, & Redis.
Stars: ✭ 1,325 (+4468.97%)
Mutual labels:  redis, express
Re Verb
speaker diarization system using an LSTM
Stars: ✭ 27 (-6.9%)
Mutual labels:  redis, express
Aclify
🔒 Node Access Control Lists (ACL).
Stars: ✭ 49 (+68.97%)
Mutual labels:  redis, express
Express Mongodb Rest Api Boilerplate
A boilerplate for Node.js apps / Rest API / Authentication from scratch - express, mongodb (mongoose).
Stars: ✭ 153 (+427.59%)
Mutual labels:  redis, express
Gympoint Api
Rest API of a gym management application - built with Express, Postgres, Redis, and Nodemailer.
Stars: ✭ 39 (+34.48%)
Mutual labels:  redis, express
Ts App
Boilerplate project for a TypeScript API (Express, tsoa) + UI (React/TSX)
Stars: ✭ 182 (+527.59%)
Mutual labels:  redis, express
Apicache
Simple API-caching middleware for Express/Node.
Stars: ✭ 957 (+3200%)
Mutual labels:  redis, express
Express Graphql Mongodb Boilerplate
A boilerplate for Node.js apps / GraphQL-API / Authentication from scratch - express, graphql - (graphql compose), mongodb (mongoose).
Stars: ✭ 288 (+893.1%)
Mutual labels:  redis, express
M Mall Admin
🐶 微信小程序-小商城后台(基于 Node.js、MongoDB、Redis 开发的系统...)
Stars: ✭ 895 (+2986.21%)
Mutual labels:  redis, express
Docker Compose Nodejs Examples
Finally some real world examples on getting started with Docker Compose and Nodejs
Stars: ✭ 944 (+3155.17%)
Mutual labels:  redis, express

Introduction

illustration of an amphora

"A new way to organize, edit, and deliver the web, one component at a time."

CircleCI Coverage Status

Powering New York Magazine, Vulture, The Cut, Grub Street.
Created by New York Media.

Table of Contents

Introduction

Amphora is a mixin for Express that:

  • Composes components into renderable pages
  • Uses any key-value store of your choice (e.g., Mongo, Redis, LevelDB, etc.)
  • Provides an API for managing instances of components, uris, and pages

Components are reusable, configurable, self-contained bits of the web.

Amphora is a core part of New York Media's Clay project, an open-source content management system.

It follows semver and is stable as of v1.0.0.

Installation

npm install --save amphora

Usage

Clay separates concerns into two main areas: components and sites. Create two new directories in your project:

/components  (where your custom components live)
/sites       (for site-specific settings, routes, and assets)

In your project's main server file (e.g. app.js), instantiate a new Amphora instance.

var amphora = require('amphora'),
  port = process.env.PORT || 3000;

return amphora()
  .then(function (server) {
    server.listen(port);
  });

For additional configuration, you may pass in an Express app / router. You can also override the default templating engine(s) with your own.

var app = require('express')(),
  amphora = require('amphora'),
  amphoraHtml = require('amphora-html'),
  port = process.env.PORT || 3000,
  env;

// add project-specific settings to your app
app.set('strict routing', true);
app.set('trust proxy', 1);

// add custom settings to your templating engine
env.addGlobal('projectName', process.env.PROJECT_NAME);

return amphora({
  app: app,
  renderers: {
    default: 'html',
    html: amphoraHtml
  }
}).then(function (server) {
  server.listen(port);
});

How to create a component

Components in Clay have the following structure:

/component-name     unique name of your component
    template.handlebars   your template
    schema.yml            describes how the component's data is edited

All of these files are optional.

How to create a template

The template you create is dependent on whichever renderer you'd like to use. The Clay Core team supports an HTML renderer using Handlebars template, but the choice is yours. Either request a renderer or build one on your own!

How to create a schema

Kiln uses a component's schema.yml to determine how it is edited. Visit the Kiln wiki for examples of how to write schema files for your components.

Contribution

Fork the project and submit a PR on a branch that is not named master. We use linting tools and unit tests, which are built constantly using continuous integration. If you find a bug, it would be appreciated if you could also submit a branch with a failing unit test to show your case.

Advanced Topics

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].