{"id":22665791,"url":"https://github.com/petarvujovic98/rust-graphql-sonic","last_synced_at":"2025-03-29T09:43:42.744Z","repository":{"id":37963800,"uuid":"325556803","full_name":"petarvujovic98/rust-graphql-sonic","owner":"petarvujovic98","description":"An example search application with Sonic and async-graphql written in Rust","archived":false,"fork":false,"pushed_at":"2024-08-26T09:43:08.000Z","size":106,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-04T01:01:53.253Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/petarvujovic98.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-12-30T13:23:53.000Z","updated_at":"2024-08-26T09:43:06.000Z","dependencies_parsed_at":"2024-08-26T11:39:13.238Z","dependency_job_id":"ab41b594-f94d-4ae9-b6e6-32187e07adf1","html_url":"https://github.com/petarvujovic98/rust-graphql-sonic","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petarvujovic98%2Frust-graphql-sonic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petarvujovic98%2Frust-graphql-sonic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petarvujovic98%2Frust-graphql-sonic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petarvujovic98%2Frust-graphql-sonic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/petarvujovic98","download_url":"https://codeload.github.com/petarvujovic98/rust-graphql-sonic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246168090,"owners_count":20734389,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-12-09T13:39:36.008Z","updated_at":"2025-03-29T09:43:42.719Z","avatar_url":"https://github.com/petarvujovic98.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust Graphql Sonic\n\n## Intro\n\nThis is an example project made for demonstrating the use of a search as a service engine\n(such as [Elasticsearch](https://github.com/elastic/elasticsearch),\nor in this case [Sonic](https://github.com/valeriansaliou/sonic)) in a web application\nbackend written in [Rust](https://github.com/rust-lang/rust) using the\n[actix-web](https://actix.rs) web framework and [async-graphql](https://github.com/async-graphql/async-graphql).\n\n## Data\n\nThe project uses the free dataset of [tennis_atp](https://github.com/JeffSackmann/tennis_atp)\ntennis matches and players.\n\nOnly the singles matches are processed by this project.\n\n### Matches files columns\n\nThe columns in the matches files are as follows:\n\n1. turney_id\n2. tourney_name\n3. surface\n4. draw_size\n5. tourney_level\n6. tourney_date\n7. match_num\n8. winner_id\n\u003c!--\n9. winner_seed\n10. winner_entry\n11. winner_name\n12. winner_hand\n13. winner_ht\n14. winner_ioc\n15. winner_age --\u003e\n16. loser_id\n\u003c!--\n17. loser_seed\n18. loser_entry\n19. loser_name\n20. loser_hand\n21. loser_ht\n22. loser_ioc\n23. loser_age --\u003e\n24. score\n25. best_of\n26. round\n27. minutes\n\u003c!--\n28. w_ace\n29. w_df\n30. w_svpt\n31. w_1stIn\n32. w_1stWon\n33. w_2ndWon\n34. w_SvGms\n35. w_bpSaved\n36. w_bpFaced\n37. l_ace\n38. l_df\n39. l_svpt\n40. l_1stIn\n41. l_1stWon\n42. l_2ndWon\n43. l_SvGms\n44. l_bpSaved\n45. l_bpFaced\n46. winner_rank\n47. winner_rank_points\n48. loser_rank\n49. loser_rank_points --\u003e\n\n### Data representation\n\nEach match is represented by a match id which is a combination of the tourney id at which\nthe match was played and the match number,\nand the textual description of the match in the following format:\n\n```rust\nformat!(\n    \"{} beat {} at {} in a {}\",\n    winner_info,\n    loser_info,\n    tourney_info,\n    match_info\n);\n```\n\n## Setup\n\nIn order to run this project you will need to provide PostgreSQL and Sonic server URLs or run this project using `docker-compose`.\n\nBefore running the web server you need to fill the database and Sonic instance with the data which you can do by running the `filler`\nbinary crate or by running the `filler` service with docker-compose. This service requires you to download the tennis_atp repository\nfiles which you can do by running [`setup_project.sh`](https://github.com/petarvujovic98/rust-graphql-sonic/blob/master/setup_project.sh)\nscript.\n\n## Running the project\n\n### Fill database and sonic\n\n```shell\ncargo run --bin filler ./tennis_atp\n```\n\nor with docker-compose:\n\n```shell\ndocker-compose up filler\n```\n\n### Run server\n\n```shell\ncargo run --bin server\n```\n\nor with docker-compose:\n\n```shell\ndocker-compose up server\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetarvujovic98%2Frust-graphql-sonic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpetarvujovic98%2Frust-graphql-sonic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetarvujovic98%2Frust-graphql-sonic/lists"}