{"id":17054734,"url":"https://github.com/dominikwilkowski/bronzies","last_synced_at":"2025-04-12T17:09:13.018Z","repository":{"id":20759649,"uuid":"24044256","full_name":"dominikwilkowski/bronzies","owner":"dominikwilkowski","description":"A Lifesaver learning app for bronze proficiency level","archived":false,"fork":false,"pushed_at":"2025-04-02T19:09:52.000Z","size":6559,"stargazers_count":2,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-12T17:08:50.798Z","etag":null,"topics":["highscore","reactjs","signals","slsa","teaching-tool"],"latest_commit_sha":null,"homepage":"http://bronzies.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dominikwilkowski.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-09-15T05:38:20.000Z","updated_at":"2025-04-02T19:09:56.000Z","dependencies_parsed_at":"2024-10-14T10:17:03.024Z","dependency_job_id":"b591758f-3cf7-4897-9ea5-9f726956d70a","html_url":"https://github.com/dominikwilkowski/bronzies","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominikwilkowski%2Fbronzies","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominikwilkowski%2Fbronzies/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominikwilkowski%2Fbronzies/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dominikwilkowski%2Fbronzies/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dominikwilkowski","download_url":"https://codeload.github.com/dominikwilkowski/bronzies/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248602313,"owners_count":21131616,"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":["highscore","reactjs","signals","slsa","teaching-tool"],"created_at":"2024-10-14T10:15:38.048Z","updated_at":"2025-04-12T17:09:12.986Z","avatar_url":"https://github.com/dominikwilkowski.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"bronzies.com [![CI testing](https://github.com/dominikwilkowski/bronzies/actions/workflows/testing.yml/badge.svg)](https://github.com/dominikwilkowski/bronzies/actions/workflows/testing.yml)\n============\n\n\u003e A web app that teaches you the [SLSA](https://sls.com.au/) signals required for the [Bronze Medallion](https://sls.com.au/role/bronze-medallion/).\n\n## Contents\n\n* [How to run](#how-to-run)\n* [Todos](#todos)\n* [The app](#the-app)\n* [The server](#the-server)\n\t* [RESTful API endpoints](#restful-api-endpoints)\n\t* [Install on server](#install-on-server)\n* [Testing](#testing)\n* [Release History](#release-history-app)\n* [License](#license)\n\n----------------------------------------------------------------------------------------------------------------------------------------------------------------\n\n## How to run\n\n| Command           | Description                                           |\n|-------------------|-------------------------------------------------------|\n| `yarn start`      | Starts server and app concurrently                    |\n| `yarn build`      | Create deploy files inside `build/`                   |\n| `yarn test`       | Runs all tests                                        |\n| `yarn deploy`     | Builds app, deploys all files and restarts the server |\n| `yarn nuke`       | Removes build, `node_modules/` and `yarn.lock` file   |\n\nRunning the server manually\n\n```shell\nyarn start:server\n```\n\nRunning the app\n\n```shell\nyarn start:app\n```\n\n**[⬆ back to top](#contents)**\n\n----------------------------------------------------------------------------------------------------------------------------------------------------------------\n\n## Todos\n\nNext:\n- [ ] add more unit tests\n- [ ] make gameToggler a11y\n\t- [ ] trap focus\n\t- [ ] support esc key close\n\t- [ ] aria roles\n- [ ] add more modes for types of beaches etc\n- [ ] rebuild server\n\t- [ ] postgres\n\t- [ ] move to graphql\n\n**[⬆ back to top](#contents)**\n\n----------------------------------------------------------------------------------------------------------------------------------------------------------------\n\n## The app\n\nThe app can be found in the root folder and is powered by [CRA](https://github.com/facebook/create-react-app).\nInstall the dependencies via [`yarn`](https://yarnpkg.com/) and run `yarn start`.\n\n| Command           | Description                  |\n|-------------------|------------------------------|\n| `yarn start:app`  | Start CRA development server |\n| `yarn build`      | Build for production         |\n| `yarn deploy:app` | Upload the build app         |\n\n**[⬆ back to top](#contents)**\n\n----------------------------------------------------------------------------------------------------------------------------------------------------------------\n\n## The server\n\nThe server can be found in the `./server/` folder.\nInstall dependencies, inside that folder, with preferably [`yarn`](https://yarnpkg.com/) and run one of the following commands:\n\n| Command                 | Description                                             |\n|-------------------------|---------------------------------------------------------|\n| `yarn start:server`     | Start the server that serves the REST endpoint          |\n| `yarn start:server:dev` | Start the server in staging mode to server staging data |\n| `yarn deploy:server`    | Upload the server files (without `node_modules`)        |\n| `yarn deploy:restart`   | Restart the remote server app                           |\n\n### RESTful API endpoints\n\n| Command                      | Description                                                    |\n|------------------------------|----------------------------------------------------------------|\n| `node server.js serve`       | Run the server and take production data from `assets/`         |\n| `node server.js serve debug` | Run the server but with staging data from `assets/`            |\n| `node server.js test`        | Don't run the server so we can test without starting a process |\n\n*GET signals*\n\n```\nhttps://bronzies.com/api/signals\n```\n\n*GET signals SVG sprite*\n\n```\nhttps://bronzies.com/api/assets/signals\n```\n\n*GET highscore*\n\n```\nhttps://bronzies.com/api/highscore\n```\n\n*POST highscore*\n\n```\nhttps://bronzies.com/api/highscore\n```\n\n*GET version*\n\n```\nhttps://bronzies.com/api/version\n```\n\n(use: `curl -i -H \"Content-Type: application/json\" -H \"Accept: application/json\" -X POST -d '{\"name\": \"Superman\", \"nays\": 55, \"score\": 5555555, \"rounds\": 777}' http://localhost:5555/api/highscore`)\n\n### Install on server\n\nThe API runs behind an [NGINX proxy](https://github.com/dominikwilkowski/bronzies/blob/main/bronzies.com).\n\n#### CRON task\n\nTo make sure the API is started when the system has to reboot, make sure you add a cron task after reboot:\n\n```shell\nchmod 700 /www/bronzies/server/starter.sh # the starter.sh of this repo\ncrontab -e\n```\n\nand add:\n\n```shell\n@reboot /www/bronzies/server/starter.sh\n```\n\n#### FOREVER node deamon\n\nNow we still have to make sure the node app is restarted if it crashes for some uncaught reason. Install [forever](https://github.com/foreverjs/forever) and\nregister the task:\n\n```shell\nnpm i forever -g\nforever start -l bronzies.log --append -o bronziesOut.log -e bronziesError.log /www/bronzies/server/server.js serve\n```\n\n**[⬆ back to top](#contents)**\n\n----------------------------------------------------------------------------------------------------------------------------------------------------------------\n\n## Testing\n\nContinues integration is setup with [CircleCI](https://circleci.com/) and we're testing with [Jest](https://jestjs.io/) and\n[Cypress](https://www.cypress.io/).\n\nTests are organized inside the `src/tests` folder.\n\n```sh\n.\n├── app\n│   └── [test-name].spec.js\n├── e2e\n│   └── [test-name].cypress.js\n├── server\n│   └── [test-name].spec.js\n└── utils\n    ├── plugins\n    └── support\n```\n\nFiles that end with `.spec.js` are Jest tests and files that end with `.cypress.js` are Cypress tests.\n\n| Command                | Description                                           |\n|------------------------|-------------------------------------------------------|\n| `yarn test`            | Run all tests                                         |\n| `yarn test:unit`       | Run all unit tests with Jest                          |\n| `yarn test:unit:watch` | Runs Jest test watch                                  |\n| `yarn test:unit:cover` | Shows coverage of unit tests                          |\n| `yarn test:e2e`        | Run all end-to-end tests with Cyrpess                 |\n| `yarn test:e2e:server` | Start server for e2e test                             |\n| `yarn test:e2e:run`    | Run e2e test in ci                                    |\n| `yarn test:e2e:open`   | Open Cypress                                          |\n\n**[⬆ back to top](#contents)**\n\n----------------------------------------------------------------------------------------------------------------------------------------------------------------\n\n### Release History App\n\n* 1.1.1 - Updated dependencies\n* 1.1.0 - Updated dependencies and moved to emotion 11\n* 1.0.3 - Updated to React 17, updated dependencies\n* 1.0.2 - Fixed sound in CPR screen\n* 1.0.1 - Added versions to about screen\n* 1.0.0 - Complete rewrite in react\n* 0.1.5 - Removed cordova build, changed endpoints\n* 0.1.4 - Added cordova build\n* 0.1.3 - Fixed CSS and highscore issues\n* 0.1.2 - Added basic layout for first alpha tests\n* 0.1.1 - Changes to API endpoint, fixes\n* 0.1.0 - Completely refactored the code, No Design yet\n* 0.0.3 - Moved an old version into the repo and developed the RESTful API\n\n### Release History Server\n\n* 1.0.2 - Removed some flags for 35th edition of the PSAR manual\n* 1.0.1 - Added version route\n* 1.0.0 - Complete rewrite\n* 0.0.3 - fixed dependencies, changed endpoints\n* 0.0.2 - moved to MongoDB\n* 0.0.1 - Created server, routes and endpoints\n\n**[⬆ back to top](#contents)**\n\n----------------------------------------------------------------------------------------------------------------------------------------------------------------\n\n## License\n\nCopyright (c) Dominik Wilkowski.\nLicensed under [GNU-GPLv3](https://raw.githubusercontent.com/https://github.com/dominikwilkowski/bronzies/main/LICENSE).\n\n**[⬆ back to top](#contents)**\n\n# };\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdominikwilkowski%2Fbronzies","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdominikwilkowski%2Fbronzies","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdominikwilkowski%2Fbronzies/lists"}