/monitorizare-vot

Aplicație destinată observatorilor electorali și ONG-urilor care îi acreditează pentru supraveghea alegerilor parlamentare din 2016.

Primary LanguageC#Mozilla Public License 2.0MPL-2.0

Monitorizare Vot - Rest API for mobile apps & web NGO platform

GitHub contributors GitHub last commit License: MPL 2.0

Quality Gate Status Build status

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.

Built With

.Net Core 3.1

Swagger docs for the API are available here.

Repos and projects

Please see more info and docs about the MV apps in the wiki.

Client apps:

Creating the database --- WIP you might encounter issues here.

The Assembly VotingIrregularities.Domain has EF Migrations configured and can generate a database complete with test data.

To do this, follow the steps bellow:

Fill-in appsetings.json OR add in a new appsettings.target.json file the connectionstring to the SQL instance where the DB should be created.

Run the following console command from the VotingIrregularities.Domain.Seed folder:

src\api\VotingIrregularities.Domain.Seed> dotnet run

Important: the migrate action with delete the data from the following tables: Answers, Questions, FormSections, Options.

Test data

  • to test admin features, you will need to add a test NGO and a test NGO admin linked to that NGO
  • to test observer features, you will need to add observer accounts

Deployment

  1. install .NetCore (refer to the Built With section for the proper version) (Open Source/Free/Multiplatform) from here

  2. run the following console command from the src folder:

    src> dotnet restore
  3. run the following console command from the VoteMonitor.Api folder:

    src\api\VoteMonitor.Api> dotnet run
  4. browse to indicated address: http://localhost:5000/swagger

Testing out the API

Use the swagger UI to understand the endpoints and routes; you can also use the UI for token generation (testing out the POST /api/v1/access/token route) For the rest of the endpoints you will need to use this token and inject a header (this is not currently possible using the swagger UI - it is probably a configuration effort - any hints are welcome)

The auth header is

Authorization: Bearer {token}

and it needs to be injected into each request.

Feedback

  • Request a new feature on GitHub.
  • Vote for popular feature requests.
  • File a bug in GitHub Issues.
  • Email us with other feedback contact@code4.ro

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 contact@code4.ro.

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.