{"id":19370351,"url":"https://github.com/codam-coding-college/peerpp-bot","last_synced_at":"2025-06-13T04:38:52.778Z","repository":{"id":37467495,"uuid":"475467246","full_name":"codam-coding-college/peerpp-bot","owner":"codam-coding-college","description":"The peer++ evaluation system ensures quality evaluations by matching students with high-level evaluators","archived":false,"fork":false,"pushed_at":"2023-06-23T12:39:45.000Z","size":584,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T14:24:46.315Z","etag":null,"topics":["42born2code","codam","flask","slack-bot","webhooks"],"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/codam-coding-college.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-03-29T13:57:12.000Z","updated_at":"2022-10-25T12:33:37.000Z","dependencies_parsed_at":"2025-01-06T23:50:46.636Z","dependency_job_id":null,"html_url":"https://github.com/codam-coding-college/peerpp-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codam-coding-college/peerpp-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codam-coding-college%2Fpeerpp-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codam-coding-college%2Fpeerpp-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codam-coding-college%2Fpeerpp-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codam-coding-college%2Fpeerpp-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codam-coding-college","download_url":"https://codeload.github.com/codam-coding-college/peerpp-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codam-coding-college%2Fpeerpp-bot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259583009,"owners_count":22880127,"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":["42born2code","codam","flask","slack-bot","webhooks"],"created_at":"2024-11-10T08:15:04.285Z","updated_at":"2025-06-13T04:38:52.732Z","avatar_url":"https://github.com/codam-coding-college.png","language":"TypeScript","readme":"\u003c/br\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003cimg width=420 src=\"https://user-images.githubusercontent.com/63303990/186118455-d1a2c167-702d-4be9-8e9e-08f3b7791902.png\" alt=\"Logo\"\u003e\n\u003c/div\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003csub\u003eWritten by \u003ca href=\"https://github.com/SirMorfield/\"\u003eJoppe\u003c/a\u003e \u0026 \u003ca href=\"https://portfolio.w2wizard.dev/\"\u003eW2.Wizard\u003c/a\u003e for Codam Coding College \u003c/sub\u003e\n\u003c/div\u003e\n\u003c/br\u003e\n\n## What is the Peer++ system?\nThe peer++ evaluation system ensures quality evaluations by matching students with high-level evaluators.\n\nRead more about it [here](https://codam.notion.site/Peer-Evaluations-810cdd6714074f1b881fc8d4e54e5e5f).\n\n---\n\n## Installation\nConvert `./config/env-example` to `.env` and fill in the secret data.\n\nBy default port `8080` is used for the webhooks express server\nand port `3000` is used for the slack bot using the slackbot API.\n\nThe slackbot runs over Websockets instead of HTTP Requests.\n\n### Development\n1. Install NodeJS 18.x or higher.\n2. Install dependencies: `npm install`\n3. Use `npm run dev` for development mode.\n\n### Production\nIn production environments, use Docker.\n\n- Use `make up` to run in a docker container.\n- Use `make down` to shut down the docker container.\n\nOr, if you're confident in your Docker skills, you can just use the `docker compose` command directly.\n\n#### Logrotate\nIn production, we recommend setting up a logrotate in the `logs` directory.\nCreate a logrotate config in the `/etc/logrotate.d` folder.\n\nYou can use or modify the configuration below:\n```\n/root/peer-bot/logs/log.txt {\n        weekly\n        missingok\n        rotate 4\n        compress\n        delaycompress\n        shred\n        ifempty\n        create 644 root root\n}\n```\n\n---\n\n## Useful how-tos\n### Add a user to the peer++ group\n1. Go to the `peer-bot` directory.\n2. Run `node src/scripts/manageUser.js add \u003clogin\u003e` where `\u003clogin\u003e` is the login of the user you want to add to the peer++ group.\n\n### Remove a user from the peer++ group\n1. Go to the `peer-bot` directory.\n2. Run `node src/scripts/manageUser.js remove \u003clogin\u003e` where `\u003clogin\u003e` is the login of the user you want to remove from the peer++ group.\n\n### List all users in the peer++ group\n1. Go to the `peer-bot` directory.\n2. Run `node src/scripts/getUsers.js`.\n\n### Manually schedule a peer++ evaluation\n1. Go to the `peer-bot` directory.\n2. Run `node src/scripts/bookEval.js \u003cscaleID\u003e \u003cteamID\u003e \u003cuserID\u003e` where `\u003cscaleID\u003e` is the scaleID of the scale you want to use for the evaluation, `\u003cteamID\u003e` is the teamID of the team you want to schedule an evaluation for and `\u003cuserID\u003e` is the userID of the evaluator (the one evaluating the team).\n\n### Allow cancellation of a peer++ evaluation\n1. Go to the `peer-bot` directory.\n2. Run `sqlite3 db/peerdb.sqlite`.\n3. Run `INSERT INTO expiredTeam(teamID) VALUES ('\u003cteamID\u003e');` in the sqlite3 shell, where `\u003cteamID\u003e` is the teamID of the team you want to cancel the evaluation for.\n4. Run `.exit` to exit the sqlite3 shell.\n5. Tell the team that they can now cancel the evaluation (make them press x next to the evaluation on the Intranet).\n6. Run `node src/scripts/addPoint.js \u003clogin\u003e` where `\u003clogin\u003e` is the login of the student who lost an evaluation point for the cancellation. This will refund the point to the student.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodam-coding-college%2Fpeerpp-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodam-coding-college%2Fpeerpp-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodam-coding-college%2Fpeerpp-bot/lists"}