This is the Vosae backend app.
It exposes Vosae resources though an API. A graphic web-interface is available on Github repo naeka/vosae-web.
Branch | Travis-CI build status |
---|---|
master (ready for production) | |
develop |
The Vosae backend application is powered by our favorite language, Python, and relies on these amazing technologies:
- Python
- Django
- MongoDB
- Elasticsearch
- Celery
- Redis
- sqlite (or Mysql)
- Websockets (through Pusher)
- Memcached
You need to meet these requirements before installing the Vosae backend application:
- MongoDB (official documentation)
- Elasticsearch (official documentation)
- Redis (official documentation)
- Memcached (official documentation)
- libevent (or libevent-dev) (official documentation)
$ git clone [email protected]:Naeka/vosae-app.git
$ cd vosae-app/
Using virtualenvwrapper - recommanded:
$ mkvirtualenv vosae-app
Or simply with the virtualenv tool:
$ virtualenv --python=python2.7 --distribute ./
$ source bin/activate
(vosae-app)$ pip install -r requirements.txt
(vosae-app)$ ./manage.py syncdb --migrate
(vosae-app)$ ./manage.py createsuperuser
This will be the user you should use to connect the first time.
It has access to Django admin (available on vosae-app,/admin/
)
The Vosae backend application handle static files with Grunt. There isn't a lot of static files in this app, just a few to handle the authentication process.
You need to have Node.js and Node Package Manager (npm) on your system. If Node isn't on your system, install it now!
$ gem install compass
$ gem install sass
$ gem install sass-rails
$ gem install bootstrap-sass --version 3.1.0.1
$ npm install -g grunt-cli
$ npm install
if it doesn't work (on MacOS), add '/usr/local/share/npm/bin' to /etc/paths
Build files for dev and watch directories for changes
$ grunt
Only build files for development
$ grunt build-dev
Prior to launch the server, a web endpoint (Ember.JS client) settings must be defined.
The VOSAE_WEB_ENDPOINT
environment variable is used for this purpose.
For development, it can be more convenient to set this in a local settings file (not tracked by Git).
In this case, create a local.py
file in the settings
module and fill with:
# -*- coding:Utf-8 -*-
WEB_ENDPOINT = 'http://localhost:8001'
$ cd www/
$ mkdir databases
$ ./mongodb.sh start
$ redis-server
$ elasticsearch -f
(vosae-app)$ ./manage.py runserver
(vosae-app)$ ./manage.py celeryd -v 2 -B -s celery -E -l INFO
Feature branches are branches used when developing a specific feature. It is used thanks to gitflow.
To install gitflow, follow gitflow instructions.
- Use of SPACES for indentation - 4-spaces equivalency
- Class definitions and top methods separated by 2 blank lines, methods inside a class separated by 1 blank line
- No maximum line length but try to be clear and align on multiple lines
- Avoid parentheses use when possible for conditional and loop statements
- Use of SPACES for indentation - 4-spaces equivalency