{"id":27107240,"url":"https://github.com/thecodemonkey/undressor","last_synced_at":"2025-10-21T18:14:40.905Z","repository":{"id":41091453,"uuid":"507581783","full_name":"thecodemonkey/undressor","owner":"thecodemonkey","description":"Twitter Bot + dashboard to visualize interest and activities of twitter accounts","archived":false,"fork":false,"pushed_at":"2022-08-18T19:41:19.000Z","size":21396,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T20:36:45.238Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thecodemonkey.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}},"created_at":"2022-06-26T13:28:03.000Z","updated_at":"2024-07-07T13:19:05.000Z","dependencies_parsed_at":"2022-07-14T08:17:14.288Z","dependency_job_id":null,"html_url":"https://github.com/thecodemonkey/undressor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thecodemonkey/undressor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodemonkey%2Fundressor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodemonkey%2Fundressor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodemonkey%2Fundressor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodemonkey%2Fundressor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thecodemonkey","download_url":"https://codeload.github.com/thecodemonkey/undressor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thecodemonkey%2Fundressor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273272156,"owners_count":25075971,"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","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2025-04-06T20:33:03.997Z","updated_at":"2025-10-21T18:14:35.884Z","avatar_url":"https://github.com/thecodemonkey.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# undressor\n\nTwitter Bot + dashboard to visualize interest and activities of twitter accounts. \n\nThis project was created during the Twitter Hackathon \n\u003ca href=\"https://chirpdevchallenge.devpost.com/\"\u003echirp DEV {challenge} 2022\u003c/a\u003e\n\n\u003cimg src=\"docs/img/preview.png\" \u003e\n\n\u003cbr/\u003e\u003cbr/\u003e\n\n- [motivation](#motivation)\n- [purpose](#purpose)\n- [what exactly is undressor](#what-exactly-is-undressor)  \n- [usage](#usage)\n- [development](#development)\n    - [getting started](#getting-started)\n    - [running in docker](#running-in-docker)       \n    - [project structure](#project-structure)\n    - [architecture](#architecture)\n- [license](#license)\n\n\u003cbr/\u003e\u003cbr/\u003e\n\n\n## motivation\n\n\u003cbr/\u003e\u003cbr/\u003e\n\n\u003e What is the benefit of all the unlimited communication and free speech if everyone is just talking crap and believe in it?\n\u003e We need mechanisms to drive Twitter and other social networks back to where they started. To bring people together instead of dividing them!\n\n\u003cbr/\u003e\u003cbr/\u003e\u003cbr/\u003e\n\nOf course, one of the reasons was just to play around with the Twitter API V2 and participate in the hackathon. \n\nBut the real motivation was to develop a possible solution to the biggest challenge of all social networks. Uncontrolled spreading of MANIPULATION and hate speech!\n\nSocial networks like Twitter have brought the world together and given all of us unprecedented freedom of speech. Everyone can express their opinion, really EVERYONE. It's a great thing! \n\nBut it is also a problem. There are people who are not interested in freedom of speech, but in deliberate manipulation. Or they simply want to spread hate and agitation. There are also people who unwittingly spread half-truths because they don't know any better. Either way, today's social networks are designed for the ultimate freedom of speech and offer practically no mechanisms to prevent abuse. There is no balance between freedom and anarchy. \n\nUndressor is an attempt to create exactly this balance in the Twitter universe. \n\nThe basic idea of Undressor is based on a self-regulating mechanism that provides more transparency. Anyone can request the bot to learn more about the interests and activities of the authors. The analysis will be graphically processed and posted as an answer in the thread for everyone visible. This has 2 effects:\n\n1. you yourself, but also the other users learn interesting insights about the author and can much better classify the content.\n\n2. authors who deliberately manipulate or spread hate speech would have less success finding supporters through this transparency. E.g. because an account is recognized as a bot due to non-stop activity. Or because the hashtag/keyword analysis proves a clearly radical attitude. \n\nUndressor does not judge, it just makes the hidden information visible and understandable for everyone. Users can read this information and make their own judgment!\n\n\u003cbr/\u003e\u003cbr/\u003e\n\n## purpose\n\nWe asked ourselves what current challenges the Twitter developer community is dealing with. To do this, we  researched various ranking lists of the best Twitter bots. Here are some of those sources:\n\n- https://beebom.com/best-twitter-bots/\n- https://increditools.com/twitter-bots/\n- https://techpp.com/2021/12/10/best-twitter-bots/\n- https://gist.github.com/derhuerst/1cb20598b692aa87d9bb\n\nThere you can find many bots and solutions that help to get more reach. Among the TOP 10 are also bots like: @year_progress, @emojimashupbot, or also @StupidCounter. We think that the social impact of these bots is not very big.\n\nWe haven't found a single solution that addresses truly real-world challenges. Issues like: Hate Speech, Propaganda, Manipulation, Radicalization of society or even Digital Detox are not addressed at all. These are real problems that everyone should be aware of by now. \n\nWhy are such issues not being addressed? Why does the Twitter community celebrate a bot that tweets a year's progress in ASCII characters every day? This is absolutely meaningless in our eyes. \n\nOur call to the developer community is: \n\n\u003e Let's look together at what really MATTERS!\n\u003e \n\u003e What is the benefit of all the unlimited communication and free speech if everyone is just talking crap and believe in it?\n\u003e We need mechanisms to drive Twitter and other social networks back to where they started. To bring people together instead of dividing them!\n\n\n\n\u003cbr/\u003e\u003cbr/\u003e\n\n\n## what exactly is undressor\n\nThis project consists of 2 separate solutions:\n\n1. the Twitter BOT\n2. the online portal\n\n\u003cbr/\u003e\u003cbr/\u003e\n\n\u003cimg src=\"docs/img/twitter-conversation.png\" width=\"400\"\u003e\n\nThe Twitter BOT provides a seamless user experience. Users can request the bot via @undressor and gets a reply directly without leaving Twitter. This is very convenient. However, the information content that is tweeted back by the bot in the form of images is still very limited. \n\n\u003cbr/\u003e\u003cbr/\u003e\n\u003cimg src=\"docs/img/portal-insights.png\"\u003e\n\n\nIn order to provide the user with further detailed information, the online portal(https://undressor-ui.herokuapp.com/) was also developed. In addition to the charts, easy-to-read texts are also provided there. The textual content is intended to tell a story, which at the same time is to be supported by graphically prepared charts. \n\n\u003cbr/\u003e\u003cbr/\u003e\n\n\u003cimg src=\"docs/img/portal-home.png\" \u003e\n\nIn addition, the portal offers the possibility to directly analyze different Twitter accounts without affecting an ongoing thread in Twitter. \n\n\u003cbr/\u003e\u003cbr/\u003e\n\n\u003cimg src=\"docs/img/portal-dashboard.png\"\u003e\n\nA dashboard with many more interesting insights is also planned for the future.\n\n\n\u003cbr/\u003e\u003cbr/\u003e\n\n## usage\n\nYou can mention the bot in any Twitter reply via @undressor. The bot then analyzes the account of the author of the original post, visualizes the corresponding data and tweets the analysis back as set of 4 images.\n\nThe post also includes a link to the online portal. There you can get more information about the account. \n\n\u003cbr/\u003e\u003cbr/\u003e\n\n\n## development\n\nIf you are a developer and are interested in this open source solution, then you will find here all the information you need to get the project running locally.\n\n\u003cbr/\u003e\u003cbr/\u003e\n\n\n### getting started\n\n1. get project sources from git\n\n    ```bash\n    git clone https://github.com/thecodemonkey/undressor.git\n    ```    \n\n2. build and run ui\n\n    ```bash\n    cd ui\n    npm i\n    ng serve\n    ```    \n3. open ui in browser http://localhost:4200\n4. build api\n    \n    ```bash\n    cd api\n    npm i\n    npm run build\n    ```    \n5. configure environment variables\n    \n    ```bash\n    #create .env file in the root of api directory\n    # this file contains secretes, and is included in the .gitignore\n\n    touch .env \n    ```\n\n    Add these variables to the .env file:\n\n    ```bash\n    \n    #rest api port\n    PORT=3000                     \n\n    # To use the Twitter API, the first thing you need is a Twitter\n    # developer account. Create Twitter account under \n    # https://developer.twitter.com/ and transfer all necessary \n    # secrets into the corresponding variables:\n\n    #twitter api app key \n    APP_KEY=xxx                   \n    #twitter api app secret\n    APP_SECRET=xxx                \n    #twitter api access token\n    ACCESS_TOKEN=xxx              \n    #twitter api access secret\n    ACCESS_SECRET=xxx             \n\n    #twitter api bearer token  \n    BEARER_TOKEN=xxx              \n\n    #twitter username of a bot account\n    TWITTER_NAME=undressor        \n\n    #connection string of postgresdb\n    DATABASE_URL=[DB_CONN_STR]\n\n    #polling interval for the bot\n    BOT_POLLING_INTERVAL=10\n    #enables/disables the bot\n    BOT_ON=true\n    #enables/disables the dry run of the bot\n    #dry run do analysis, save images locally and do not make real tweets\n    BOT_DRY_RUN=false\n\n    #base url to generate url for the reply\n    BASE_URL=\"http://localhost:4200/\"\n    #base url to generate images\n    BASE_IMAGE_URL=\"http://localhost:4200/\"\n\n\n    #16 bit encryption vector\n    ENCRYPTION_IV=bC434Umzlk3Tra1I\n    #encryption key\n    ENCRYPTION_KEY=abC5pumlZR39g91RyRm94bOaPi1zLr0I\n    ```\n\n6. run api\n   \n    ```bash\n    npm run start\n    ```   \n\n7. run bot\n   \n    ```bash\n    npm run bot\n    ```\n\n\n\u003cbr/\u003e\u003cbr/\u003e\n\n### running in docker\n\nTo run the application with docker you first need the `.env` file as described in the [getting started](#getting-started).\n\nThe easiest way to start the whole application is by using `docker-compose`.\nTo use it you have to define a `docker-compose.yml` with a content like the following:\n\n```yaml\nversion: '3'\nservices:\n  undressor-frontend:\n    image: ghcr.io/thecodemonkey/undressor-frontend:latest\n    ports:\n      - 8080:8080\n  undressor-api:\n    image: ghcr.io/thecodemonkey/undressor-api:latest\n    env_file: .env\n    ports:\n      - ${PORT}:${PORT}\n  undressor-bot:\n    image: ghcr.io/thecodemonkey/undressor-bot:latest\n    env_file: .env\n    ports:\n      - 27016:27017\n```\n\nThe containers can be started by running `docker-compose up`.\nIf you want to update the images, because we updated them, you can run those commands:\n\n```sh\ndocker-compose up --force-recreate --build -d\ndocker image prune -f\n```\n\n\u003cbr/\u003e\u003cbr/\u003e\n\n### project structure\n\nThis repository consists of 2 separate code bases:\n\n1. UI/Frontend\n2. Backend (BOT + REST API)\n\n\n\u003cpre\u003e\n\n undressor\n   ║\n   ╠═ .github/workflows  (gh action)\n   ║\n   ╠═ docs               (docs/imgs)\n   ║      \n   ╠═ ui                 (UI/Angular Project)\n   ║\n   ╚═ api                (REST API/BOT Node/Typescript project)\n\n\u003c/pre\u003e\n\nTo load the project in an IDE, please do not use the root directory, but the respective subdirectory [ui](ui) or [api](api)!\n\n\u003cbr/\u003e\u003cbr/\u003e\n\n### architecture\n\nUndressor primarily uses the Twitter infrastructure, consisting of the actual Twitter app and the corresponding Twitter API. \n\n\u003cimg src=\"docs/img/architecture.png\"\u003e\n\nThe solution itself consists of 4 separate runtime components:\n\n1. the Web APP\n2. the REST API\n3. the BOT\n4. and the associated PostgreSQL database\n\nThe communication between the Undressor components and the Twitter API is handled by an npm lib \"twitter-api-v2\".\n\n\u003cbr/\u003e\u003cbr/\u003e\n\nAs a result of the analysis, the bot creates several charts in PNG format and tweets them as a reply. The creation of these images works as follows:\u003cbr/\u003e\n\u003cimg src=\"docs/img/architecture-process.png\"\u003e\n\n\u003cbr/\u003e\u003cbr/\u003e\n\n\n## license\n\ni ❤️ [MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodemonkey%2Fundressor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthecodemonkey%2Fundressor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecodemonkey%2Fundressor/lists"}