Giter Site home page Giter Site logo

esarbe / votelog Goto Github PK

View Code? Open in Web Editor NEW
6.0 7.0 1.0 19.68 MB

Votelog - logging and evaluating politicians' voting behaviour

Home Page: http://esarbe.github.io/votelog

License: GNU Affero General Public License v3.0

Scala 88.75% Shell 0.12% HTML 0.08% CSS 1.15% Python 9.89%
politics democracy activism votelog scala scalajs

votelog's Introduction

Votelog

votelog is a web application that provides a convenient interface for the Swiss parlaments's Curia Vista database.

The web frontend can be found at http://prototype.votelog.ch/.

Work on the M4 feature set is ongoing.

Up to M3 the following features are planned or implemented:

  • Creation of user accounts

  • Protection of resources using permission framework

  • Creation of organisational accounts

  • Assignment of permissions using roles/capabilites

  • Retrieval of CuriaVista entities such as parliamentarians, affairs, bills and votes

  • Search index for CuriaVista entities

  • Assignment of 'preferred' voting results by organisations

  • Ranking of politicians according to organisations' voting preferences

The votelog part facing the Curia Vista database is written in Python.

Setup VoteLog Server for local development

The server part of votelog is written in Scala and uses sbt for building the software. The following instructions assume that sbt has been installed

Clone and checkout repository

$ git clone [email protected]:esarbe/votelog.git

Running votelog web server

Launch into the sbt build environment

$ cd votelog
$ sbt

Start webserver application:

sbt:votelog> run

HTTP server configuration

The votelog HTTP server application configuration is located at src/main/resources/application.conf. It allows configuration of port and interface the HTTP server listens to. The configuration settings can be overwritten by setting the corresponding environment variables.

Environment Variable Function
CURIAVISTA_DATABASE_URL CuriaVista database URL
CURIAVISTA_DATABASE_PASSWORD CuriaVista database password
CURIAVISTA_DATABASE_USER CuriaVista database user
SECURITY_PASSWORD_SALT application security salt
SECURITY_SECRET application security secret
VOTELOG_DATABASE_URL votelog database URL
VOTELOG_DATABASE_USER votelog database user
VOTELOG_DATABASE_PASSWORD votelog database password
INDEX_DIRECTORY file system directory location for lucene search index files
HTTP_DOMAIN http domain (defaults to votelog.ch )

Votelog REST interface

Documentation for the VoteLog REST API can be found at https://api.votelog.ch/api/v1/doc/

Starting local docker for testing

docker-compose -f testing/postgres.yml up postgres

License

This project is licensed under the AGPL-3.0-or-later. See LICENSE.md

This project includes parts that are licensed unter the The MIT License (MIT). The corresponding source files have an appropriate license header.

votelog's People

Contributors

cucumissativus avatar esarbe avatar rettichschnidi avatar salim-b avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

votelog's Issues

First review

  1. where are tests? :D

  2. PasswordHasherJavaxCrypto

  • factory IMO should be create once (need to check it)
  1. UserStore
  • create should be indepotent
  • delete should delete permissions as well
  • I would use uuid as id, but no strong feelings there
    Capabilities
  • I would treat them more as a separate concern (separate table, with user ID and capability IMO I
    would use pstgresql enum there
  • as for component this tree like structure and handling by spliting strings is a bit fishy, not
    sure if I have a better idea already
  1. Component:
  • There must be uniqueness check, to make sure that no unexpected access is done
  • IMO child should accept component, not string
  • how about keeping information of the absolute path of the component with some indication of root
    (IMO something like in linux file system /top/less/something-else) IMO its less errorprone
  1. Identified:
  • completely dont get the whole idea there

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.