{"id":14037291,"url":"https://github.com/conversationai/conversationai-moderator","last_synced_at":"2026-01-17T00:31:27.701Z","repository":{"id":21896649,"uuid":"88194224","full_name":"conversationai/conversationai-moderator","owner":"conversationai","description":"A machine-assisted human-moderation toolkit.","archived":false,"fork":false,"pushed_at":"2025-06-24T04:59:06.000Z","size":15583,"stargazers_count":205,"open_issues_count":36,"forks_count":31,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-07-27T06:01:24.880Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/conversationai.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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":"2017-04-13T18:22:56.000Z","updated_at":"2025-06-21T17:03:10.000Z","dependencies_parsed_at":"2023-02-18T06:45:35.644Z","dependency_job_id":"d5824e94-9fb3-483f-8bb4-3249f5febf7f","html_url":"https://github.com/conversationai/conversationai-moderator","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/conversationai/conversationai-moderator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conversationai%2Fconversationai-moderator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conversationai%2Fconversationai-moderator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conversationai%2Fconversationai-moderator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conversationai%2Fconversationai-moderator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/conversationai","download_url":"https://codeload.github.com/conversationai/conversationai-moderator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conversationai%2Fconversationai-moderator/sbom","scorecard":{"id":303732,"data":{"date":"2025-08-11","repo":{"name":"github.com/conversationai/conversationai-moderator","commit":"0373a11e3376a77e1e0f8b7647b1af6079d5688e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.1,"checks":[{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/conversationai/.github/SECURITY.md:1","Info: Found linked content: github.com/conversationai/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/conversationai/.github/SECURITY.md:1","Info: Found text in security policy: github.com/conversationai/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: containerImage not pinned by hash: deployments/gcloud/Dockerfile:1: pin your Docker image by updating gcr.io/google_appengine/nodejs to gcr.io/google_appengine/nodejs@sha256:1c585726fc3915489e23816fb20fabc92f31208f8d61cadf4ebb784dcf427c50","Warn: containerImage not pinned by hash: deployments/local/Dockerfile:1: pin your Docker image by updating gcr.io/google_appengine/nodejs to gcr.io/google_appengine/nodejs@sha256:1c585726fc3915489e23816fb20fabc92f31208f8d61cadf4ebb784dcf427c50","Warn: containerImage not pinned by hash: deployments/standalone/Dockerfile:1: pin your Docker image by updating ubuntu:bionic to ubuntu:bionic@sha256:152dc042452c496007f07ca9127571cb9c29697f42acbfad72324b2bb2e43c98","Warn: npmCommand not pinned by hash: deployments/standalone/Dockerfile:3","Warn: npmCommand not pinned by hash: bin/install:24","Warn: npmCommand not pinned by hash: bin/install-circleci:3","Info:   0 out of   3 containerImage dependencies pinned","Info:   0 out of   3 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"116 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-h5c3-5r3r-rr8q","Warn: Project is vulnerable to: GHSA-rmvr-2pp2-xj38","Warn: Project is vulnerable to: GHSA-xx4v-prfh-6cgc","Warn: Project is vulnerable to: GHSA-8hc4-vh64-cxmj","Warn: Project is vulnerable to: GHSA-jr5f-v2jv-69x6","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-c2jc-4fpr-4vhg","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-jjf5-wx3j-3fv7","Warn: Project is vulnerable to: GHSA-x2w5-725j-gf2g","Warn: Project is vulnerable to: GHSA-4jrm-c32x-w4jf","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-h452-7996-h45h","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-4gxf-g5gf-22h4","Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-qrmc-fj45-qfc2","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-8cf7-32gw-wr33","Warn: Project is vulnerable to: GHSA-hjrf-2m68-5959","Warn: Project is vulnerable to: GHSA-qwph-4952-7xr6","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-8hfj-j24r-96c4","Warn: Project is vulnerable to: GHSA-wc69-rhjr-hc9g","Warn: Project is vulnerable to: GHSA-56x4-j7p9-fcf9","Warn: Project is vulnerable to: GHSA-v78c-4p63-2j6c","Warn: Project is vulnerable to: GHSA-mqr2-w7wj-jjgr","Warn: Project is vulnerable to: GHSA-49j4-86m8-q2jw","Warn: Project is vulnerable to: GHSA-fpw7-j2hg-69v5","Warn: Project is vulnerable to: GHSA-4rch-2fh8-94vw","Warn: Project is vulnerable to: GHSA-pmh2-wpjm-fj45","Warn: Project is vulnerable to: GHSA-qrpm-p2h7-hrv2","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-5rrq-pxf6-6jx5","Warn: Project is vulnerable to: GHSA-8fr3-hfg3-gpgp","Warn: Project is vulnerable to: GHSA-gf8q-jrpm-jvxq","Warn: Project is vulnerable to: GHSA-2r2c-g63r-vccr","Warn: Project is vulnerable to: GHSA-cfm4-qjh2-4765","Warn: Project is vulnerable to: GHSA-x4jg-mjrx-434g","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-v923-w3x8-wh69","Warn: Project is vulnerable to: GHSA-f794-r6xc-hf3v","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-p493-635q-r6gr","Warn: Project is vulnerable to: GHSA-3965-hpx2-q597","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-35q2-47q7-3pc3","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-wrh9-cjv3-2hpw","Warn: Project is vulnerable to: GHSA-8c25-f3mj-v6h8","Warn: Project is vulnerable to: GHSA-vqfx-gj96-3w95","Warn: Project is vulnerable to: GHSA-f598-mfpv-gmfx","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-wpg7-2c88-r8xv","Warn: Project is vulnerable to: GHSA-qxg5-2qff-p49r","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw","Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-qgmg-gppg-76g5","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp","Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-whgm-jr23-g3j9","Warn: Project is vulnerable to: GHSA-q8pj-2vqx-8ggc","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-4wx3-54gh-9fr9","Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-gj77-59wh-66hg","Warn: Project is vulnerable to: GHSA-hqhp-5p83-hx96","Warn: Project is vulnerable to: GHSA-3949-f494-cm99","Warn: Project is vulnerable to: GHSA-x7hr-w5r2-h6wg","Warn: Project is vulnerable to: GHSA-76p7-773f-r4q5","Warn: Project is vulnerable to: GHSA-w5hq-hm5m-4548","Warn: Project is vulnerable to: GHSA-w5p7-h5w8-2hfq","Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986","Warn: Project is vulnerable to: GHSA-wr3j-pwj9-hqq6","Warn: Project is vulnerable to: GHSA-4v9v-hfq4-rm2v","Warn: Project is vulnerable to: GHSA-9jgg-88mc-972h","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-17T21:26:58.011Z","repository_id":21896649,"created_at":"2025-08-17T21:26:58.011Z","updated_at":"2025-08-17T21:26:58.011Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28490140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T23:55:29.509Z","status":"ssl_error","status_checked_at":"2026-01-16T23:55:29.108Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2024-08-12T03:02:39.976Z","updated_at":"2026-01-17T00:31:27.671Z","avatar_url":"https://github.com/conversationai.png","language":"TypeScript","funding_links":[],"categories":["🔧 Utilities \u0026 Miscellaneous","TypeScript"],"sub_categories":[],"readme":"OSMod - The ConversationAI Moderator App\n========================================\n\nDeploying an OSMod instance\n---------------------------\n\n### Configuration\n\nThe configuration is found in packages/config/index.js.  It is pretty self explanatory.\nAll settings can be overridden via environment variables.\n\nOf particular note, the following have no sensible defaults, and\nmust be set in the environment before anything will work.\n\n* `DATABASE_NAME`: The MySQL database name, e.g., 'os_moderator'.\n* `DATABASE_USER`: The MySQL database user, e.g., 'os_moderator'.\n* `DATABASE_PASSWORD`: The MySQL database password.\n\nIn a production setting, you'll also have to set the following:\n\n* `MODERATOR_URL`: URL (including protocol, host and port) that OSMOD will listen on.\n\n### System setup:\n\nInstall mysql, node (v10 or better), npm (v6 or better) and redis.  Instructions for Ubuntu:\n\n```bash\nsudo apt install mysql-server nodejs npm redis\nsudo apt install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev\nsudo npm install -g npm n\nsudo n v10\nhash -r\n```\n\n#### System setup -- Docker\n\nIf you want to run your moderator instances in one of the preconfigured docker containers,\nyou'll need to install docker.  E.g., to install on Ubuntu 18.04 using apt\n\n```bash\nsudo apt install docker.io\n\n# Add docker group to your account so you can talk to the local docker server.\n# You probably need to log out and back in for groups to take effect.\nsudo usermod -a -G docker `whoami`\n\nsudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose\nsudo chmod +x /usr/local/bin/docker-compose\n\n# check things work\ndocker version\ndocker-compose --version.\n```\n\n### Install dependencies and run the server\n\nInstall all node dependencies and run initial typescript compile.\n\n```bash\n./bin/install\n```\n\nSetup local MySQL:\n\n```bash\nsudo mysql \u003c\u003c EOF\nCREATE DATABASE $DATABASE_NAME;\nCREATE USER IF NOT EXISTS '$DATABASE_USER' IDENTIFIED BY '$DATABASE_PASSWORD';\nGRANT ALL on $DATABASE_NAME.* to $DATABASE_USER;\nEOF\n\nsudo mysql $DATABASE_NAME \u003c seed/initial-database.sql\ncd packages/backend-api\nnpx sequelize db:migrate\ncd -\n\n# Add a service user that can talk to the Perspective API:\nbin/osmod users:create --group moderator --name \"PerspectiveAPI\" \\\n  --moderator-type \"perspective-api\" --api-key $YOUR_PERSPECTIVE_API_KEY\n\n# Run the server\nbin/watch\n```\n\n#### Alternatively, run in a docker container\n\nTo run the service in a local docker container, run the following commands:\n\n```bash\n# Make sure any local instances of MySQL and Redis are not running\n# E.g., on Ubuntu, stop the services\nsudo systemctl stop mysql.service redis_6379.service redis-server.service\n\n# Create docker images and launch the service\ndocker-compose -f deployments/local/docker-compose.yml up -d\n```\n\nThe docker-compose scripts will initialise the database and create an API service user,\nso you don't need to do those steps manually.\n\nTo shut down the service and delete all your containers:\n\n```bash\ndocker-compose -f deployments/local/docker-compose.yml down\n```\n\nAnd to see what the container is doing:\n\n```bash\ndocker-compose -f deployments/local/docker-compose.yml logs\n```\n\nThe `osmod` CLI\n---------------\n\nYou can manage your OSMod system using the osmod commandline tool:\n\n```bash\n./bin/osmod \u003ccommand\u003e \u003coptions\u003e\n```\n\nwhere `command` is one of\n\n* `users:create`                     Create new OS Moderator users\n* `users:get-token`                  Get a JWT token for a user specified by id or email\n* `comments:rescore`                 Rescore comment.\n* `comments:send-to-scorer`          Send comments to Endpoint of user object to get scored.\n* `comments:calculate-text-size`     Using node-canvas, calculate a single comment height at a given width.\n* `comments:recalculate-text-sizes`  Using node-canvas, recalculate comment heights at a given width.\n* `comments:recalculate-top-scores`  Recalculate comment top scores.\n* `comments:flag`                    Flag comments.\n* `comments:delete`                  Delete all comments from the database.\n* `denormalize`                      Re-run denormalize counts\n\n\n#### Managing Users\n\nIf you are an administrator, you can create other administrators, general moderator users,\nand service users via the settings pages in the OSMod UI.  Also, if there are no admin users,\nthe UI will turn the first user to log in into an admin.  But you can also create users via the commandline.\n\nCreate a human user:\n\n```bash\n./bin/osmod users:create --group general --name \"Name\" --email \"$EMAIL_OF_USER\"\n```\n\nReplace `general` with `admin` if you want to create an administrator.\n\n\nTo create a service user - i.e., one that can connect via the API but not via the UI:\n\n```bash\n./bin/osmod users:create --group service --name \"Robot\"\n```\n\nService users will require a JWT token.  You can get this via the UI, or via running the following command:\n\n```bash\n./bin/osmod users:get-token --id 4\n```\n\n### Management commands\n\nTo run a local server on `:8080` and front-end on `:8000`\n\n```bash\n./bin/watch\n```\n\n### Lint\n\n```bash\n./bin/lint\n```\n\noptionally you can run lint-fix to attempt auto-fixing most lint errors\n\n```bash\n./bin/lint-fix\n```\n\n### Storybook\n\nTo preview individual widgets and components used by the the OSMod UI:\n\n```bash\n./bin/storybook\n```\n\nThe frontend unit tests also use storybook to generate a HTML snapshot of the resulting widgets.  \nIt then compares this snapshot to a stored version, allowing you to review and approve any changes. \n\nTo update stories that need new snapshots, go to `packages/frontend-web` and run\n\n```bash\nnpm run storybook:test -- -u\n```\n\n## Development\n\nThe project uses [lerna](https://www.npmjs.com/package/lerna) to help manage\ndevelopment [the several npm packages](packages/README.md) that are in this\nrepository. Lerna sym-links package dependencies within this repository. Lerna\nis also used to publish updates to all these packages at once.\n\n## Running tests\n\nTo run the tests, you'll need to tweak your enviornment:\n\n```bash\n# Some tests need admin privileges to clean out the database\nexport DATABASE_NAME=os_moderator_test\nexport DATABASE_USER=root\n\n# Run all the tests\nNODE_ENV=test bin/test\n\n# or you can run individual tests:\ncd packages/backend-api\nNODE_ENV=test npm run test\nNODE_ENV=test ../../node_modules/.bin/ts-mocha 'src/test/domain/comments/*.spec.js' --recursive --timeout 10000\n```\n\nThe `bin/test` script uses lerna to first compile all the typescript to javascript,\nthen runs all the tests.\n\nDeleting and recreating the database schema can take a very long time, hence the long timeout above.\nYou may need to increase this even further if your system is particularly slow.\n\nIf you want to run a test in the debugger, add the --inspect-brk flag to the mocha invocation,\nthen connect using the chrome inspector (URL: `chrome://inspect`).\n\n## What a running service looks like\n\nWhile there can be many ways to setup a service, in general a deployment will\ntypically be a single VM instance running these services:\n\nA MySQL database that holds all of the applications state (See\n[the data model doc](docs/modeling.md)).\n\n*  Frontend-Webserver service hosting the static ReactJS site. This sends\n   messages to the Backend API service.\n*  Backend API service responsible for querying the SQL database and sending\n   data to the front-end service. This is also the endpoint that receives\n   requests from the commenting platform it is supporting moderation of; and\n   it sends requests back to the commenting platform with user actions (e.g. to\n   reject or approve comments).\n*  Backend Work Queue service responsible for managing concurrent queue of\n   asynchronous work. TODO(ldixon): add reddis stuff?\n*  Some number of assistant services responsible for automating tasks.\n   Typically this is just calling ML services like\n   [the Perspective API](https://perspectiveapi.com/)\n   \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconversationai%2Fconversationai-moderator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconversationai%2Fconversationai-moderator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconversationai%2Fconversationai-moderator/lists"}