Skip to content

Commit

Permalink
Improve Documentation (Closes #140, #26, #104, #133
Browse files Browse the repository at this point in the history
  • Loading branch information
sveneisenschmidt authored Jan 2, 2018
1 parent b7bc18d commit ed5bcf9
Show file tree
Hide file tree
Showing 34 changed files with 939 additions and 1,557 deletions.
12 changes: 12 additions & 0 deletions .docker.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
APP_MODE=web
APP_ENV=dev
APP_DEBUG=1
DATABASE_HOST=mysqldb
DATABASE_NAME=dev
DATABASE_USER=root
DATABASE_PASSWORD=root
REDIS_HOST=redis
REDIS_PORT=6379
MAILER_URL=smtp://mail:1025
BLACKFIRE_SERVER_ID=UNKOWN
BLACKFIRE_SERVER_TOKEN=UNKOWN
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
/web/bundles/
/node_modules
/.idea
/.vscode
/config/integration/*
!config/integration/.gitkeep
coverage.xml
Expand Down
38 changes: 19 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@ PROJECT := yay
DOCKER_ENV ?= dev

all:
# start Start the application
# stop Stop the application
# restart Restart the application
# build Build the application including development environment
# clean Cleans cache files, logs
# cleanall Cleans containers, images and project files including caches, logs
# install Install and build the application including development environment
# test Run application tests
# test-coverage Run application tests and generate code coverage
# shell Start an interactive shell session
# default-publish Publish demo docker image to sveneisenschmidt/yay
# enable-demo Import demo data
# disable-demo Remove demo data
# enable-github Import demo data
# disable-github Remove demo data
# demo-publish Publish demo docker image to sveneisenschmidt/yay-demo
# watch-logs Watch all log files
# watch-redis Watch all redis queries
# start Start the application
# stop Stop the application
# restart Restart the application
# build Build the application including development environment
# clean Cleans cache files, logs
# cleanall Cleans containers, images and project files including caches, logs
# install Install and build the application including development environment
# test Run application tests
# test-coverage Run application tests and generate code coverage
# shell Start an interactive shell session
# default-publish Publish demo docker image to sveneisenschmidt/yay
# enable-demo Import demo data
# disable-demo Remove demo data
# enable-github Import demo data
# disable-github Remove demo data
# demo-publish Publish demo docker image to sveneisenschmidt/yay-demo
# watch-logs Watch all log files
# watch-redis Watch all redis queries

# Includes
include makedefs/*.mk
Expand Down Expand Up @@ -72,4 +72,4 @@ publish-demo:

watch-logs: .application-watch-logs

watch-redis: .application-watch-redis
watch-redis: .application-watch-redis
133 changes: 46 additions & 87 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,100 +1,59 @@
[![Build Status](https://travis-ci.org/sveneisenschmidt/yay.svg?branch=master)](https://travis-ci.org/sveneisenschmidt/yay) [![codecov](https://codecov.io/gh/sveneisenschmidt/yay/branch/master/graph/badge.svg)](https://codecov.io/gh/sveneisenschmidt/yay) [![StyleCI](https://styleci.io/repos/85753371/shield?branch=master)](https://styleci.io/repos/85753371) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Docker Hub](https://img.shields.io/badge/Docker_Hub-.../yay:stable-green.svg)](https://hub.docker.com/r/sveneisenschmidt/yay/) [![Docker Hub](https://img.shields.io/badge/Docker_Hub-.../yay:dev-orange.svg)](https://hub.docker.com/r/sveneisenschmidt/yay/) [![Docker Hub](https://img.shields.io/badge/Docker_Hub-.../yay--demo:stable-green.svg)](https://hub.docker.com/r/sveneisenschmidt/yay-demo/) [![Docker Hub](https://img.shields.io/badge/Docker_Hub-.../yay--demo:dev-orange.svg)](https://hub.docker.com/r/sveneisenschmidt/yay-demo/)
[Table of Contents](docs/README.md) | [Getting Started](docs/getting-started.md) | [Customisation](docs/customisation.md) | [Examples](docs/examples.md) | [Under The Hood](docs/under-the-hood.md) | [Contributing](docs/contributing.md)

# ![yay](docs/src/logo.png) What is Yay?

## The Idea
> Gamification can be applied to all technical and non-technical tasks during our daily working life. Everything can be gamified.
---

<p align="center">
<img title="Yay!" src="docs/src/cycle.svg" width="375">
<img alt="Yay! Logo" src="docs/src/logo.svg" height="168" />
<h3 align="center">Yay!</h3>
<p align="center">Gamification done simple.</p>
<p align="center">
<a href="https://travis-ci.org/sveneisenschmidt/yay">
<img src="https://travis-ci.org/sveneisenschmidt/yay.svg?branch=master" alt="Build Status">
</a>
<a href="https://codecov.io/gh/sveneisenschmidt/yay">
<img src="https://codecov.io/gh/sveneisenschmidt/yay/branch/master/graph/badge.svg" alt="codecov">
</a>
<a href="https://styleci.io/repos/85753371">
<img src="https://styleci.io/repos/85753371/shield?branch=master" alt="StyleCI">
</a>
<a href="https://opensource.org/licenses/Apache-2.0">
<img src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" alt="License">
</a><br>
<a href="https://hub.docker.com/r/sveneisenschmidt/yay/">
<img src="https://img.shields.io/badge/docker-.../yay:stable-green.svg" alt="Docker Hub">
</a>
<a href="https://hub.docker.com/r/sveneisenschmidt/yay/">
<img src="https://img.shields.io/badge/docker-.../yay:dev-orange.svg" alt="Docker Hub">
</a>
<a href="https://hub.docker.com/r/sveneisenschmidt/yay/">
<img src="https://img.shields.io/badge/docker-.../yay--demo:stable-green.svg" alt="Docker Hub">
</a>
<a href="https://hub.docker.com/r/sveneisenschmidt/yay/">
<img src="https://img.shields.io/badge/docker-.../yay--demo:dev-orange.svg" alt="Docker Hub">
</a>
</p>
<p align="center">
<a href="docs/getting-started.md">
<img src="docs/src/getting-started.svg" height="32">
</a>
</p>
</p>

## Implementation
Yay is a **gamification engine**, exposing a web service API, to bring everyone the joy of gamification and integrating any kinds of gamification features into your organisation. Yay originally started as a 36 hours hackathon project at [trivago]#(https://github.com/trivago) to bring gamification features to our organisation. To integrate yay into many application landscapes it offers flexible extension points to write your own integrations.

### Demo
See Yay in action at [https://yay-demo.sloppy.zone/api/doc](https://yay-demo.sloppy.zone/api/doc) - hosted by the awesome [https://sloppy.io](sloppy.io) platform. ([Docker hub image](https://hub.docker.com/r/sveneisenschmidt/yay-demo/), [Docker CMD script](dist/docker-run.demo.sh), [Docker build command](Makefile))

## Documentation
How-to-use demo, installation instructions, configuration examples and extension documentation:

* [Installation](docs/installation.md)
* [Configuration](docs/configuration.md)
* [API](docs/api.md)
* [Demo](docs/demo.md)
* [Development](docs/development.md)
* [Events](docs/events.md)
* [Mail notifications](docs/mails.md)
* Guides
* [How to run Yay on sloppy.io with yay-recipes-sloppy](https://github.com/sveneisenschmidt/yay-recipes-sloppy)
* [How to write and configure your integration](docs/guides/integrations.md)
* [How to write and configure your webhooks](docs/guides/webhooks.md)
## Installation
Yay is tested and packable to run through Docker on any operating system that supports Docker.

* [Installation](docs/installation.md)
* [Images on Docker Hub](https://hub.docker.com/r/sveneisenschmidt/yay/tags/)

```Dockerfile
FROM sveneisenschmidt/yay:stable
---

# Bake your custom integration into the image
COPY ./integration/mycompany.yml ./data/integration/mycompany.yml
Yay is a **gamification engine** directly exposing a web service API to bring everyone the joy of gamification and integrating any kinds of gamified features into your organisation. The project originally started as a 36 hours hackathon project at [trivago](https://github.com/trivago). Yay's aim is to integrate into many different types of application landscapes by offering extension points that are flexible and easy to use with the ultimate goal to write your own and tailored integration.

# Bake your custom run script into the image
# Example: dist/docker-run.demo.sh
#
COPY ./mycompany-docker-run.sh docker-run.sh
```

## Yay Usage
```bash
curl -X "POST" http://localhost:50080/api/progress/ \
-d "{\"username\":\"jane.doe\",\"action\":\"example-action\"}"

[
{
"name": "example-achievement-01",
"label": "example-achievement-01",
"description": "example-achievement-01",
"points": 50,
"achieved_at": "2017-10-08T13:22:08+0000",
"links": {
"self": "http://localhost:50080/api/players/jane.doe/personal-achievements/",
"player": "http://localhost:50080/api/players/jane.doe/",
"achievement": "http://localhost:50080/api/achievements/example-achievement-01/"
}
}
]
```

Additionally Yay supports integrating third party applications via webhooks. For a start Yay is shipped with support for GitHub, more platforms will follow soon. Until then you can follow the webhook guide "[How to write and configure your webhooks](docs/guides/webhooks.md)" or write and maybe even support your own webhooks/processors, yay!
> Gamification can be applied to all technical and non-technical tasks during our daily working life. Everything can be gamified.
```yml
integration:
webhooks:
incoming_processors:
example-processor:
type: chain
arguments:
- [ example-github, example-users ]
example-github:
type: class
class: Yay\ThirdParty\Github\Webhook\Incoming\Processor\GithubProcessor
example-users:
type: static-map
arguments:
- username
-
octocat: jane.doe
```
URL: `/webhook/incoming/example-processor/`.
<p align="center">
<img alt="Yay! Demo" src="docs/src/teaser.gif" />
</p>

## Get Yay Support and Help
## Documentation

**Reporting Issues**: To report an issue with Yay, please create an Issue here on github: https://github.com/sveneisenschmidt/yay/issues
Documentation can be found in the [docs folder](docs/README.md). Want to try it out or develop it further, please see the [Contributing](contributing.md) documentation. It provides everything to get you started. **Yay, isn't that awesome!**


## License
---

This project is released under the terms of the [Apache 2.0 license](http://www.apache.org/licenses/LICENSE-2.0).
Would you like to fix something in the documentation? Feel free to open an [issue](https://github.com/sveneisenschmidt/yay/issues).
33 changes: 7 additions & 26 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,8 @@ web:
- mail
volumes:
- ./:/data:cached
environment:
APP_MODE: web
APP_ENV: dev
APP_DEBUG: 1
DATABASE_HOST: mysqldb
DATABASE_NAME: dev
DATABASE_USER: root
DATABASE_PASSWORD: root
REDIS_HOST: redis
REDIS_PORT: 6379
MAILER_URL: smtp://mail:1025
env_file:
- .docker.env

# Command Line Tools
cli:
Expand All @@ -31,17 +22,8 @@ cli:
- mail
volumes:
- ./:/data:cached
environment:
APP_MODE: web
APP_ENV: dev
APP_DEBUG: 1
DATABASE_HOST: mysqldb
DATABASE_NAME: dev
DATABASE_USER: root
DATABASE_PASSWORD: root
REDIS_HOST: redis
REDIS_PORT: 6379
MAILER_URL: smtp://mail:1025
env_file:
- .docker.env

# MySQL
mysqldb:
Expand All @@ -60,14 +42,13 @@ redis:
# Profiler
blackfire:
image: blackfire/blackfire
environment:
- BLACKFIRE_SERVER_ID
- BLACKFIRE_SERVER_TOKEN
ports:
- "8707:8707"
env_file:
- .docker.env

# Mail
mail:
image: schickling/mailcatcher
ports:
- "50081:1080"
- "50081:1080"
28 changes: 28 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
**Table of Contents** | [Getting Started](getting-started.md) | [Customisation](customisation.md) | [Examples](examples.md) | [Under The Hood](under-the-hood.md) | [Contributing](contributing.md)


---

# Documentation

* [Getting Started](getting-started.md)
* [Requirements](getting-started.md#requirements)
* [Installation](getting-started.md#installation)
* [Configuration](getting-started.md#configuration)
* [Usage / API](getting-started.md#usage--api)
* [Customisation](customisation.md)
* [Integration with Third-Parties](customisation.md#integration-with-third-parties)
* [Hosting](customisation.md#hosting)
* [Templates](customisation.md#templates)
* [Examples](examples.md)
* [Usage / API](examples.md#usage--api)
* [Demo](examples.md#demo)
* [Under The Hood](under-the-hood.md)
* [Commands](under-the-hood.md#commands)
* [Events](under-the-hood.md#events)
* [Webhooks](under-the-hood.md#webhooks)
* [Contributing](contributing.md)
* [Setup](contributing.md#setup)
* [Test](contributing.md#test)
* [Commit](contributing.md#commit)
* [Pull Request](contributing.md#pull-request)
Loading

0 comments on commit ed5bcf9

Please sign in to comment.