{"id":26872597,"url":"https://github.com/laactech/ethyca-tic-tac-toe","last_synced_at":"2025-07-29T03:34:22.671Z","repository":{"id":284076344,"uuid":"953670615","full_name":"laactech/ethyca-tic-tac-toe","owner":"laactech","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-24T02:49:56.000Z","size":97,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-08T12:50:52.874Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/laactech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2025-03-23T21:48:59.000Z","updated_at":"2025-03-24T02:50:00.000Z","dependencies_parsed_at":"2025-03-24T03:34:31.793Z","dependency_job_id":null,"html_url":"https://github.com/laactech/ethyca-tic-tac-toe","commit_stats":null,"previous_names":["laactech/ethyca-tic-tac-toe"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/laactech/ethyca-tic-tac-toe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laactech%2Fethyca-tic-tac-toe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laactech%2Fethyca-tic-tac-toe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laactech%2Fethyca-tic-tac-toe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laactech%2Fethyca-tic-tac-toe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laactech","download_url":"https://codeload.github.com/laactech/ethyca-tic-tac-toe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laactech%2Fethyca-tic-tac-toe/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267623084,"owners_count":24117125,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2025-03-31T08:32:30.648Z","updated_at":"2025-07-29T03:34:22.628Z","avatar_url":"https://github.com/laactech.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ethyca Project\n\n## Set up\n\n1. Ensure you have docker and docker compose installed on your system\n2. `Run docker compose build` to build the project\n2. `Run docker compose up -d` to run the project\n3. `Run docker compose run --rm django python manage.py create_user` and follow the prompts to get your API token\n\n## Playing Tic Tac Toe\n\nAPI Documentation located at http://localhost:8000/api/docs/\n\n1. Make a POST request to the /api/games/ endpoint to create the game\n   * ```r = httpx.post(\"http://localhost:8000/api/games/\", json={\"game_type\": \"tic_tac_toe\"}, headers={\"Authorization\": \"Token YOUR_API_TOKEN\"})```\n2. Make a POST request to the /api/game-moves/ endpoint with the ID returned in the /api/games POST request\n   * ```r = httpx.post(\"http://localhost:8000/api/game-moves/\", json={\"next_move\": {\"x\": 1, \"y\": 1}, \"game\": \"YOUR_GAME_ID\"}, headers={\"Authorization\": \"Token YOUR_API_TOKEN\"})```\n3. Make a few more game-move POST requests\n4. Make a GET request to the /api/game-moves/ endpoint to see the moves in chronological order\n   * ```r = httpx.get(\"http://localhost:8000/api/game-moves/\", headers={\"Authorization\": \"Token YOUR_API_TOKEN\"})```\n5. Make a GET request to the /api/games/my-games/ endpoint to see your games\n   * ```r = httpx.get(\"http://localhost:8000/api/games/my-games/\", headers={\"Authorization\": \"Token YOUR_API_TOKEN\"})```\n\n## Question and Answer\n\n1. How much time you spent building the project\n   * About 2 and a half hours\n1. Any assumptions you made\n   * I assumed that the human player is always X's\n   * I assumed I didn't need to account for two human players\n1. Any trade-offs you made\n   * I didn't really implement \"winning\"\n   * I didn't write tests (tests are great though)\n   * I didn't add a player ForeignKey to the \"Game\" model, but I probably should have\n1. Any special/unique features you added\n   * The computer will randomly play a move against you and won't overwrite any existing move\n   * I added a lot of validation and returned some nice error messages when you get a POST body wrong\n   * The API endpoints are behind actual authentication\n   * There is API documentation (although not the best)\n   * You should be able to change the ordering with the \"ordering\" query parameter\n1. Anything else you want us to know about\n   * The next step in this project would be writing tests, but I opted to just document it instead of doing it.\n   * If this were going to production, I'd add a bunch of logging for easier debugging.\n   * This project has stuff like redis, celery, rabbitmq, and a bunch of unused packages because this is just the Django starter template I use for a lot of stuff\n1. Any feedback you have on this technical challenge\n   * I enjoyed this coding test. It's way better than the leetcode stuff\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaactech%2Fethyca-tic-tac-toe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaactech%2Fethyca-tic-tac-toe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaactech%2Fethyca-tic-tac-toe/lists"}