Giter Site home page Giter Site logo

code4romania / monitorizare-vot-ong Goto Github PK

View Code? Open in Web Editor NEW
16.0 18.0 44.0 6.95 MB

NGO dashboard for viewing answers submitted by certified observers

Home Page: https://votemonitor.org

License: Mozilla Public License 2.0

TypeScript 63.68% HTML 26.85% SCSS 9.47%
civic-tech civic-hacking code4ro elections monitoring election-data election-monitoring monitoring-elections hacktoberfest

monitorizare-vot-ong's Introduction

Monitorizare Vot Admin ONG - Admin app for NGOs that send observers

GitHub contributors GitHub last commit License: MPL 2.0

See the project live

Monitorizare Vot is a mobile app for monitoring elections by authorized observers. They can use the app in order to offer a real-time snapshot on what is going on at polling stations and they can report on any noticeable irregularities.

The NGO-s with authorized observers for monitoring elections have real time access to the data the observers are transmitting therefore they can report on how voting is evolving and they can quickly signal to the authorities where issues need to be solved.

Moreover, where it is allowed, observers can also photograph and film specific situations and send the images to the NGO they belong to.

The app also has a web version, available for every citizen who wants to report on election irregularities. Monitorizare Vot was launched in 2016 and it has been used for the Romanian parliamentary elections so far, but it is available for further use, regardless of the type of elections or voting process.

Contributing | Built with | Repos and projects | Deployment | Feedback | License | About Code4Ro

Contributing

This project is built by amazing volunteers and you can be one of them! Here's a list of ways in which you can contribute to this project. If you want to make any change to this repository, please make a fork first.

Help us out by testing this project in the staging environment. If you see something that doesn't quite work the way you expect it to, open an Issue. Make sure to describe what you expect to happen and what is actually happening in detail.

If you would like to suggest new functionality, open an Issue and mark it as a [Feature request]. Please be specific about why you think this functionality will be of use. If you can, please include some visual description of what you would like the UI to look like, if you are suggesting new UI elements.

Also, this is the workflow we follow.

Built With

Angular 9

Typescript 3.5.3

Swagger docs for the API are available here. To authenticate please login using the test credentials via the POST/api/v2/access/authorize endpoint. Add the received auth token to authorize calls in Swagger, in the format: Bearer AUTH_CODE_HERE.

Repos and projects

You can find out more info & docs about the project in this wiki.

MV related repos:

Deployment

This project was generated with angular-cli.

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

  • ng serve --environment=qa or npm run start-qa for a dev server with configs for QA.
  • ng serve --environment=prod or npm run start-prod for a dev server with configs for Prod
  • ng serve --environment=local or npm run start-local for a dev server with configs for local backend.

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive/pipe/service/class.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the -prod flag for a production build.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor. Before running the tests make sure you are serving the app via ng serve.

Staging environment

Feedback

  • Request a new feature on GitHub.
  • Vote for popular feature requests.
  • File a bug in GitHub Issues.
  • Email us with other feedback [email protected]

License

This project is licensed under the MPL 2.0 License - see the LICENSE file for details

About Code4Ro

Started in 2016, Code for Romania is a civic tech NGO, official member of the Code for All network. We have a community of over 500 volunteers (developers, ux/ui, communications, data scientists, graphic designers, devops, it security and more) who work pro-bono for developing digital solutions to solve social problems. #techforsocialgood. If you want to learn more details about our projects visit our site or if you want to talk to one of our staff members, please e-mail us at [email protected].

Last, but not least, we rely on donations to ensure the infrastructure, logistics and management of our community that is widely spread across 11 timezones, coding for social change to make Romania and the world a better place. If you want to support us, you can do it here.

monitorizare-vot-ong's People

Contributors

andrei0872 avatar andreiio avatar aniri avatar apetcu avatar armagedon0097 avatar botosio avatar brunomag avatar bvizureanu avatar catileptic avatar cristian-stoicescu avatar damianr13 avatar dependabot[bot] avatar dhont avatar gheorghelupu17 avatar idormenco avatar jrstrayhorn avatar lidiadev avatar manugirgel avatar mihaisavezi avatar nerdfacerory avatar nicolaes avatar paul-antal avatar pushpikawan avatar raducstefanescu avatar razvanciuca avatar sandrohanea avatar stefan-ovezea avatar tbgdn avatar utwo avatar vladcuciureanu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

monitorizare-vot-ong's Issues

[Create and edit forms] Add questions to form

API

  • add a call to add a new question to the form
  • add call info in swagger docs

Frontend

Best practices

  • codebase language should be English
  • we ๐Ÿ’• unit tests

  • API task: enhance API with new endpoint - /api/v1/formular/{cod_formular}/intrebare where you can POST with a Question that will be added to the Form
  • Frontend task - add a frontend placeholder for inserting a new question and adding it to the form

Annotate notes

Problem: Notes are not possible to process automatically. To make sense of them they need to be somehow processed for further analysis. Our analysts (2 of them) were going through all the notes tagging them. As they have been working on semi-incremental exports they might have analyse same notes twice. It was also hard to then analyze those notes in total.

I propose to move this annotation process into the platform. That would look as following:

  • notifications / list of new unprocessed notes
  • possibly filtering nodes by modulo of number of people analyzing them so same note won't be processed by many people
  • each note will be shown with photo / video next to it and also the linked question and answer
  • analysts will be able to add free-form tags to each note
  • while adding tags the ones already existing will be auto-suggested
  • list of all the notes filtered by question, tag, person/team
  • nice-to-have: ability to merge tags
  • simple statistics based on tags, questions, polling stations

[Create and edit forms] Edit questions on form

API

  • add a call to update question on form
  • add call info in swagger docs

Frontend

  • display question data
  • implement a wizard similar to google form for editing question data
  • just like in Google forms, if you are in edit mode on a form, everything can be edited at any moment, there is no edit button per question

Best practices

  • codebase language should be English
  • we ๐Ÿ’• unit tests

Tasks:

  • FE: implement functionality of editing questions and options on forms
  • BE: implement functionality of accepting PUT operations on questions

Punere in picioare baza locala

Guys, aveti idee ce sa fac ca sa rulez proiectul local ?

Eroare pe care o primesc Format of the initialization string does not conform to specification starting at index 0. in RaspunsuriQueryHandler la linia 26, variabila sectiiCuObservatori are pe Results Views o expectie cu acest mesaj

Claim Organizator

  • Citire claim "Organizator"
  • In cazul in care utilizatorul este Organizator, nu mai trebuie filtrare query-urile dupa IdOng

Interface to define forms

Would be very cool and allow observer core team to see how will it look in the app. Are some questions not mandatory. Is it better to frame sth as a seprate question, as a extra answer within the options or as an ask to add a note.

  • define forms
  • export forms in Word document (so paper forms can be handed-in as well to observers that will correspond 1-to-1 to app forms)

Endpoint GET /api/v1/statistici

Consideram ca primim din token-ul JWT si informatiile
{idONG}

Filtru (din model) contine :
public int Page { get; set; }
public int PageSize { get; set; }

Pentru

  • Top sesizari / judete
  • Top sesizari / sectii
  • Top sesizari la deschidere (A) / judete
  • Top sesizari la numarare (C) / judete
  • Top numar de observatori / judete

Reports

  • map where are observers
  • map with metrics overlayed over administrative boundaries
  • status of forms filled and notes count by each observer / team
  • simple pie charts for each questions
  • temporal reports: see what commissions have started counting at which hour, how long did it take, etc.
  • total amount spend observing
  • number of active observers / total observers

Endpoint GET /api/v1/raspunsuri

Consideram ca primim din token-ul JWT si informatiile
{idONG}

Filtru (din model) contine :
public int Page { get; set; }
public int PageSize { get; set; }
public bool Urgent { get; set; }

Trebuie adusa o lista cu toate sectiile de votare [tabela:SectieDeVotare] la care au raspuns observatorii [tabela:Observator] ce tin de {idOng} care au raspuns la intrebarile din formulare [tabela:Raspuns] marcate cu RaspunsCuFlag==Urgent [tabela RaspunsDisponibil, coloana RaspunsCuFlag].

Query-ul trebuie facut paginat si ordonat dupa DataUltimeiModificari desc

[Create and edit forms] Add new form

API

  • add a call to add a new form
  • add call info in swagger docs

Frontend

Best practices

  • codebase language should be English
  • we ๐Ÿ’• unit tests

  • API task - add a POST to formular API to save a new form in the backend
  • Frontend task - add a new page for creating and saving a form

Create form - add new form

frontend: Typescript warnings

npm WARN tarball tarball data for [email protected] (sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q=) seems to be corrupted. Trying one more time.

npm WARN The package typescript is included as both a dev and production dependency.

@angular/[email protected] requires typescript@'>=2.0.2 <2.3.0' but 2.9.2 was found instead.
Using this version can result in undefined behaviour and difficult to debug problems.

Please run the following command to install a compatible version of TypeScript.

    npm install typescript@'>=2.0.2 <2.3.0'

To disable this warning run "ng set warnings.typescriptMismatch=false".

The --missing-translation parameter will be ignored because it is only compatible with Angular version 4.2.0 or higher. If you want to use it, please upgrade your Angular version.

Running on node:10

[Create and edit forms] Mark questions as being red flags

API

  • add a call to mark question as read flag
  • add call info in swagger docs

Frontend

  • a checkbox should be available for each question in order to mark it as red flag
  • screen mockups available here: http://bit.ly/2L0tNG2

Best practices

  • codebase language should be English

  • we ๐Ÿ’• unit tests

  • FE: add a red flag marker for a specific option on a question in frontend

  • BE: enhance forms controller to accept red flag indicator as part of the model received from frontend

[Create and edit forms] List available forms

API

  • add a call to retrieve available forms
  • add call info in swagger docs

Frontend

  • display available forms
  • for each form display code, name and action buttons for viewing, editing and deleting a form
  • screen mockups available here: http://bit.ly/2L0tNG2

Best practices

  • codebase language should be English
  • we ๐Ÿ’• unit tests

  • API subtask: create a new API endpoint /api/v1/formulare/meta that return the name of the available form (form code), the description (form description) and if the form is completed or draft (form completed flag)
  • Frontend subtask: display the available forms, their state and actions pertaining for each form, as per the screen mockups

Form set page

Adding notes

Sometimes observers pass information to coordinators through other channels than the app. Coordinators should be able to input notes / photos on behalf of the teams.

Model Raspuns Paginare

Adaugare model raspuns paginare

Includerea campului de Total in modelul de Paginare existent.

Util pentru utilizarea modelului in raspunsuri de la server catre client.

Coordinators

Have in the system the concept of coordinators who are taking care of group of observers/teams

  • coordinators could pass on observers between themselves (group of observers)
  • what's app invite link to the group between coordinator and an observer/team so another person can step in
  • dashboard of a coordinator
    • all their observers / teams
    • where are they

Filtre statistici

Legat de filtrele pentru anumite statistici, cum s'au modificat recent, nu am o explicatie sau un design si flow, le voi exclude din lista de statistici.

De vazut cum integram aceste statisici la urmatoarea versiune

[Create and edit forms] Delete questions

API

  • add a call to delete question from form
  • add call info in swagger docs

Frontend

  • implement a way to delete questions from forms

Best practices

  • codebase language should be English

  • we ๐Ÿ’• unit tests

  • FE: implement a delete button for questions on forms panel along with delete functionality

  • BE: enhance forms controller to accept a delete operation on a question of a form

Endpoint GET /api/v1/formulare

Filtru (din model) contine :

  • public string IdFormular { get; set; }

Returneaza structura formularului pe baza id-ului acestuia.

[Create and edit forms] Edit form details

API

  • add a call to update information about a form
  • add call info in swagger docs

Frontend

  • display an edit form button in the list of available forms
  • implement screen for editing form data

Best practices

  • codebase language should be English
  • we ๐Ÿ’• unit tests

  • API task: update /api/v1/formulare endpoint to accept a PUT method on an existing form, to update the information of that particular form
  • Frontend task: display an edit button on form list view, features to edit form code, form description, edit flag that marks if a form is completed

Volunteer management

Feats

  • some basic ones
  • Observers want to use two devices - it should be handled by the backend (two virtual observers)

500error on respone page

500 thrown by https://mvngo.azurewebsites.net/api/v1/raspunsuri?page=1&pageSize=5&urgent=true
translate/entities branch

Endpoint GET /api/v1/note

Filtru (din model) contine :

  • public int IdSectieDeVotare { get; set; }
  • public int IdObservator { get; set; }

Returneaza notele atasate unei sesizari pe baza id-ului observatorului si id-ului sectiei de votare, ordonate crescator dupa id formular si cod sectiune.

Statistici - model return

Adaugare model de response pentru statisticile simple:

Lista de:
public string Label {get; set;}
public string Value {get; set;}

  • model PaginareRaspuns (Page; PageSize; Total)

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.