{"id":15612379,"url":"https://github.com/euberdeveloper/tumi-app-bot","last_synced_at":"2025-09-20T03:14:55.817Z","repository":{"id":43251660,"uuid":"415960668","full_name":"euberdeveloper/tumi-app-bot","owner":"euberdeveloper","description":"A telegram bot to receive a message when there is a new spot for tumi events","archived":false,"fork":false,"pushed_at":"2023-10-19T08:55:09.000Z","size":358,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-04T15:50:02.409Z","etag":null,"topics":["telegram-bot","tum","typescript"],"latest_commit_sha":null,"homepage":"https://t.me/tumi_app_bot","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/euberdeveloper.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":"2021-10-11T14:25:12.000Z","updated_at":"2022-03-03T13:04:43.000Z","dependencies_parsed_at":"2023-01-20T07:32:47.933Z","dependency_job_id":"cc0118b7-a5d2-413f-8eb1-7ec22f5fab99","html_url":"https://github.com/euberdeveloper/tumi-app-bot","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euberdeveloper%2Ftumi-app-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euberdeveloper%2Ftumi-app-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euberdeveloper%2Ftumi-app-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euberdeveloper%2Ftumi-app-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/euberdeveloper","download_url":"https://codeload.github.com/euberdeveloper/tumi-app-bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246200323,"owners_count":20739566,"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":["telegram-bot","tum","typescript"],"created_at":"2024-10-03T06:42:07.011Z","updated_at":"2025-09-20T03:14:50.796Z","avatar_url":"https://github.com/euberdeveloper.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [tumi-app-bot](https://t.me/tumi_app_bot)\nA telegram bot to receive a message when there is a new spot for tumi events\n\nTODO: \n* Make bot register yourself for events you want, sending notification to complete payment in case it is needed\n\n## Project purpose\n\nAt TUM we are in about **50 000** students and a great quantity are exchange or international students. The [TUMI App](https://tumi.esn.world/events) is a pwa where students can register to events organized for international students, but there are usually **few spots available**. Events with even 300 spots can become fully booked in less than 10 minutes. This project consists in a **telegram bot** that **sends you a message** when a new event is published or when there is a new free spot in an event that was fully booked.\n\n## How was it made\n\nThe bot has been developed by using **Typescript** and **Node.js**. Initially, it used a **webscraper** that used **puppeteer**; it worked but it was susceptible to the websites' changes and was not so performant. This is why a newer version was developerd that used directly the **GraphQL** api used by the tumi pwa. **Redis** has been used as database, **Telegraf** as bot library and **Bull.js** as a scheduler. The deploy has been done with **Docker** (swarms). The code is also linted with **ESLint** and **Prettier**.\n\n## How does it work\n\nIt is quite simple:\n1. The **telegram bot** is started; it has the **/start**, **/stop**, **/help**, **/author** and **/version** commands.\n2. A **scheduler** is started by using bull.js\n3. Every time the scheduler fires, it **gets the updated events**, **saves them on redis**, **checks if there are changes** (new event id, change of an event's spots from 0 to a positive number, an event registration is now open or opens soon) and, if there are changes, **sends a telegram message** to all the registered users.\n4. Every time a user **starts or stops** the bot, it is **added or removed** to the redis database, so that the bot knows to whom send the messages.\n\n## How was it deployed\n\nThere is a **Dockerfile** that is used to create an **image** of the bot, that is automatically published on **DockerHub** through a **Github Action**. In the `deploy` folder, there is the `docker-compose.yml` file that is used by **docker swarm** to serve the bot, the redis db and the **watchtower updater**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feuberdeveloper%2Ftumi-app-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feuberdeveloper%2Ftumi-app-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feuberdeveloper%2Ftumi-app-bot/lists"}