{"id":18098555,"url":"https://github.com/makiftutuncu/tweet-tracker","last_synced_at":"2025-04-06T04:18:02.840Z","repository":{"id":152869454,"uuid":"533281016","full_name":"makiftutuncu/tweet-tracker","owner":"makiftutuncu","description":"An application for streaming tweets containing a search term on Twitter in real time for a predefined duration or number of tweets","archived":false,"fork":false,"pushed_at":"2023-12-15T02:31:11.000Z","size":34,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-12T10:19:00.555Z","etag":null,"topics":["scala","scala3","streaming","sttp","tweets","twitter","zio","zio-streams"],"latest_commit_sha":null,"homepage":"","language":"Scala","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/makiftutuncu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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-06T10:51:09.000Z","updated_at":"2025-01-19T09:12:53.000Z","dependencies_parsed_at":"2023-12-15T03:43:04.287Z","dependency_job_id":null,"html_url":"https://github.com/makiftutuncu/tweet-tracker","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/makiftutuncu%2Ftweet-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makiftutuncu%2Ftweet-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makiftutuncu%2Ftweet-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/makiftutuncu%2Ftweet-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/makiftutuncu","download_url":"https://codeload.github.com/makiftutuncu/tweet-tracker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247430976,"owners_count":20937876,"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":["scala","scala3","streaming","sttp","tweets","twitter","zio","zio-streams"],"created_at":"2024-10-31T20:11:47.045Z","updated_at":"2025-04-06T04:18:02.822Z","avatar_url":"https://github.com/makiftutuncu.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tweet Tracker\n\n## Table of Contents\n\n1. [Introduction](#introduction)\n2. [Configuration](#configuration)\n3. [Development and Testing](#development-and-testing)\n4. [Docker](#docker)\n5. [Notes](#notes)\n6. [Contributing](#contributing)\n7. [License](#license)\n\n## Introduction\n\nTweet Tracker is a standalone application for streaming tweets containing a search term on [Twitter](https://twitter.com) in real time for a predefined duration or number of tweets. It is built using [Scala 3.2](https://www.scala-lang.org), [ZIO](https://zio.dev) and [sttp](https://sttp.softwaremill.com/en/latest). It logs the tweets it's streaming as Json objects to standard output.\n\n## Configuration\n\nApplication can be configured via [application.conf](src/main/resources/application.conf). You can also override config values with following environment variables.\n\n| Variable Name | Data Type | Description                                                                                   | Required                                                |\n|---------------|-----------|-----------------------------------------------------------------------------------------------|---------------------------------------------------------|\n| TOKEN         | String    | [Twitter API v2](https://developer.twitter.com/en/docs/authentication/oauth-2-0) access token | Yes, otherwise defaults to `change-me` which won't work |\n| SEARCH_TERM   | String    | The term to search in tweets                                                                  | No, defaults to `crypto`                                |\n| FOR_SECONDS   | Int       | How long to stream tweets, in seconds                                                         | No, defaults to `30`                                    |\n| UP_TO_TWEETS  | Int       | Maximum number of tweets to stream                                                            | No, defaults to `100`                                   |\n\nFor log configuration, see [logback.xml](src/main/resources/logback.xml).\n\n## Development and Testing\n\nApplication is built with SBT. So, standard SBT tasks like `clean`, `compile` and `run` can be used. To run the application locally:\n\n```bash\nsbt run\n```\n\nExample to stream up to 50 tweets containing `bitcoin` for 5 seconds:\n\n```bash\nTOKEN=your-own-token SEARCH_TERM=bitcoin FOR_SECONDS=5 UP_TO_TWEETS=50 sbt run\n```\n\nTo run automated tests, you can use `test` and `testOnly` tasks of SBT. To run all tests:\n\n```bash\nsbt test\n```\n\nTo run specific test(s):\n\n```bash\nsbt 'testOnly fullyQualifiedTestClassName1 fullyQualifiedTestClassName2 ...'\n```\n\n## Docker\n\nYou may also run the application in a Docker container. Environment variables mentioned in [Configuration](#configuration) are passed to the container while building image so you don't have to pass them with `-e` while creating the container with `docker run`.\n\nTo build the Docker image:\n\n```bash\n\nFirst build an image locally with\n\n```bash\nsbt 'Docker / publishLocal'\n```\n\nThen start a container from generated Docker image with\n\n```bash\ndocker run --rm tweet-tracker\n```\n\n## Notes\n\n* The streaming only logs to standard out. They could be persisted for future use.\n* There is no statistics across multiple runs of the application, app runs for a single time, every time.\n\n## Contributing\n\nAll contributions are welcome. Please feel free to send a pull request. Thank you.\n\n## License\n\nTweet Tracker is licensed with [MIT License](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakiftutuncu%2Ftweet-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmakiftutuncu%2Ftweet-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmakiftutuncu%2Ftweet-tracker/lists"}