{"id":18534968,"url":"https://github.com/jacek13/tic-tac-toe-dotnet","last_synced_at":"2026-05-15T22:02:02.619Z","repository":{"id":215681204,"uuid":"720881681","full_name":"jacek13/tic-tac-toe-dotnet","owner":"jacek13","description":"repository contains an online multiplayer game of tic-tac-toe. ","archived":false,"fork":false,"pushed_at":"2024-01-14T20:00:44.000Z","size":516,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-15T00:17:08.389Z","etag":null,"topics":["backend","csharp","dotnet","dotnet-core","dotnet8","dotnetcore","frontend","game","multiplayer","signalr","tic-tac-toe","webapi"],"latest_commit_sha":null,"homepage":"","language":"C#","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/jacek13.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":"2023-11-19T21:48:08.000Z","updated_at":"2024-01-05T19:45:53.000Z","dependencies_parsed_at":"2024-01-14T21:44:50.024Z","dependency_job_id":null,"html_url":"https://github.com/jacek13/tic-tac-toe-dotnet","commit_stats":null,"previous_names":["jacek13/tic-tac-toe-dotnet"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jacek13/tic-tac-toe-dotnet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacek13%2Ftic-tac-toe-dotnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacek13%2Ftic-tac-toe-dotnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacek13%2Ftic-tac-toe-dotnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacek13%2Ftic-tac-toe-dotnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jacek13","download_url":"https://codeload.github.com/jacek13/tic-tac-toe-dotnet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacek13%2Ftic-tac-toe-dotnet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273566755,"owners_count":25128629,"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-09-04T02:00:08.968Z","response_time":61,"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":["backend","csharp","dotnet","dotnet-core","dotnet8","dotnetcore","frontend","game","multiplayer","signalr","tic-tac-toe","webapi"],"created_at":"2024-11-06T19:18:12.057Z","updated_at":"2025-10-28T04:20:01.613Z","avatar_url":"https://github.com/jacek13.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tic Tac Toe - Multiplayer\n\nThe repository contains the source code for a multiplayer game of tic-tac-toe. Backend was written in `C#` using `.Net 8`. The project uses [SignalR](https://github.com/SignalR/SignalR), [Serilog](https://github.com/serilog/serilog), EF Core for Postgresql and Swagger. The frontend was written using Angular and node 20.10.0. \n\nBackend has been integrated with AWS Cognito using [ASP.NET Core Identity Provider for Amazon Cognito](https://github.com/aws/aws-aspnet-cognito-identity-provider).\n\n\nThe application allows users logged in and not logged in to play tic-tac-toe. Logged-in users are listed on the global scoreboard while the data of non-logged-in users is not accessible from the frontend. The app also has a simple chat feature that allows for communication in the game room.\n\n\n# Project launch\n\n### **Local environment** (without .Net and angular cli)\n\n**requirements:**\n- AWS Cognito (you can try to run without AWS Cognito but all auth functionalities will not work)\n- docker\n- docker-compose\n\nGo into folder `backend/TicTacToe.webapi` and modify the file `appsettings.dockerlocal.json`\n\n```json\n{\n  \"db\": {\n    \"Connection\": \"Host=db;Port=5432;Database=local_db;Username=admin_local;Password=Admin123!;\"\n  },\n  \"AWS\": {\n    \"Region\": \"\u003cyour region id goes here\u003e\",\n    \"UserPoolClientId\": \"\u003cyour user pool client id goes here\u003e\",\n    \"UserPoolClientSecret\": \"\u003cyour user pool client secret goes here\u003e\",\n    \"UserPoolId\": \"\u003cyour user pool id goes here\u003e\",\n    \"Authority\": \"https://cognito-idp.\u003cyour region id goes here\u003e.amazonaws.com/\u003cyour user pool id goes here\u003e\"\n  }\n  \"Serilog\": {\n    \"Using\": [ \"Serilog.Sinks.Console\", \"Serilog.Extensions.Hosting\" ],\n    \"MinimalLevel\": {\n      \"Default\": \"Debug\",\n      \"Override\": {\n        \"Microsoft\": \"Warning\",\n        \"System\": \"Information\"\n      }\n    },\n    \"Enrich\": [ \"FromLogContext\", \"WithMachineName\", \"WithProcessId\", \"WithThreadId\" ],\n    \"WriteTo\": [\n      {\n        \"Name\": \"Console\"\n      }\n    ],\n    \"Properties\": {\n      \"Application\": \"Tic-Tac-Toe\"\n    }\n  }\n}\n\n```\n\nAfter that go to main folder and run:\n\n```bash\ndocker-compose up\n```\n\nAfter the correct build, you should see on the terminal output\n\n```bash\nCreating network \"tic-tac-toe-dotnet_internal\" with the default driver\nCreating tic-tac-toe-dotnet_db_1 ... done\nCreating tic-tac-toe-dotnet_webapi_1 ... done\nCreating tic-tac-toe-dotnet_frontend_1 ... done\nAttaching to tic-tac-toe-dotnet_db_1, tic-tac-toe-dotnet_webapi_1, tic-tac-toe-dotnet_frontend_1\ndb_1        |\ndb_1        | PostgreSQL Database directory appears to contain a database; Skipping initialization\ndb_1        |\ndb_1        | 2023-12-18 10:11:00.781 UTC [1] LOG:  starting PostgreSQL 16.1 (Debian 16.1-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit\ndb_1        | 2023-12-18 10:11:00.781 UTC [1] LOG:  listening on IPv4 address \"0.0.0.0\", port 5432\ndb_1        | 2023-12-18 10:11:00.781 UTC [1] LOG:  listening on IPv6 address \"::\", port 5432\ndb_1        | 2023-12-18 10:11:00.791 UTC [1] LOG:  listening on Unix socket \"/var/run/postgresql/.s.PGSQL.5432\"\ndb_1        | 2023-12-18 10:11:00.808 UTC [29] LOG:  database system was shut down at 2023-12-17 16:40:15 UTC\ndb_1        | 2023-12-18 10:11:00.840 UTC [1] LOG:  database system is ready to accept connections\nfrontend_1  | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration\nfrontend_1  | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/\nfrontend_1  | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh\nfrontend_1  | 10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf is not a file or does not exist\nfrontend_1  | /docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh\nfrontend_1  | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh\nfrontend_1  | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh\nwebapi_1    | [10:11:03 WRN] The property 'MatchView.Board' is a collection or enumeration type with a value converter but with no value comparer. Set a value comparer to ensure the collection/enumeration elements are compared correctly.\nwebapi_1    | [10:11:03 INF] Now listening on: http://0.0.0.0:5000\nwebapi_1    | [10:11:03 INF] Application started. Press Ctrl+C to shut down.\nwebapi_1    | [10:11:03 INF] Hosting environment: dockerlocal\nwebapi_1    | [10:11:03 INF] Content root path: /App\n```\n\n### **EC2 environment**\n\nConnect to your EC2 instance via SSH. Run this commands:\n\n```bash\nsudo yum update -y\nsudo yum install -y docker\nsudo service docker start\nsudo usermod -a -G docker ec2-user\nsudo docker ps\nsudo curl -L \"https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose\nsudo chmod +x /usr/local/bin/docker-compose\nsudo docker-compose --version\n```\n\nThen download the application's source code (**via git**) or its images (**upload the built images to your private repositories and download it to EC2**). After that run as you would for a local environment. If you have built images before then remember to change the docker-compose.yml file (change section build to image).\n\nRemember also to change file `environment.ts` in folder `frontend/TicTacToeApp/src/environments`.\n\n```js\nexport const environment = {\n    production: false,\n    apiUrl: '\u003cpaste here your EC2 public ip or domain\u003e:5000'\n};\n```\n\n### Frontend\n\nThe frontend of the application is shown below. The screenshots present the application deployed through **AWS Elastic Beanstalk**.\n\n![game-list](./resources/game-list.PNG)\n\n![game-list](./resources/game-hub.PNG)\n\n![game-list](./resources/score-board.PNG)\n\n![game-list](./resources/login-page.PNG)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacek13%2Ftic-tac-toe-dotnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacek13%2Ftic-tac-toe-dotnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacek13%2Ftic-tac-toe-dotnet/lists"}