{"id":18449068,"url":"https://github.com/nimatrazmjo/gg-test","last_synced_at":"2026-04-11T01:20:19.574Z","repository":{"id":120010487,"uuid":"445825616","full_name":"nimatrazmjo/gg-test","owner":"nimatrazmjo","description":"This project has been build using reactjs expressjs typescript","archived":false,"fork":false,"pushed_at":"2022-01-12T13:21:00.000Z","size":7854,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-16T13:32:15.280Z","etag":null,"topics":["docker","docker-compose","expressjs","kubernetes","reactjs","skaffold","typescript"],"latest_commit_sha":null,"homepage":"","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/nimatrazmjo.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":"2022-01-08T13:22:49.000Z","updated_at":"2022-01-11T18:15:01.000Z","dependencies_parsed_at":"2023-06-14T17:00:41.707Z","dependency_job_id":null,"html_url":"https://github.com/nimatrazmjo/gg-test","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/nimatrazmjo%2Fgg-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nimatrazmjo%2Fgg-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nimatrazmjo%2Fgg-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nimatrazmjo%2Fgg-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nimatrazmjo","download_url":"https://codeload.github.com/nimatrazmjo/gg-test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249061263,"owners_count":21206477,"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":["docker","docker-compose","expressjs","kubernetes","reactjs","skaffold","typescript"],"created_at":"2024-11-06T07:18:23.605Z","updated_at":"2025-10-05T00:50:49.244Z","avatar_url":"https://github.com/nimatrazmjo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Good Game Test\r\n![Getting Started](./screenshot.png)\r\n\r\n\r\n\u003cp align=\"center\"\u003e\r\nThis project\r\n\u003c/p\u003e\r\n\r\n## 📝 Table of Contents\r\n\r\n- [Problem Statement](#problem_statement)\r\n- [Idea / Solution](#idea)\r\n- [Dependencies / Limitations](#limitations)\r\n- [Future Scope](#future_scope)\r\n- [Setting up a local environment](#getting_started)\r\n- [Usage](#usage)\r\n- [Technology Stack](#tech_stack)\r\n- [Contributing](../CONTRIBUTING.md)\r\n- [Authors](#authors)\r\n- [Acknowledgments](#acknowledgments)\r\n\r\n## 🧐 Problem Statement \u003ca name = \"problem_statement\"\u003e\u003c/a\u003e\r\n\r\nEvery player in Empire has a castle. To let players attack another player’s castle, we need you to create armies of randomly\r\ndistributed troops (a troop is a formation of soldiers with the same skill, such as Spearmen, Swordsmen, Archers, etc.)\r\nFor example, we'll call your code telling it we need a random army that's 167 men strong. Assuming our available unit types to be,\r\nfor example, Spearmen, Swordsmen and Archers, what we want from you is that you tell us what such a random army would look\r\nlike.\r\n\r\n, e.g.\r\nOur Input: 167\r\n\r\nExample result:\r\n```\r\n63 Spearmen\r\n\r\n57 Swordsmen\r\n\r\n47 Archers\r\n```\r\n## 🏁 Getting Started \u003ca name = \"getting_started\"\u003e\u003c/a\u003e\r\n\r\nThese instructions will get you a copy of the project up and running on your local machine for development\r\nand testing purposes. See [deployment](#deployment) for notes on how to deploy the project on a live system.\r\n\r\n## Folder Structure\r\n```\r\nclient                          # React project\r\n├── src                               \r\n│   ├── **/*.js\r\nk8s                             # Kubernetes config\r\n│  ├── client-deployment.yaml\r\n│  ├── ingress-service.yaml\r\n│  └── server-deployment.yaml\r\nserver                           # Expressjs code using typescript\r\n├── src\r\n│   ├── **/*.ts\r\n\r\n├── docker-compose.dev.yml\r\n├── docker-compose.prod.yml\r\n├── docker-compose.test.yml\r\n├── docker-compose.yml\r\n├── package.json\r\n├── package-lock.json \r\n├── package-lock.json \r\n└── .gitignore\r\n└── skaffold.yaml\r\n```\r\n\r\n### Prerequisites\r\n\r\n- lastet version of docker must be installed.\r\n\r\n- docker and docker compose must be installed.\r\n\r\n- if you want to use kubernets, skaffold need to be installed\r\n\r\n# Installing\r\n\r\nYou can use either `docker-compose` or  `Kubernetes` using `skaffold`\r\n\r\n## 1 - docker-compose\r\n\r\n- Development\r\n\r\n  ```\r\n  npm run docker:dev\r\n  ```\r\n  -  open http://localhost:3000\r\n  - GET `http://localhost:400/api/armies/:totalArmy` to crate an army\r\n- Test\r\n\r\n  ```\r\n  npm run docker:test\r\n  ```\r\n\r\n## 2 - Kubernetes\r\n\r\n  ```\r\n   skaffold dev\r\n  ```\r\n## Deployment \u003ca name = \"deployment\"\u003e\u003c/a\u003e\r\n\r\nrun\r\n\r\n```\r\nskaffold run\r\n```\r\n\r\nthen add following code to `/etc/hosts` file and open `http://gg.empire.com` in browser\r\n```\r\n127.0.0.1 gg.empire.com\r\n```\r\n## ⛏️ Built With \u003ca name = \"tech_stack\"\u003e\u003c/a\u003e\r\n\r\n- [Express](https://expressjs.com/) - Server Framework\r\n- [Reactjs](https://reactjs.org/) - Web Framework\r\n- [NodeJs](https://nodejs.org/en/) - Server Environment\r\n- [Docker](https://www.docker.com/) - Server Environment\r\n- [Docker Compose](https://www.docker.com/) - Server Environment\r\n- [Kubernetes](https://kubernetes.io/) - Server Environment\r\n- [Skaffold](https://http://skaffold.dev/) - Server Environment\r\n- [PM2](https://pm2.keymetrics.io/) - production process manager\r\n\r\n## ✍️ Author \u003ca name = \"authors\"\u003e\u003c/a\u003e\r\n\r\n- [@nimatrazmjo](https://github.com/nimatrazmjo) - Initial work","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnimatrazmjo%2Fgg-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnimatrazmjo%2Fgg-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnimatrazmjo%2Fgg-test/lists"}