{"id":48836657,"url":"https://github.com/andrei-punko/voting-service","last_synced_at":"2026-04-14T23:36:13.635Z","repository":{"id":105079118,"uuid":"283485624","full_name":"andrei-punko/voting-service","owner":"andrei-punko","description":"Voting service test task","archived":false,"fork":false,"pushed_at":"2025-03-18T10:22:00.000Z","size":495,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-18T11:33:33.020Z","etag":null,"topics":["spring-boot-application","voting-application","voting-service"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andrei-punko.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-29T11:53:07.000Z","updated_at":"2025-03-18T10:22:04.000Z","dependencies_parsed_at":"2024-02-03T12:29:51.902Z","dependency_job_id":"604c25aa-0e22-4d6c-a582-42c4f868e5e4","html_url":"https://github.com/andrei-punko/voting-service","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andrei-punko/voting-service","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrei-punko%2Fvoting-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrei-punko%2Fvoting-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrei-punko%2Fvoting-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrei-punko%2Fvoting-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrei-punko","download_url":"https://codeload.github.com/andrei-punko/voting-service/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrei-punko%2Fvoting-service/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31820121,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T18:05:02.291Z","status":"ssl_error","status_checked_at":"2026-04-14T18:05:01.765Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["spring-boot-application","voting-application","voting-service"],"created_at":"2026-04-14T23:36:10.321Z","updated_at":"2026-04-14T23:36:13.609Z","avatar_url":"https://github.com/andrei-punko.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Voting REST service (test task)\r\n\r\n![Java CI with Maven](https://github.com/andrei-punko/voting-service/workflows/Java%20CI%20with%20Maven/badge.svg)\r\n[![Coverage](.github/badges/jacoco.svg)](https://github.com/andrei-punko/voting-service/actions/workflows/maven.yml)\r\n[![Branches](.github/badges/branches.svg)](https://github.com/andrei-punko/voting-service/actions/workflows/maven.yml)\r\n\r\n## Prerequisites\r\n\r\n- Maven 3\r\n- JDK 21\r\n- K6 for performance tests (install according to [manual](https://k6.io/docs/getting-started/installation))\r\n\r\n## Implement Voting REST service with next operations\r\n\r\n- Get candidates (should be read from JSON file during app start)\r\n- Make vote (by passport id) (no double vote allowed)\r\n- Get voting results\r\n\r\n## How to build project\r\n\r\n    mvn clean install\r\n\r\n## How to start application\r\n\r\nUse `run.bat` script in project root folder or use `docker-compose`:\r\n\r\n```\r\ndocker-compose up\r\n```\r\n\r\n## Swagger documentation page\r\n\r\nhttp://localhost:8090/swagger-ui/index.html\r\n\r\n## Useful CURL commands\r\n\r\n### Get candidates\r\n\r\n```bash\r\ncurl http://localhost:8090/candidates\r\n```\r\n\r\n### Get voting results\r\n\r\n```bash\r\ncurl http://localhost:8090/votings\r\n```\r\n\r\n### Get voting results for particular candidate\r\n\r\n```bash\r\ncurl http://localhost:8090/votings/3\r\n```\r\n\r\n### Make vote\r\n\r\n```bash\r\ncurl -i -X POST http://localhost:8090/votings/3 \\\r\n  -H \"Content-Type: application/json\" \\\r\n  -d \"{ \\\"passportId\\\": \\\"MP345353634547\\\"}\"\r\n```\r\n\r\n### Delete voting results\r\n\r\n```bash\r\ncurl -i -X DELETE http://localhost:8090/votings\r\n```\r\n\r\n## How to run Spock-based functional tests\r\n\r\n```bash\r\ncd func-test\r\n./gradlew clean build\r\n```\r\n\r\nCheck tests report at `./func-test/build/spock-reports/index.html`\r\n\r\n## How to run k6-based performance tests\r\n\r\n```bash\r\ncd load-test\r\nk6 run script.js\r\n```\r\n\r\nCheck tests report in console\r\n\r\n## YouTube video with description of the project refactoring\r\n\r\n[Рефакторинг Spring Boot сервиса из тестового задания](https://youtu.be/esueccOEQZE)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrei-punko%2Fvoting-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrei-punko%2Fvoting-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrei-punko%2Fvoting-service/lists"}