{"id":15663238,"url":"https://github.com/thrillberg/imperial","last_synced_at":"2025-04-13T12:20:34.236Z","repository":{"id":26898595,"uuid":"265567798","full_name":"Thrillberg/imperial","owner":"Thrillberg","description":"Imperial is a fun board game.","archived":false,"fork":false,"pushed_at":"2025-03-21T23:38:10.000Z","size":20289,"stargazers_count":16,"open_issues_count":25,"forks_count":6,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-27T03:22:29.591Z","etag":null,"topics":["board-game","game","imperial"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/Thrillberg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":"CODE_OF_CONDUCT.md","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-05-20T13:05:34.000Z","updated_at":"2025-01-22T15:58:44.000Z","dependencies_parsed_at":"2023-11-25T02:21:58.072Z","dependency_job_id":"3eb95a77-575c-480b-bd1c-c764016e63dc","html_url":"https://github.com/Thrillberg/imperial","commit_stats":{"total_commits":1058,"total_committers":9,"mean_commits":"117.55555555555556","dds":"0.12948960302457468","last_synced_commit":"dd4b87ce0d7127ce09cff07ce5fbfebd81483f91"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thrillberg%2Fimperial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thrillberg%2Fimperial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thrillberg%2Fimperial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thrillberg%2Fimperial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Thrillberg","download_url":"https://codeload.github.com/Thrillberg/imperial/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248711062,"owners_count":21149285,"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":["board-game","game","imperial"],"created_at":"2024-10-03T13:36:04.079Z","updated_at":"2025-04-13T12:20:34.224Z","avatar_url":"https://github.com/Thrillberg.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](code_of_conduct.md) \n![](https://github.com/Thrillberg/imperial/workflows/Node.js%20CI/badge.svg)\n\n# Imperial\n\nThis is an implementation of the board game, [Imperial](\u003chttps://en.wikipedia.org/wiki/Imperial_(board_game)\u003e).\n\nIt can be played in production at [playimperial.club](https://playimperial.club).\n\n_Please note that this project is released with a Contributor Code of Conduct.\nBy participating in this project you agree to abide by its terms._\n\n## Local development setup\n\nImperial uses Ruby version 3.2.2, Redis (\u003e 4.0), PostgreSQL, and NodeJS.\n\nTo run Imperial on your local machine, please follow these instructions:\n\n1. Clone the repo:\n```\ngit clone https://github.com/Thrillberg/imperial.git\n```\n2. Change directory into the `imperial` directory:\n```\ncd imperial\n```\n3. Begin the PostgreSQL service:\n- If installed through `brew`\n```\nbrew services start postgresql\n```\n- If installed through `apt`\n```\nsudo service postgresql start\n```\n4. Start a Redis server:\n- If installed through `brew`,\n```\nbrew services start redis\n```\n- If installed through `apt`, in a separate terminal\n```\nredis-server\n```\n5. Run the Rails setup command:\n```\nbin/setup\n```\n- If you get the error `PG::InsufficientPrivilege: ERROR:  permission denied to create extension \"pgcrypto\"` run this command:\n```\nsudo su postgres -c \"psql rails_server_development -c 'CREATE EXTENSION pgcrypto;'\"\n```\n- If you get the error `‘ruby\\r’: No such file or directory`, make sure your editor's line-endings are set to `LF` instead of `CRLF`.\n6. Run the yarn install command:\n```\nyarn\n```\n7. In one terminal window, run vite:\n```\nbin/vite dev\n```\n8. Keep vite running and in a separate terminal window, run the Rails server:\n```\nrails s\n```\n9. You can now view the app at\n```\nlocalhost:3000/\n```\nIf any of the above instructions did not work for you, please do not hesitate to [open an issue](https://github.com/Thrillberg/imperial/issues/new).\n\n## Running tests\n\nTo run JS tests, run the following command from the project root:\n\n```\nnpm test\n```\n\nTo run Ruby RSpec tests, run the following command from the project root:\n\n```\nrspec\n```\n\nThis project also uses [Cypress](https://www.cypress.io/) for feature tests. **These tests have not been maintained, however.** To\nrun these tests, run the following command from the project root:\n\n```\n./test_server\n```\n\nAnd in another terminal:\n\n```\nnpm run cypress\n```\n\n## Docker commands for running locally\n\n```\ndocker-compose up --build\n```\n\n## Local debugging\n\nProduction games will often present situations that are hard to reproduce locally and therefore get challening to debug. Therefore, we have implemented the ability to **export** and **import** games.\n\n### Exporting a game\n\nVisit `/exports/[game_id]` and a `JSON` file will be downloaded to your computer. This file contains the game log and can be used when importing a game.\n\n### Importing a game\n\nVisit `http://localhost:3000/import_game` and paste the contents of the downloaded `JSON` in the box and click `Import game`. This will reconstruct the game locally in your database and let you play around with it and, hopefully, improve debugging.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthrillberg%2Fimperial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthrillberg%2Fimperial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthrillberg%2Fimperial/lists"}