Giter VIP home page Giter VIP logo

citizendesk-interface's Introduction

Build Status

Citizen Desk Interface

This is one of the components in the Citizen Desk project

The role of this component within Citizen Desk

Interface stands for Application Programming Interface, that is API. The role of this component is to expose the entities in the database, and the [core][core] functionalities, through an authenticated API. Once exposed, they can be used by a web or mobile frontend, see for example the web [Citizen Desk frontend][frontend].

Technical notes

Installation

This project depends on [Superdesk Server][superdesk_server] which does not specifies all its dependencies, so dependency handling has to be handled with special care, through the superdesk-dependencies.txt file. Currently not all the Superdesk dependencies are added there, but just those that show to be necessary for the used modules.

Notes on dependencies

Eve 0.5-dev is used by Superdesk. Citizen Desk also depends directly on Eve 0.5, because it included a fix to a problem with documents embedding in lists

Running

Like [Eve][eve], this component is a [Flask][flask] application, and therefore a WSGI application. You can refer to the deploying section in the Flask doc in order to have more info about running and deploying the app. Specifically i used Gunicorn in order to serve the app, and you may find a few simple scripts i used in this repository root. The scripts have the dot extension because they can be run using `source

<script>.dot` or `. <script>.dot`. The app will look for a Mongo database on the same machine it is working on, on the standard port, and it will look for an instance of [Citizen Desk Core][core] at a location which is currently hardcoded. Some initialisation scripts are contained in the `initialise` folder. ##### Running locally The current setup is tailored to our development server. In order to run the application locally, please set the `SERVER_NAME` to a value like `localhost:5000` in `citizendesk_interface/settings.py`. Generally, the server name there should match the value sent by your browser in the `Host` header. In order to do troubleshooting, i can advice using `wget` targeted at the API root. For example: wget --header 'Host: http://cd2.sourcefabric.net/citizendesk-interface' http://localhost:5000/ Should work if you are running the app with the `launch-gunicorn.dot` script, but it will not work with your browser because the host will be different. #### Running the tests Running the tests requires an Elastic search and a Mongo instance listening on the standard ports. Refer to the Travis file in case of doubts. [superdesk_server]: https://github.com/superdesk/superdesk-server [core]: https://github.com/sourcefabric-innovation/citizendesk-core [frontend]: https://github.com/sourcefabric-innovation/citizendesk-frontend [eve]: http://python-eve.org/index.html [flask]: http://flask.pocoo.org/

citizendesk-interface's People

Contributors

danse avatar petrjasek avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.