{"id":17031373,"url":"https://github.com/breandan/seai-client-template","last_synced_at":"2026-03-05T23:41:50.186Z","repository":{"id":76906629,"uuid":"301660084","full_name":"breandan/seai-client-template","owner":"breandan","description":"Client Template for SEAI Project (COMP 598, Fall 2020)","archived":false,"fork":false,"pushed_at":"2021-10-07T02:48:06.000Z","size":80,"stargazers_count":1,"open_issues_count":0,"forks_count":5,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-09-09T19:41:43.187Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","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/breandan.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-10-06T08:22:37.000Z","updated_at":"2021-10-07T02:48:09.000Z","dependencies_parsed_at":"2024-01-14T06:09:37.373Z","dependency_job_id":null,"html_url":"https://github.com/breandan/seai-client-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/breandan/seai-client-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/breandan%2Fseai-client-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/breandan%2Fseai-client-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/breandan%2Fseai-client-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/breandan%2Fseai-client-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/breandan","download_url":"https://codeload.github.com/breandan/seai-client-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/breandan%2Fseai-client-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30156125,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T22:39:40.138Z","status":"ssl_error","status_checked_at":"2026-03-05T22:39:24.771Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2024-10-14T08:23:55.810Z","updated_at":"2026-03-05T23:41:50.154Z","avatar_url":"https://github.com/breandan.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Client Template for SEAI Project\n\nThis is a project template for [COMP 598: Software Engineering for Building Intelligent Systems](https://github.com/jin-guo/COMP598_Fall2021), currently offered at McGill University.\n\n## Getting Started\n\n1. Make sure you are connected to the [CS VPN](https://www.cs.mcgill.ca/docs/remote/dynamic/) (e.g. `ssh -D 9000 [username]@ubuntu.cs.mcgill.ca`).\n2. Check to see that you can access the Movie API service, [`http://fall2021-comp598.cs.mcgill.ca:8080`](http://fall2021-comp598.cs.mcgill.ca:8080). (You should see \"Movie API Service\".)\n3. Try out some REST requests and replies (`/user/[USER_ID]`, `/movie/[MOVIE_ID]`)\n4. Fork and clone this template. This fork will reside on your team's shared repository.\n5. Clone your fork onto your local development environment.\n6. Log onto your team's VM with the team credentials (i.e. `ssh team[TEAM_NUMBER]@fall2021-comp598-[TEAM_NUMBER].cs.mcgill.ca`). This requires you to have first sent us your public key.\n7. Clone your fork onto the remote development environment if you have not already done so.\n8. Run `./gradlew run` from inside the project directory. This may take a minute or two initially.\n9. Check that your service is running by visiting [`http://fall2021-comp598-[TEAM_NUMBER].cs.mcgill.ca:8082/recommend/[USER_ID]`](http://fall2021-comp598-[TEAM_NUMBER].cs.mcgill.ca:8082/recommend/[USER_ID]). This should return a comma-separated list of 20 movie recommendations, from most to least highly recommended for `USER_ID`.\n10. Check the Kafka log to see that the replies are being received.\n11. Open the parent project using your favorite IDE.\u003csup\u003e*\u003c/sup\u003e\n12. Update the code in [Main.kt](/src/main/kotlin/Main.kt).\n13. Deploy the changes to your VM, and repeat steps 6-11.\n\n\u003csup\u003e*\u003c/sup\u003e If you are using [IntelliJ IDEA](https://www.jetbrains.com/community/education/#students), all batteries are included. If you are using [Eclipse](https://www.eclipse.org/ide), you will need to install the [Kotlin Plugin](https://marketplace.eclipse.org/content/kotlin-plugin-eclipse) to receive syntax highlighting and editor support.\n\n## Docker\n\nYour team's designated VM runs Docker. If you need to install any additional packages, this is the place to do so. This template can also be run as follows:\n\n```bash\ndocker build [-t] [USERNAME]/[PROJECT] .\ndocker run [-it] -p 8082:8082/tcp [USERNAME]/[PROJECT]\n```\n\n## Kafka\n\nThere are many different [Kafka clients](https://docs.confluent.io/current/clients/index.html) you can use to read and write to Kafka. You are free to use any libraries you wish. We have included two in this template:\n\n* [Apache Kafka Streams](https://kafka.apache.org/documentation/streams/) (the official client)\n* [Kotka](https://github.com/blueanvil/kotka/) (a lightweight Kotlin client)\n\nTo read from Kafka, you will need to connect to the Kafka server at `fall2021-comp598.cs.mcgill.ca:9092` and stream from the topic `movielog[TEAM_NUMBER]`. The code for doing so is included in [`Main.kt`](/src/main/kotlin/Main.kt).\n\nMore information about Kafka logs and their format can be found on the [project description page](https://github.com/jin-guo/COMP598_Fall2021/blob/master/assignments/Project.md#overall-mechanics-and-infrastructure). We recommend dumping a subset of the logs to disk for prototyping, then dealing with the live stream once the model is stable.\n\nTo stream the Kafka log, you can use the following command:\n\n```bash\ndocker run -it bitnami/kafka kafka-console-consumer.sh --bootstrap-server fall2021-comp598.cs.mcgill.ca:9092 --topic movielog1\n```\n\n## REST API\n\nYou will need to access the user and movie services to access the corresponding features. Below are a few possible options for doing so:\n\n* [OkHttp](https://github.com/square/okhttp) - The dependency is included, but you will need to read the documentation.\n* [Moshi](https://github.com/square/moshi) - Lightweight JSON binding to Java/Kotlin classes.\n* [`URL.readText()`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.io/java.net.-u-r-l/read-text.html) - You will need to implement the JSON parsing and data bindings yourself.\n\nThe following endpoints provide additional information about the users and movies:\n\n### User service (example)\n\n`curl http://fall2021-comp598.cs.mcgill.ca:8080/user/12`\n\n`{\"user_id\":12,\"age\":27,\"occupation\":\"college/grad student\",\"gender\":\"M\"}`\n\n### Movie service (example)\n\n`curl http://fall2021-comp598.cs.mcgill.ca:8080/movie/12`\n\n```\n{\"id\":\"dracula+dead+and+loving+it+1995\",\"tmdb_id\":12110,\"imdb_id\":\"tt0112896\",\"title\":\"Dracula: Dead and Loving It\",\"original_title\":\"Dracula: Dead and Loving It\",\"adult\":\"False\",\"belongs_to_collection\":{},\"budget\":\"0\",\"genres\":[{\"id\":35,\"name\":\"Comedy\"},{\"id\":27,\"name\":\"Horror\"}],\"homepage\":\"null\",\"original_language\":\"en\",\"overview\":\"When a lawyer shows up at the vampire's doorstep, he falls prey to his charms and joins him in his search for fresh blood. Enter Dr. van Helsing, who may be the only one able to vanquish the count.\",\"popularity\":\"5.430331\",\"poster_path\":\"/xve4cgfYItnOhtzLYoTwTVy5FGr.jpg\",\"production_companies\":[{\"name\":\"Columbia Pictures\",\"id\":5},{\"name\":\"Castle Rock Entertainment\",\"id\":97},{\"name\":\"Enigma Pictures\",\"id\":6368}],\"production_countries\":[{\"iso_3166_1\":\"FR\",\"name\":\"France\"},{\"iso_3166_1\":\"US\",\"name\":\"United States of America\"}],\"release_date\":\"1995-12-22\",\"revenue\":\"0\",\"runtime\":88,\"spoken_languages\":[{\"iso_639_1\":\"en\",\"name\":\"English\"},{\"iso_639_1\":\"de\",\"name\":\"Deutsch\"}],\"status\":\"Released\",\"vote_average\":\"5.7\",\"vote_count\":\"210\"}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbreandan%2Fseai-client-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbreandan%2Fseai-client-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbreandan%2Fseai-client-template/lists"}