/virtual-boards

Web application that displays virtual boards for personal organization (useful for TODO lists, project management, ...)

Primary LanguagePythonGNU General Public License v2.0GPL-2.0

PROJECT UNDER DEVELOPMENT

Overview

Virtual Boards application represents boards containing columns that contains notes.

Notes can represent a shopping list, a project management board, ...

installation

get the source :

git clone URL

install virtualenv

pip install virtualenv --user

launch virtualenv

source venv/bin/activate

install flask and other external flask modules

pip install flask flask-script flask-sqlalchemy flask-migrate flask-restful

run python command

python main.py runserver

create database

python main.py db init
python main.py db migrate
python main.py db upgrade

REST API Documentation

For all requests, the default output format is a HTML page. It is possible to ask a JSON output by adding a get parameter with name type and value json.

Example :

http://host:port/v1/?type=json

output :

{

"board-interactions": [...], "boards": [...], "column-interactions": [...], "columns": [...], "notes": [...]

}

In some cases (i.e. HTML forms), PUT and DELETE methods are not allowed. To cope with this limitation, it is possible to define in the POST request an optional field with name request-type with values delete, put to use DELETE and PUT methods instead.

GET all the boards

Usage Example:

curl <ROOT URL>/v1/boards/?type=json

ADD a board

exemple:

curl -X POST <HOST>/v1/boards/ --data "name=new-board" {"code": 201, "description": "created"}

ADD a column

exemple:

curl -X POST <HOST>/v1/columns/ --data "name=new-column" {"code": 201, "description": "created"}

ADD a note

  • URL: http://host:port/v1/notes/
  • request method: POST
  • parameters :
    • name: (string) name of the note
    • content: (string) content of the note

usage example:

curl <HOST>/v1/notes/ -X POST --data "name=test&text=description"

output:

{

"code": 201, "description": "created"

}

DELETE a board

example:

curl -X DELETE <HOST>/v1/boards/ --data "id=2" {"code": 204, "description": "No content: The request was processed successfully, but no response body is needed."}

DELETE a column

example:

curl -X DELETE <HOST>/v1/columns/ --data "id=2" {"code": 204, "description": "No content: The request was processed successfully, but no response body is needed."}

DELETE a note

example:

curl -X DELETE <HOST>/v1/notes/ --data "id=2" {"code": 204, "description": "No content: The request was processed successfully, but no response body is needed."}

MODIFY a board

example:

curl -X DELETE <HOST>/v1/boards/ --data "id=2&name=modified_name" {"code": 204, "description": "No content: The request was processed successfully, but no response body is needed."}

MODIFY a column

example:

curl -X DELETE <HOST>/v1/columns/ --data "id=2&name=modified_name" {"code": 204, "description": "No content: The request was processed successfully, but no response body is needed."}

MODIFY a note

  • URL: http://host:port/v1/notes/<NOTE-ID>
  • request method: PUT
  • optional parameters :
    • name: (string) name of the note
    • content: (string) content of the note

curl -X DELETE <HOST>/v1/notes/ --data "id=2&name=modified_name" {"code": 204, "description": "No content: The request was processed successfully, but no response body is needed."}

ADD a column in a board

curl -X POST <HOST>/v1/boards-content/ --data "board-id=1&column-id=1" {"code": 201, "description": "created"}

ADD a note in a column

curl -X POST <HOST>/v1/columns-content/ --data "note-id=1&column-id=1" {"code": 201, "description": "created"}

DELETE a column in a board

curl -X DELETE <HOST>/v1/boards-content/ --data "board-id=1&column-id=1" {"code": 204, "description": "No content: The request was processed successfully, but no response body is needed."}

DELETE a note in a column

curl -X DELETE <HOST>/v1/columns-content/ --data "note-id=1&column-id=1" {"code": 204, "description": "No content: The request was processed successfully, but no response body is needed."}

TODO list

  • integrate in the documentation CURL calls
  • make html5+js client with polymer
  • prototype of droppelganger drag and drop library for mobiles (can be simple in the first version)