{"id":17501985,"url":"https://github.com/sawyerh/twitter-hacks","last_synced_at":"2026-05-18T19:02:53.197Z","repository":{"id":41846731,"uuid":"266447321","full_name":"sawyerh/twitter-hacks","owner":"sawyerh","description":"Twitter API integrations to make it more useful/enjoyable.","archived":false,"fork":false,"pushed_at":"2023-05-21T16:29:23.000Z","size":1010,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T19:25:19.872Z","etag":null,"topics":["firebase","serverless","twitter","typescript"],"latest_commit_sha":null,"homepage":"https://twitter.sawyer.soy","language":"TypeScript","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/sawyerh.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":"2020-05-24T01:14:25.000Z","updated_at":"2024-12-24T14:55:43.000Z","dependencies_parsed_at":"2024-12-08T10:52:05.387Z","dependency_job_id":null,"html_url":"https://github.com/sawyerh/twitter-hacks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sawyerh/twitter-hacks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sawyerh%2Ftwitter-hacks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sawyerh%2Ftwitter-hacks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sawyerh%2Ftwitter-hacks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sawyerh%2Ftwitter-hacks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sawyerh","download_url":"https://codeload.github.com/sawyerh/twitter-hacks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sawyerh%2Ftwitter-hacks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279011609,"owners_count":26084964,"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-10-12T02:00:06.719Z","response_time":53,"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":["firebase","serverless","twitter","typescript"],"created_at":"2024-10-19T20:34:40.286Z","updated_at":"2025-10-12T14:50:58.598Z","avatar_url":"https://github.com/sawyerh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Overview\n\n### Feed schedule\n\n- Firebase Function runs on a recurring schedule to fetch the latest tweets from accounts I follow\n- Firestore database stores the tweets\n- Firebase Hosting serves the Next.js frontend, which queries tweets using a Firebase Function as the API endpoint\n\n### Delete schedule\n\nFires daily and deletes your Tweets and Twitter likes that are older than 14 days, and disables retweets from everyone you follow.\n\n## Caveats\n\nThis is the first time I've used TypeScript and CSS-in-JS, so there's probably some things not best practice happening in here.\n\n## Tips\n\n### Run in dev mode\n\nFrom the root of the repo, run:\n\n```\nnpm run dev\n```\n\n### Watch for changes\n\nRun `build:watch` in a Terminal or through [VS Code's \"Build task\" runner](https://code.visualstudio.com/docs/typescript/typescript-compiling#_step-2-run-the-typescript-build)\n\n### Locally trigger a function\n\nFrom `functions/`, run:\n\n1. `npm run shell`\n1. Call the function name:\n\n   ```sh\n   pubsub.getTweets()\n   ```\n\n   ```sh\n   api.tweets.get('?lastId=123')\n   ```\n\n### View logs\n\nView detailed logs in [StackDriver](https://console.cloud.google.com/project/_/logs?service=cloudfunctions.googleapis.com\u0026advancedFilter=resource.type%3D%22cloud_function%22%0A)\n\nIn the StackDriver Logging UI, use the advanced filter field to narrow the log scope to the function you want to analyze, then click Submit Filter to filter the logs. For example, you could analyze only logs from a single function matching a custom event:\n\n```\nresource.type=\"cloud_function\"\nresource.labels.function_name=\"CustomMetrics\"\njsonPayload.event=\"my-event\"\n```\n\n[View or create dashboards](https://console.cloud.google.com/monitoring/dashboards)\n\n## Environment configuration\n\nSee the `set-env` script in `functions/package.json`\n\n### Required environment keys\n\n```js\n{\n  \"twitter\": {\n    \"access_token_key\": string,\n    \"access_token_secret\": string,\n    \"consumer_secret\": string,\n    \"consumer_key\": string\n    \"username\": string\n  }\n}\n```\n\n### Set Functions environment config\n\n```\nfirebase functions:config:set someservice.key=\"THE API KEY\" someservice.id=\"THE CLIENT ID\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsawyerh%2Ftwitter-hacks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsawyerh%2Ftwitter-hacks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsawyerh%2Ftwitter-hacks/lists"}