{"id":20779959,"url":"https://github.com/devklick/flaggle","last_synced_at":"2025-10-11T04:02:26.149Z","repository":{"id":62907824,"uuid":"477133315","full_name":"devklick/flaggle","owner":"devklick","description":null,"archived":false,"fork":false,"pushed_at":"2022-11-08T21:44:38.000Z","size":695,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-12T15:40:48.865Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/devklick.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}},"created_at":"2022-04-02T18:03:36.000Z","updated_at":"2022-11-06T20:33:59.000Z","dependencies_parsed_at":"2022-11-09T00:00:56.227Z","dependency_job_id":null,"html_url":"https://github.com/devklick/flaggle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devklick/flaggle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devklick%2Fflaggle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devklick%2Fflaggle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devklick%2Fflaggle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devklick%2Fflaggle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devklick","download_url":"https://codeload.github.com/devklick/flaggle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devklick%2Fflaggle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006112,"owners_count":26084027,"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-10-11T02:00:06.511Z","response_time":55,"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":"2024-11-17T13:30:57.454Z","updated_at":"2025-10-11T04:02:26.120Z","avatar_url":"https://github.com/devklick.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n    Flaggle\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n    The flag-guessing game.\n\u003c/p\u003e\n\u003cbr/\u003e\n\u003cbr/\u003e\n\u003cbr/\u003e\n\u003cbr/\u003e\n\n# What it is\n\nA simple guessing game where you are presented with pieces of an image. The image is of a flag, and you need to guess which country the flag belongs to. If you do not know, you can reveal the next piece of the flag, or you can skip it.\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to see screenshots!\u003c/summary\u003e\n\n![001](./docs/images/001.png)\n![002](./docs/images/002.png)\n![003](./docs/images/003.png)\n![004](./docs/images/004.png)\n\u003c/details\u003e\n\n# Running locally\n\nYou will need to start by cloning this repo:\n\n```\ngit clone https://github.com/devklick/flaggle.git\n```\n\nThen install the package:\n\n```\nnpm i\n```\n\nA postgres database is required to run the game, and the most convenient way to get started is to use docker to run a container with postgres installed. For example: \n\n```\ndocker run --name flaggle-postgres -p 5432:5432 -e POSTGRES_PASSWORD=postgres -d postgres\n```\n\n(See the [official docs](https://hub.docker.com/_/postgres) for more on this.)\n\nOnce you have the container running, you will need to create a database called `flaggle`. Connect to the postgres server with client of your choice and run the create database script:\n\n```sql\nCREATE DATABASE flaggle;\n```\n\nIf you used a different username, password or post when running your postgres container, you will need update the [env](./.env) file the correct values. Otherwise if you used the ones mentioned here, you can skip this step. \n\nNext, the database schema needs to be deployed. We can do this with the prisma cli as follows, which will update to the latest [migration](./libs/flaggle-db/src/lib/migrations/)):\n\n```\nnpx prisma db push\n```\n\nNow that we have the database schema ready, we need to seed the data required by the game. Again, we use the prisma CLI to do this:\n\n```\nnpx prisma db seed\n```\nThs process may take a minute or so, as the seed process has to pull down country data from [restcountries](https://restcountries.com), download the flag images, split them up into chunks, and save the chunks to your local file system.\n\n(Note, sometimes the prisma CLI does not close properly, co you may need to hit `Ctrl + c` to exit out of it.)\n\nNow we're ready to run the application. To do so, we can simply run:\n```\nnpm start\n```\nThis will go off and run the API and UI in parallel. \n\n# Technologies Used\n\n- [Nx](https://nx.dev/)\n- [React](https://reactjs.org/)\n- [Express](https://expressjs.com/)\n- [Prisma](https://www.prisma.io/)\n- [PostgreSql](https://www.postgresql.org/)\n\n# Services Used\n\n- [Rest Countries](https://restcountries.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevklick%2Fflaggle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevklick%2Fflaggle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevklick%2Fflaggle/lists"}