{"id":23792486,"url":"https://github.com/se2p/scratchlog","last_synced_at":"2025-07-08T11:38:40.853Z","repository":{"id":193553058,"uuid":"632481002","full_name":"se2p/ScratchLog","owner":"se2p","description":null,"archived":false,"fork":false,"pushed_at":"2023-06-16T10:36:00.000Z","size":5486,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-01T18:36:34.959Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/se2p.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-04-25T13:50:00.000Z","updated_at":"2024-02-06T17:25:17.000Z","dependencies_parsed_at":"2023-09-08T18:10:48.728Z","dependency_job_id":null,"html_url":"https://github.com/se2p/ScratchLog","commit_stats":null,"previous_names":["se2p/scratchlog"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/se2p%2FScratchLog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/se2p%2FScratchLog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/se2p%2FScratchLog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/se2p%2FScratchLog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/se2p","download_url":"https://codeload.github.com/se2p/ScratchLog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240021410,"owners_count":19735315,"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":[],"created_at":"2025-01-01T18:35:17.991Z","updated_at":"2025-02-21T13:27:07.717Z","avatar_url":"https://github.com/se2p.png","language":"Java","readme":"# ScratchLog\n\n## Installation\n\n### Requirements\n\n- Apache Maven\n- A MySQL database\n- npm\n- for data acquisition: instrumented Scratch GUI and Scratch VM\n\nTo access the database, you only need to change the connection details in the `application.properties` file.\n\n### Run from within an IDE\n\nCreate a new database with a database user to grant the application access and specify the connection details in the\n`application.properties` file. Add the necessary tables and constraints using the `schema.sql` file in the\n`main/resources` folder.\n\nInstall npm in the `resources/static` folder via the following command:\n```bash\nnpm install\n```\nThe result page of this project uses Google's `Blockly` and `Scratch Blocks` to display the participant code. Since this\nproject is build with the Spring framework, you can run this project from within an IDE. You will still need to do the\nnecessary configurations described below.\n\n#### Standard configuration\n\nTo get the project up and running, you need to adapt the `application.properties` file in the `resources` folder as\nfollows:\n- Configure the database connection and mail sending to match your system.\n- If you want to use the application without a mail server, set the *app.mail* boolean to false. With this setting,\n  you will not be able to use the reset password functionality of this application. Please note that switching between\n  mail server options, e.g. first using the application without a mail server and then using one, might cause the\n  application to not work properly anymore.\n- Change the *app.url* string to the application base URL, e.g. `scratch.fim.uni-passau.de`.\n- Change the *app.gui* string to the URL under which the instrumented Scratch GUI is available.\n- Set the *app.gui.base* string to the base URL of the Scratch GUI. This might be the same as the *app.gui* property.\n  However, if you have deployed the GUI under a relative context path, e.g. `scratch.fim.uni-passau.de/gui`, *app.gui*\n  would have to be set to the full path (`scratch.fim.uni-passau.de/gui`) while *app.gui.base* will only be\n  `scratch.fim.uni-passau.de`.\n- If you only want to use the `application.properties` file, you can comment out the *spring.profiles.active* line.\n- Optional: Set the log level to *Warn* or *Error*.\n\nSince the `application.properties` file contains some critical data (e.g. login information for the database) that might\neasily be committed by accident, some sections have been commented out. You should put these in a file named\n`application-local.properties` in the `resources` folder, uncomment them and adapt them there. This file has been added\nto the `.gitignore` file and the *spring.profiles.active* configuration in the `application.properties` file has been\nset accordingly for spring to automatically pick up the configurations.\n\n#### Using Flyway\n\nThe application uses `Flyway` for database versioning. As `Flyway` will need to create and alter tables, it will require\nmore access privileges than the standard database user. Therefore, it is recommended to create a separate database user\nused by `Flyway`. This user can be specified in the matching section in the `application.properties` file. If you wish\nto use `Flyway`, make sure to at least copy or uncomment the `spring.flyway.create-schemas` line. If you do not wish to\nuse any database versioning, you can set the `spring.flyway.enabled` property to false and\n`spring.datasource.initialization-mode=never`. The `schema.sql` file contains the latest database version and is updated\naccordingly with every new migration. You can simply create the database tables using the schema. However, you will then\nhave to incorporate subsequent updates to the database manually.\n\n#### Configuring multiple Scratch GUI instances\n\nSince the URL to the instrumented Scratch-GUI instance is saved per experiment, it is possible to use different Scratch\nGUIs for individual experiments. To take advantage of this feature, the *app.gui* property can contain a list of\ncomma-separated URLs **without whitespaces**. The provided URLs will be available as options in a dropdown-menu when\ncreating a new experiment. The *app.gui.base* property has to be configured accordingly to contain a comma-separated\nstring of all the unique base URLs of the different Scratch GUI instances (no need to specify the same base URL twice).\n\n#### Deployment under a relative context path\n\nIf you plan to deploy the project under a relative context path, e.g.`scratch.fim.uni-passau.de/scratchlog` instead of\n`scratch.fim.uni-passau.de`, you need to change the `server.servlet.context-path` in the `application.properties` file\naccordingly, e.g. to `/scratchlog` while the *app.url* value is `scratch.fim.uni-passau.de`.\n\n#### Configuring the instrumented Scratch instance\n\nYou also have to make some changes to the instrumented Scratch instance:\n- Change the *baseUrl* in `logging.js` in the instrumented `scratch-vm` to `\u003capp.url\u003e + \u003cserver.servlet.context-path\u003e\n  /store`.\n- Change the `window.location.href` in the *handleFinishExperiment()* method in `menu-bar.jsx` in the instrumented\n  `scratch-gui` to `\u003capp.url\u003e + \u003cserver.servlet.context-path\u003e`.\n- The instrumented `scratch-gui` and `scratch-vm` need to be linked via the `npm link` setting, as described\n  [here](https://github.com/LLK/scratch-gui/wiki/Getting-Started).\n\nOn application startup, a first administrator is added automatically, if no other administrator could be found in the\ndatabase. The login credentials are specified in the `UserInitialization` class. You should change these credentials\nimmediately after you have logged in.\n\n#### Configuring SSO Authentication\n\nThe application offers functionality to use single sign on through an identity service provider with SAML2. In order to\nuse this feature, you will have to do some additional configuration in the properties file(s):\n- Add `saml2` to the *spring.profiles.active* property.\n- Change the *app.saml2.base* string to the base URL of the IdP.\n- Change the *saml.username* string to the username pattern with which the username can be extracted from the SAML2\nauthentication.\n- Change the *saml.email* string to the email pattern with which the email can be extracted from the SAML2\nauthentication.\n- Change the *saml.extraction.key* string if needed.\n- Change the *saml.extraction.value* string if needed.\n- Change the *saml.metadata* string to the path at which the IdP's metadata file is located.\n- Change the *saml.idp* string to the name of the IdP.\n- Change the *saml.entity* string to the address at which ScratchLog will be available.\n- Change the *saml.certificate* and *saml.key* strings to the paths at which the server certificate and the key file are\navailable.\n\nPlease note that username or email changes from the IDP side are not propagated to the application. This means that if a\nuser has been authenticated via SSO once and the user has been added to the database, if the user changes their name and\nauthenticates via SSO again, a new user profile will be created.\n\n## Build and Deployment\n\n### Deployment\nTo deploy the project, just execute\n```bash\nmvn clean compile package\n```\nThis will package the project in a jar ready for execution. In order for the project to work properly, however, it still\nrequires a running instance of the instrumented `Scratch GUI` linked to the instrumented `Scratch VM` that is accessible\nover the `GUI_URL` constant.\n\n### Starting the application\n\nTo run the jar, execute\n```bash\njava -jar scratchLog-0.0.1-SNAPSHOT.jar\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fse2p%2Fscratchlog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fse2p%2Fscratchlog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fse2p%2Fscratchlog/lists"}