{"id":19524897,"url":"https://github.com/pandermatt/hatey-bot-backend","last_synced_at":"2025-02-26T01:25:05.937Z","repository":{"id":94876249,"uuid":"541606851","full_name":"pandermatt/hatey-bot-backend","owner":"pandermatt","description":"🤬🤖 Hatey Bot Backend","archived":false,"fork":false,"pushed_at":"2024-03-13T12:05:41.000Z","size":58895,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-23T22:19:25.105Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pandermatt.ch/hatey-bot/","language":"Jupyter Notebook","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/pandermatt.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-09-26T13:40:31.000Z","updated_at":"2024-03-13T12:05:13.000Z","dependencies_parsed_at":"2024-11-11T01:02:43.869Z","dependency_job_id":null,"html_url":"https://github.com/pandermatt/hatey-bot-backend","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pandermatt%2Fhatey-bot-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pandermatt%2Fhatey-bot-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pandermatt%2Fhatey-bot-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pandermatt%2Fhatey-bot-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pandermatt","download_url":"https://codeload.github.com/pandermatt/hatey-bot-backend/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240774012,"owners_count":19855315,"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":"2024-11-11T00:50:31.038Z","updated_at":"2025-02-26T01:25:05.901Z","avatar_url":"https://github.com/pandermatt.png","language":"Jupyter Notebook","readme":"# 🤬🤖 Hatey Bot Backend\n\n## Important Links\n\n- [Website hatey.monster](https://hatey.monster)\n- [Swagger Documentation api.hatey.monster](https://api.hatey.monster)\n- [Frontend GitHub](https://github.com/pandermatt/hatey-bot-frontend) [![React app deployement](https://github.com/pandermatt/hatey-bot-frontend/actions/workflows/deploy.yml/badge.svg)](https://github.com/pandermatt/hatey-bot-frontend/actions/workflows/deploy.yml)\n- [Backend GitHub](https://github.com/pandermatt/hatey-bot-backend)\n- [LaTeX Documentation](https://www.overleaf.com/project/633592679211c2009c8bce96)\n\n\u003cimg width=\"50%\" src=\"https://user-images.githubusercontent.com/20790833/197025621-890eda34-d057-4acb-b685-ea8efaa06081.png\"\u003e\n\n\n## Development\n\nThe swagger documentation is automatically generated and can be found at [api.hatey.monster](https://api.hatey.monster).\n\n### Setup\n\n```bash\ngit clone git@github.com:pandermatt/hatey-bot-backend.git\ncd hatey-bot-backend\n\n# Install dependencies\npip install -r requirements.txt\n\n# Create application config\ncp application.example.yml application.yml\n```\n\n#### Application config\n\nThe application config is a YAML file that contains all the configuration for the application. \nIt is located at `application.yml` and is ignored by git. \nThe file `application.example.yml` contains all the possible configuration options with their default values.\nSee [application.example.yml](application.example.yml) for more information.\n\n\n### Run\n\n- Run the Flask application with `python app.py`\n- Run the production server with `python waitress_server.py`\n\nIf `CAN_GENERATE_FILES` in the application config is set to `True`, the application will generate all the AI models and files on startup.\nThus, the first startup will take a while.\nAll needed files will be generated in the [data](data) folder.\nThe app downloads the data from several sources, like GitHub or HuggingFace.\nPre-generated files are available in the [data/input](data/input) folder.\n\n\n### Tests\n\n- Run the tests with `python -m pytest py_tests/`\n\n\n### Research\n\nThe [research](research) folder contains all the research and experiments that were done for this project.\nThe filename describes the topic of the research and they can be run with `python filename.py` or with jupyter notebooks.\n\n## Slackbot Integration\n\nCreate a new Slack App via [api.slack.com/apps](https://api.slack.com/apps) and click on \u003cYour Slack App Name\u003e\n\n- Find the ENV var `SLACK_BOT_TOKEN` under OAuth \u0026 Permissions $\\rightarrow$ Bot User OAuth Access Token\n- Find the ENV var `SLACK_SIGNING_SECRET` under Basic Information $\\rightarrow$ Signing Secret\n\n\n## Server deployment\n\nInstructions for deploying the app on a server.\nWe use [asdf](https://asdf-vm.com/#/) to manage the different versions of python and [caddy](https://caddyserver.com/) as a reverse proxy.\n\n### Setup\n\n```bash\n# install asdf to easily install python\ngit clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.10.2\necho \". $HOME/.asdf/asdf.sh\" \u003e\u003e ~/.bashrc\necho \". $HOME/.asdf/completions/asdf.bash\" \u003e\u003e ~/.bashrc\nsource ~/.bashrc\n\n# install python\nsudo apt-get update; sudo apt-get install --no-install-recommends make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev\nasdf plugin-add python\nasdf install python 3.7.14\nasdf global python 3.7.14\n\n# clone repo\ngit clone git@github.com:pandermatt/hatey-bot-backend.git\ncd hatey-bot-backend\npip install -r requirements.txt\ncp application.example.yml application.yml\n\n# install caddy to serve the app\nsudo apt install -y debian-keyring debian-archive-keyring apt-transport-https\ncurl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg\ncurl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list\nsudo apt update\nsudo apt install caddy\n\n# start caddy\ncaddy start\n```\n\n\n\n## Contributors\n\nMade with ❤️ by Pascal, Tobias and Denis\n\n![](https://avatars.githubusercontent.com/u/20790833?s=64)\n![](https://avatars.githubusercontent.com/u/87606238?s=64)\n![](https://avatars.githubusercontent.com/u/15248306?s=64)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpandermatt%2Fhatey-bot-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpandermatt%2Fhatey-bot-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpandermatt%2Fhatey-bot-backend/lists"}