Discover who to tip.
To make it easier and more convientient to find authors you want to support, we identify dependencies in projects and provide tipping information about their authors.
Hosted projects will be scanned to identify authors. A dependency of a project is seen as yet another project with a authors.
Authors can be the main author of a project, contributors, or collaborators.
Identified authors are "tippable" meaning a tipping provider called brokers (such as Gittip and Flattr) can be asked to transfer a chosen amount to the author.
In its core, the engine takes in-data and asks sequentially if any of the
declared providers can use (is responsible) this data to provide more insight
into the project structure. The iteration repeats as soon as the first provider
returning a non-nil
out-data value responds. The iteration/fixture stops
when all declared providers return nil
.
Three provider types can be declared:
- Hosters
- Builders
- Brokers
The API for each of these are the same and are only seperated as a mental model.
All hosters shall answer the question if they are responsible for a given project origin.
Input to hosters is an origin and outputs is a project data structure including authors and languages. A hoster identifies the project to generate its outputs from that.
Furthermore, the hosters provide an asset API, which input is an origin and filename and its output is the file content.
All builders shall answer the question if they are responsible for a given language.
Input to builders is an origin and language and outputs are dependencies. A builder identifies the configuration to generate its outputs from that.
The builder asks the hoster to provide data about project files it requires to identify the dependencies.
Input to brokers is an author URI and outputs is an URI to the provider's API.
;; tipesso.provider.foo
(handler in-data) ;=> out-data
Entity relation model:
+------------------------------------------------------------------------------------------------------------------+
| |
+--------+ 1|1 +----------+ 1 1 +------------+ 1 * +----------+ 1 1 +-----------+ 1 1 +---------------+ 1 * +------------+ |
| ORIGIN | -+-> | HOSTER | --> | PROJECT | -+-> | LANGUAGE | --> | BUILDER | --> | CONFIG | --> | DEPENDENCY | --+
+--------+ +----------+ +------------+ | +----------+ +-----------+ +---------------+ +------------+
| :uri | | :type | | :name | | | :name | | :name | | :filename | | :name |
+--------+ | :uri | | :authors | | | :builder | | :config | | :dependencies | | :version |
| :project | | :languages | | +----------+ +-----------+ +---------------+ | :origin |
+----------+ +------------+ | : clojure : : leiningen : : project.clj : +------------+
: github : | : erlang : : rebar : : rebar.config :
+----------+ | +----------+ +-----------+ +---------------+
|
|* +-----------+ 1 * +--------+
+-> | AUTHOR | --> | BROKER |
+-----------+ +--------+
| $tippable | | :api |
| :username | +--------+
| :realname |
| :uri |
+-----------+
Example data structure:
Project => {:origin "https://github.com/djui/tipesso"
:url "https://github.com/djui/tipesso"
:hoster 'github
:name "tipesso"
:id "djui/tipesso"
:description "..."
:assets 'github/asset
:authors [{:username "djui"
:realname "Uwe Dauernheim"
:uri "http://github.com/djui"}
{:username "onlyafly"
:realname "Kevin Albrecht"
:uri "http://github.com/onlyafly"}]
:languages [:Clojure :javascript]
:builder 'leiningen
:dependencies [{:id "org.clojure/clojure"
:version "1.5.1"
:origin "http://..."}
{:id "compojure"
:version "1.1.5"
:origin "http://..."}
{:id "hiccup"
:version "1.0.3"
:origin "http://..."}
{:id "lein-ring"
:version "0.8.3"
:origin "http://..."}]
...