# flowee

> a __lightweight__ way to __create JSONAPI__-compatible api's for _nodejs_

Latest version **1.0.32** (published 2016-10-03) · ISC license · 0 weekly downloads

## Install

```sh
npm install flowee
pnpm add flowee
yarn add flowee
bun add flowee
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.32 |
| Published | 2016-10-03 |
| First published | 2015-12-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | coderofsalvation |

## Links

- npm: https://www.npmjs.com/package/flowee
- Repository: https://github.com/coderofsalvation/flowee
- Homepage: https://github.com/coderofsalvation/flowee#readme
- Issues: https://github.com/coderofsalvation/flowee/issues
- npm.io page: https://npm.io/package/flowee

## Dependencies (5)

- [fortune](https://npm.io/package/fortune.md) ^1.6.3
- [typeshave](https://npm.io/package/typeshave.md) ^0.3.24
- [http-router](https://npm.io/package/http-router.md) ^0.5.0
- [response-time](https://npm.io/package/response-time.md) ^2.3.1
- [fortune-json-api](https://npm.io/package/fortune-json-api.md) ^1.1.13

## Recent versions

- 1.0.32 (latest) — 2016-10-03
- 1.0.30 — 2016-10-03
- 1.0.29 — 2016-05-25
- 1.0.28 — 2016-05-20
- 1.0.27 — 2016-01-04
- 1.0.26 — 2016-01-04
- 1.0.25 — 2016-01-04
- 1.0.24 — 2016-01-04
- 1.0.23 — 2016-01-04
- 1.0.22 — 2016-01-04
- 1.0.21 — 2015-12-17
- 1.0.2 — 2015-12-17
- 1.0.1 — 2015-12-17
- 1.0.0 — 2015-12-17

## README

## Flowee

a __lightweight__ way to __create JSONAPI__-compatible api's for _nodejs_

![Build Status](https://travis-ci.org/coderofsalvation/flowee.svg?branch=master)

## Getting started

    $ npm install flowee
    $ cp node_modules/flowee/test/model.js .

__Create `server.js`:__

    var flowee = require('flowee')
  
    var app = flowee.init({ model: require('./model.js'), store: true, router:true });
    flowee.start( function(server) {
      return server.listen(1337);
    });

( See [model.js here](https://github.com/coderofsalvation/flowee/blob/master/test/model.js) )

    $ node server.js

> Voila! Now you have a server running with automatically mapped database entities (incl. __many to many__ relations OHMY).

Ps. you can use it as express middleware too:

    flowee.init({ model: require('./model.js'), store: true });
    flowee.store.connect().then( console.dir )
    flowee.export_swagger( flowee.model )
    app.use( flowee.process )
    // add routes
    for (resource in flowee.model.paths) {
      methods = flowee.model.paths[resource];
      for (method in methods) {
        obj = methods[method];
        app[method](resource, obj.func);
      }
    }

## Architecture

![](http://coderofsalvation.github.io/flowee/img/diagram.png)

__Flowee__ promotes [configuration over convention](http://flowee.isvery.ninja/doc/howto-configuration-over-convention), click <A href="http://coderofsalvation.github.io/flowee/img/diagram.png" target="_blank">here</a> to see the fullscreen architecture

## Howtos

* [I want a database structure)](http://flowee.isvery.ninja/doc/howto-database.html)
* [I want custom endpoints](http://flowee.isvery.ninja/doc/howto-custom-endpoints.html)
* [I want to implementing logic](http://flowee.isvery.ninja/doc/howto-logic.html)
* [Middleware](http://flowee.isvery.ninja/doc/howto-middleware.html)

## Features

Built on the shoulders of [fortunejs](http://fortunejs.com/), which represents:

* fast installation: core is +/- 10M
* [configuration over convention](http://flowee.isvery.ninja/doc/howto-configuration-over-convention)
* a teaspoon of automatic database object relations mappings 
* 5 liters of [JSONAPI v1](http://jsonapi.org/) compatible REST responses 
* swappable database adapters like [MongoDB](https://www.npmjs.com/package/fortune-mongodb), [Postgres](https://www.npmjs.com/package/fortune-postgres), [Redis](https://www.npmjs.com/package/fortune-redis) adapter

Oh..and:

* [DDA](http://www.slideshare.net/apigee/i-love-apis-2015-create-designdriven-apis-with-nodejs-and-swagger): design-driven api by using a json __SWAGGER v2__ compatible model 
* __middleware compatible__: connect [express](http://expressjs.com) and [restify](http://restify.com) middleware modules from npm

## Extensions

> [flowee-doc](https://npmjs.org/flowee-doc): automatic generating api documentation

<img alt="" src="https://github.com/coderofsalvation/flowee-doc/raw/master/.doc/apiexplorer.png" height="200px"/><br>

> [flowee-auth](https://npmjs.org/flowee-auth): passport authentication

<img alt="" src="https://pbs.twimg.com/profile_images/599259952574693376/DMrPoJtc.png" height="200px"/><br>

> [flowee-admin](): automatic admin interface (__TODO__)

## Philosophy 

Take a look at [loopback](http://blog.jeffdouglas.com/2015/07/07/roll-your-own-api-vs-loopback), [meteor](http://meteor.com), [cleverstack](http://cleverstack.io). 
Now imagine lightweight.
Flowee likes to focus on:

* lightweight and fast to install
* json driven, declarative (monkeypatchable configuration over convention)
* http framework agnostic
* [configuration over convention](http://flowee.isvery.ninja/doc/howto-configuration-over-convention)
* allow re-usage of middleware from http frameworks like express/restify etc
* extend using npm installs: no cli tools, no learningcurve

---
_Source: https://npm.io/package/flowee · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
