{"id":48186869,"url":"https://github.com/esoadamo/game-money","last_synced_at":"2026-04-04T17:50:39.550Z","repository":{"id":127748068,"uuid":"249685012","full_name":"esoadamo/game-money","owner":"esoadamo","description":"No need for paper money cards anymore","archived":false,"fork":false,"pushed_at":"2024-01-06T18:30:49.000Z","size":185,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-01-06T19:32:35.194Z","etag":null,"topics":["bootstrap","bootstrap3","flask","flask-sockets","flask-sqlalchemy","games","html5","js","money","python3","table-top"],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/esoadamo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-03-24T11:02:06.000Z","updated_at":"2022-07-27T20:36:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"6f841b1d-047e-4556-9432-a73b744c6054","html_url":"https://github.com/esoadamo/game-money","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/esoadamo/game-money","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esoadamo%2Fgame-money","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esoadamo%2Fgame-money/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esoadamo%2Fgame-money/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esoadamo%2Fgame-money/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/esoadamo","download_url":"https://codeload.github.com/esoadamo/game-money/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esoadamo%2Fgame-money/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31407655,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bootstrap","bootstrap3","flask","flask-sockets","flask-sqlalchemy","games","html5","js","money","python3","table-top"],"created_at":"2026-04-04T17:50:36.109Z","updated_at":"2026-04-04T17:50:39.541Z","avatar_url":"https://github.com/esoadamo.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Game money\n\nAn easy way to store your table game's money without having to use paper cards!\n\n## Installation and configuration\n\nAnybody can run their own server and connect with their favorite web browser.\n\n### Installing own server\n\nClone the repository, install requirements and execute `app.py`, that's all!\n\n```bash\ngit clone https://github.com/esoadamo/game-money.git\ncd game-money\npython -m pip install -r requirements.txt\npython app.py\n```\n\nAnd you should be running! By default, pointing your browser to the [http://127.0.0.1:5000/](http://127.0.0.1:5000/) should be enough.\n\n### Browser support\n\nYour browser is required to support HTML5 and WebSockets, so all popular modern browsers should be OK. Design of the web pages is mobile-first, but desktop users should not have any difficulties.\n\n### Adding own game type\n\nThere are two ways you can add your own game type.\n\n1. By modifying `data/game-types.json`. All updates made to this file will be uploaded to the database during next start of the server. This method is easier as you can see all presently used game types in one place, but keep in mind, that this file can be overridden by git at any time.\n2. By directly modifying the database. This method is more persistent, but may become unstable if the database schema is ever changed.\n\n## Public server\n\nThere is a public server available at [https://money.adamhlavacek.com/](https://money.adamhlavacek.com/).\n\n## Usage\n\n### Basic concept\n\nWhen you connect with your web browser to the server, you will be asked to enter your name under which will the server recognize you. You may change your name in the future. The server will then save you in database and create a key for you under which will the server be able to identify you. This key is saved into your browser's local storage and is permanent.\n\nThe login process is automatic and consists only of sending saved login key to the server.\n\nUpon entering the main page of the server, you will see a list of active games which are not hidden. Some of them may be password protected. You may enter by clicking on the row in the table.\n\nYou can also create a new game by clicking on the Create new game button under the table. If you choose this, you will be assigned a special player, called *'the bank'* or *'infinite player'*, who holds special right to the game, such as possibility to hide the game from the list on the main page and infinite amount of money in every currency.\n\nIn both cases, you will be assigned additional player with the name same as your name on the main page. This player has limited resources and cannot go under 0.\n\nYou may also create additional players by pressing the `+` button next to the list of your players in the game. All these newly created players will be assigned to your user account and only you will be able to control them.\n\nWhen you are in game, you can send money to other players in game by pressing the `Send money` button and then providing additional information.\n\n### Additional notes\n\n- the game itself cannot be deleted and can only be hidden from the main page by the so called *'bank'* or *'infinite'* player\n- you can change any name you like of any user/player you own by clicking on their name, but note that player names in the game have to be unique\n\n## Used technologies\n\n- Web pages are served using [Flask](https://palletsprojects.com/p/flask/)\n- Communication is done by using [Flask-Sockets](https://github.com/heroku-python/flask-sockets) on the backend and WebSockets on the frontend\n- Communication with the database is done with the help of [Flask-SQLAlchemy](https://flask-sqlalchemy.palletsprojects.com/en/2.x/)\n- Code of web pages is using Flask's templates and [JS Renderer](https://github.com/esoadamo/game-money/blob/master/static/scripts/renderer.js) and Bootstrap 3, of course\n\n## Screenshots\n\nCan be found [here](https://github.com/esoadamo/game-money/issues/1).\n\n\n## JS Renderer\n\nSource code: [renderer.js](https://github.com/esoadamo/game-money/blob/master/static/scripts/renderer.js) \n\nIs a minimalistic renderer created for use with this application. It's main goal is to help the developer with creating the web page by allowing him to write `if` and `for` statements right inside the HTML.\n\n### JS Renderer scopes\n\nJS renderer has 4 main scopes that can be used inside HTML code:\n\n- `v` is an alias for `renderer.variables`\n- `f` is an alias for `renderer.functions`\n- `w` for assigning values of inputs (functions `renderer.getValue` and `renderer.setValue`)\n- `l` for local variables, created by for loops\n\n### JS Renderer attributes\n\n- `r-if=\"condition\"` - only if `eval(condition)` is true, this element will be shown\n- `r-for=\"number of [1, 2, 3]\"` - will create this element 3 times, with local variable `number` having values `1`, then `2` and then `3`\n- `r-click=\"function(params)\"` - will execute given function on click on this element\n- `r-attr=\"{\u0026quot;style\u0026quot;: \u0026quot;val\u0026quot;}\"` - will set the attribute `style` of this element to `eval(val)`\n\n### JS Renderer example\n\nThe code\n\n```html\n\u003ch1 r-var=\"v.title\"\n    r-attr=\"{\u0026quot;style\u0026quot;: \u0026quot;'color: ' + v.titleColor + ';'\u0026quot;}\"\u003e\n\u003c/h1\u003e\n\u003cul\u003e\n    \u003cli r-for=\"name of v.names\"\u003e\n        \u003cspan\u003eHello, \u003cspan r-var=\"l.name\" r-click=\"f.myClick(l.name)\"\u003e\u003c/span\u003e!\u003c/span\u003e\n    \u003c/li\u003e\n\u003c/ul\u003e\n\u003cinput type=text r-val=\"w.myInput\"\u003e\n\u003cbutton r-click=\"f.printValue()\"\u003ePrint value\u003c/button\u003e\n\u003cp r-if=\"v.p1\"\u003e\n    This will be shown\n\u003c/p\u003e\n\u003cp r-if=\"v.p2\"\u003e\n    This will be hidden\n\u003c/p\u003e\n```\n\n```javascript\nconst renderer = new Renderer();\nrenderer.variables.title = \"Big title\";\nrenderer.variables.titleColor = \"green\";\nrenderer.variables.names = [\"Joe\", \"Bill\", \"Alice\"];\nrenderer.variables.p1 = true;\nrenderer.variables.p2 = false;\nrenderer.functions.myClick = (name) =\u003e {alert(`I welcome you, ${name}`)};\nrenderer.functions.printValue = () =\u003e {alert(renderer.getValue('myInput'))};\nrenderer.render();\n```\n\nwill produce\n\n```html\n\u003ch1 style=\"color: green;\"\u003eBig title\u003c/h1\u003e\n\u003cul\u003eWhen you click on\n    \u003cli\u003e\u003cspan\u003eHello, \u003cspan\u003eJoe\u003c/span\u003e!\u003c/span\u003e\u003c/li\u003e\n    \u003cli\u003e\u003cspan\u003eHello, \u003cspan\u003eBill\u003c/span\u003e!\u003c/span\u003e\u003c/li\u003e\n    \u003cli\u003e\u003cspan\u003eHello, \u003cspan\u003eAlice\u003c/span\u003e!\u003c/span\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003cinput type=text\u003e\n\u003cbutton\u003ePrint value\u003c/button\u003e\n\u003cp\u003e\n    This will be shown\n\u003c/p\u003e\n```\n\n- after clicking on any name, the alert `I welcome you, ${name}` will appear\n- after clicking on `Print value` button, an alert with the content same as the value of the input will appear\n\n## Used media\n\n- [Money popup sound](https://freesound.org/people/Kastenfrosch/sounds/162464/)\n- [Favicon](https://pixabay.com/illustrations/credit-card-icon-financial-2389154/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesoadamo%2Fgame-money","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fesoadamo%2Fgame-money","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesoadamo%2Fgame-money/lists"}