• Stars
    star
    124
  • Rank 279,320 (Top 6 %)
  • Language
    Clojure
  • License
    MIT License
  • Created almost 5 years ago
  • Updated 2 months ago

Reviews

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

Repository Details

A compendium of Clojure libraries for implementing web backends.

Apex

Apex stands for API Execution.

Apex is a Clojure library that produces Ring handlers from OpenAPI descriptions.

Apex is a Clojure web library that takes an Open API 3.0 description, some attachments, and returns a Ring handler.

Status

PRE-ALPHA:

Apex libraries are broadly applied as Ring middleware, where possible.

Some of these libraries will be marked as ready for use prior to others. For now, this project is being developed in the open for the purposes sharing ideas and code and not recommended for use in production systems.

Getting started

Start with the petstore example in examples/petstore. See examples/petstore/README.adoc.

Individual modules are:

params

An implementation of OpenAPI parameter parsing.

oauth2

An implementation of OpenID Connect upon OAuth2 driven by OpenID Connect Discovery configuration.

Objective

Apex will be considered a success if it meets the following acceptance criteria:

  • Developers with limited experience of Clojure can create web APIs without too much difficulty, including security.

  • Web APIs created with Apex are broadly conformant to HTTP standards and performance is acceptable for the vast majority of use-cases.

This requires the following:

  • Error handling is informative and leads developers quickly to the actual cause of the error.

Rationale

yada, the web library we wrote to replace Liberator, is beginning to show its age. When we started yada, the web looked a little different than today:

  • There was no async option in Ring, and we wanted to avoid the thread-per-request model for some of the high-traffic websites we were producing in our consulting projects.

  • Prismatic Schema was firmly established as the way to specify constraints on data.

In the years since yada was conceived, designed and developed, there have been a number of external developments:

  • Ring now has a well thought out approach to async, supporting modern asynchronous web servers without sacrificing the composeability of middleware.

  • OpenAPI (formerly Swagger) continues to attract users, adopted by large organisations, and has now matured and is now governed by The Linux Foundation.

  • JSON Schema continues to mature. (We like it so much we’ve even written our own Clojure library, jinx)

  • Vert.x, an asynchronous networking library on the JVM has emerged and stabilised. It is well maintained, with an active community. It is also based on Netty, providing a suitable and comprehensive replacement for Aleph, adopted by yada. In addition, it provides robust support for asynchronous multipart/formdata requests.

  • Reactive Streams has matured and found its way into the core JDK (as java.util.concurrent.Flow). While manifold, used by yada, was years ahead of its time, there are now other well-established alternatives for asynchronous processing with back-pressure. AsyncAPI is also emerging as an asynchronous complement to OpenAPI.

OpenAPI: the missing piece of the web jigsaw

One of the key insights behind yada was web resources should be modelled with data. OpenAPI is now firmly established as both the de-facto and the de-jure data model of web APIs.

From Prismatic Schema to JSON Schema

The future of Prismatic Schema has been in doubt since Cognitect announced clojure.spec. While we value clojure.spec in our internal data structures, we feel that the web API community is going to move inexorably towards adoption of JSON Schema. We believe the Clojure community should welcome this trend towards a more data-oriented approach to building application systems.

Standards conformance

Standards facilitate the rich interoperable ecosystem we enjoy as both users and developers of the web. Too often conformance with established standards is the exception rather than the rule. This is a shame, as it degrades the web for everyone. Web libraries like Apex should encourage compliance due to the multiplier effect of multiple applications built on them.

License

The MIT License (MIT)

Copyright Β© 2020 JUXT LTD.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

bidi

Bidirectional URI routing
Clojure
984
star
2

yada

A powerful Clojure web library, full HTTP, full async - see https://juxt.pro/yada/index.html
HTML
731
star
3

aero

A small library for explicit, intentful configuration.
Clojure
721
star
4

tick

Time as a value.
Clojure
583
star
5

edge

A Clojure application foundation from JUXT
Clojure
502
star
6

joplin

Flexible datastore migration and seeding for Clojure projects
Clojure
313
star
7

juxt-accounting

Double-entry accounting software written in Clojure with Datomic.
Clojure
280
star
8

pack.alpha

Package clojure projects
Java
259
star
9

mach

A remake of make (in ClojureScript)
Clojure
246
star
10

jig

Jig is an application harness providing a beautifully interactive development experience for Clojure projects.
Clojure
230
star
11

clip

Light structure and support for dependency injection
Clojure
224
star
12

iota

Infix operators for test assertions
Clojure
149
star
13

site

A web and API server, powered by xtdb.com
Clojure
136
star
14

modular

JavaScript
128
star
15

bolt

An integrated security system for applications built on component
Clojure
123
star
16

jinx

jinx is not xml-schema (it's json-schema!)
Clojure
97
star
17

pull

Trees from tables
Clojure
96
star
18

roll

AWS Blue/Green deployment using Clojure flavoured devops
Clojure
75
star
19

reap

A Clojure library for decoding and encoding strings used by web protocols.
Clojure
68
star
20

dirwatch

A Clojure directory watcher, wrapping the JDK 7 java.nio.file.WatchService.
Clojure
67
star
21

skip

Skippy McSkipface - A general Clojure dependency tracker
Clojure
34
star
22

snap

Snapshot testing for Clojure and Clojurescript
Clojure
29
star
23

pack-datomic

Datomic Packer and Terraform setup
HCL
26
star
24

qcon2014

JavaScript
26
star
25

stoic

Marrying the Component Lifecycle pattern with distributed config.
Clojure
20
star
26

spin

Unbundling the web application-tier
Clojure
20
star
27

pick

A Clojure library for HTTP server-driven content negotiation.
Clojure
18
star
28

prop

Clojure
17
star
29

rest

A guide to coding a REST service
CSS
16
star
30

grab

A Clojure library for parsing and executing GraphQL queries.
Clojure
16
star
31

chatserver

Clojure
13
star
32

shop

The JUXT Shop - a sample application built on Crux
Clojure
11
star
33

dotfiles

Recommended dotfiles used by JUXT
Emacs Lisp
9
star
34

fuzz

Example ClojureScript Project that happens to wrap Slack
Clojure
9
star
35

ramp

Shell
8
star
36

card

Not sure what this is. A kind-of Zettelkasten?
TypeScript
8
star
37

chatclient

Clojure
8
star
38

hire

A technical interview test for potential employees
Clojure
7
star
39

rock

Hardened AMIs for Clojure deployments (Arch Linux)
Shell
7
star
40

clip-example

Example of using Clip
Clojure
7
star
41

datomic-extras

Clojure
7
star
42

lein-dockerstalk

Clojure
7
star
43

docker

Docker files
Makefile
7
star
44

draw

A DSL for SVG diagrams
Clojure
6
star
45

trag

Graph transduction
Clojure
5
star
46

radar

JUXT Clojure Technology Radar
Clojure
5
star
47

vext

Clojure
4
star
48

pack-ek

HCL
4
star
49

adoc

A Clojure wrapper for asciidoctorj
Clojure
4
star
50

msf

Volunteer work for MSF
Clojure
4
star
51

astro-website

Source for the main JUXT website
JavaScript
3
star
52

azondi

MQTT goes reactive
CSS
3
star
53

pack-riemann

HCL
3
star
54

http

3
star
55

yada.cookbook

A cookbook of yada recipes
3
star
56

component-utils

Clojure
2
star
57

blip

Small library for fetching/injecting graphql definitions
Clojure
2
star
58

flow

Clojure
2
star
59

ping

Clojure
2
star
60

modular.co-dependency

Co-dependency support for com.stuartsierra.component
Clojure
2
star
61

lein-deploy-tar

A Leiningen plugin to upload tars to a Maven repository.
Clojure
2
star
62

aleph-issue

Testing aleph
Clojure
1
star
63

mksmarthack

A Clojure data hack on MK:Smart
Clojure
1
star
64

eventing-examples

Clojure
1
star
65

training-exercises-webapp

Training exercises
Clojure
1
star
66

example-code

Example code for a recent client course
Clojure
1
star
67

home-apps

Monorepo for SPAs that use home.juxt.site as a backend
TypeScript
1
star
68

sail

Clojure
1
star
69

clojars-mirrors

Re-releasing Clojars libraries onto Maven Central
Clojure
1
star
70

XT20.conf

Public materials for XT20
1
star
71

asciidoctor-stylesheet-factory

CSS
1
star