{"id":15649321,"url":"https://github.com/michael-simons/tweetarchive","last_synced_at":"2026-03-13T04:33:57.405Z","repository":{"id":59577263,"uuid":"67500737","full_name":"michael-simons/tweetarchive","owner":"michael-simons","description":"Hibernate Search and Spring Boot: Simple yet powerful archiving","archived":false,"fork":false,"pushed_at":"2017-04-19T20:12:07.000Z","size":93,"stargazers_count":39,"open_issues_count":0,"forks_count":8,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-10-13T02:09:22.656Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://info.michael-simons.eu/2016/09/06/hibernate-search-and-spring-boot-simple-yet-powerful-archiving/","language":"Java","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/michael-simons.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-2.0.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-06T11:10:50.000Z","updated_at":"2022-01-11T21:18:39.000Z","dependencies_parsed_at":"2022-09-19T13:42:14.949Z","dependency_job_id":null,"html_url":"https://github.com/michael-simons/tweetarchive","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/michael-simons/tweetarchive","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michael-simons%2Ftweetarchive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michael-simons%2Ftweetarchive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michael-simons%2Ftweetarchive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michael-simons%2Ftweetarchive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michael-simons","download_url":"https://codeload.github.com/michael-simons/tweetarchive/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michael-simons%2Ftweetarchive/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30458001,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T03:55:51.346Z","status":"ssl_error","status_checked_at":"2026-03-13T03:55:33.055Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2024-10-03T12:29:14.605Z","updated_at":"2026-03-13T04:33:57.367Z","avatar_url":"https://github.com/michael-simons.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tweet Archive\n\n## Searchable tweet archive, powered by Hibernate Search and Spring Boot\n\nThis is a personal tweet archive. Its purpose is to store your tweets, retweets, quoted tweets and favorites in a PostgreSQL database and provide a full text search with Hibernate Search.\n\nSo fare, the storage of your tweets and retweets is implemented as well as deleting tweets, if the application is configured to track your account.\n\nThere's a super simple \"interface\" to upload an archive generated by Twitter itself, but the search is only available as a REST endpoint. Be aware: No security has been implemented yet, don't run this publicly if you don't want to expose your Twitter history!\n\n## Read more\n\nThere's a lengthy blog post on why and how this application was written:\n\n[Hibernate Search and Spring Boot: Simple yet powerful archiving](http://info.michael-simons.eu/2016/09/06/hibernate-search-and-spring-boot-simple-yet-powerful-archiving/)\n\n## How to build and run\n\nTo build this project, you'll need a valid Java 1.8 installation and either a local PostgreSQL database running on localhost:5432 with a schema named `tweetArchive` and user `tweetArchive` with the same password or a Docker installation.\n\nTo run a PostgreSQL database instance inside a Docker container use\n\n```\ndocker run --name tweet-archive-db-dev -e POSTGRES_USER=tweetArchive -e POSTGRESS_PASSWORD=tweetArchive -p 5432:5432 -d postgres\n```\n\nThe database connection can be configured through the means of [Spring Boot](http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html).\n\n### Built the application\n\n```\n./mvnw clean verify\n```\n\n### Register an application with Twitter and generate access tokens (optional)\n\n*Note:* This is an optional step. If you just want to upload an existing Twitter archive, skip it. If you want the _tweet-archive_ to track your new tweets and deletions, follow the instructions.\n\nLogin to Twitter and open [https://apps.twitter.com](https://apps.twitter.com) and hit \"Create new app\". This will be your tweet archive. Give a reasonable name. You won't need a callback URL. The program won't need write permissions, I'd remove them. Then, goto \"Keys and Access Tokens\" and note the consumer key and secret. Take this values and run\n\n```\njava -jar target/tweetarchive-0.0.1-SNAPSHOT.jar --generate-tokens consumer_key,consumer_secret\n```\n\nFollow the instructions. You'll need to open an URL like _https://api.twitter.com/oauth/authorize?oauth_token=someToken_. Do this and copy the PIN you'll get into the shell.\n\nThis will generate a properties file containing your apps consumer token and secret as well as an access token and secret for your account.\n\n### Run directly\n\nRight now, you can start the application with\n\n```\njava -jar target/tweetarchive-0.0.1-SNAPSHOT.jar\n```\n\nif you have a local PostgresSQL database ready.\n\n### Or build a Docker image\n\nIf you plan to run this permanently, install [Docker](https://www.docker.com) for your platform and run:\n\n```\n./mvnw clean verify docker:build\n```\n\nThis will create one Docker image based on the official Java image, containing this application and a link to a Docker container running PostgreSQL. \n\n### Run the Docker image\n\nAfter the above step, run\n\n```\n./mvnw docker:start\n```\n\nIt will start a PostgresSQL container and this apps container. The database files will be stored inside `./var/db/prod` and the Lucene search index at `./var/index/prod` so that those data won't vanish if you stop and restart the container.\n\n\n## Use the application\n\nI assume that you used the Docker method. If you configured your credentials, than the application will track your new tweets.\n\n### Upload a Twitter archive\n\nOpen [http://localhost:8980/upload](http://localhost:8980/upload) and upload the file you received from Twitter. That take a while depending on the size, but you'll get a notice eventually.\n\n### Search your tweets\n\nThose are only examples. \n\nAll tweets containing the keyword _Java_\n\n```\ncurl -X \"GET\" \"http://localhost:8980/search?q=java\"\n```\n\nAll tweets containing the keyword _JavaOne_ autumn 2015\n\n```\ncurl -X \"GET\" \"http://localhost:8980/search?q=JavaOne\u0026from=2015-10-15\u0026to=2015-10-31\"\n```\n\n\nAll tweets that I send to [Vlad](https://twitter.com/vlad_mihalcea):\n\n```\ncurl -X \"GET\" \"http://127.0.0.1:8980/extendedSearch?q=reply.to:vlad_mihalcea\"\n```\n\nThe \"extendedSearch\" endpoint supports all Lucene queries and escapes. All books I read 2015:\n\n```\ncurl -X \"GET\" \"http://127.0.0.1:8980/extendedSearch?q=%22Gelesen%20%2F%20Read:%22%20AND%20year:2015\"\n```\n\nAll tweets I sent from my iPhone:\n\n```\ncurl -X \"GET\" \"http://127.0.0.1:8980/extendedSearch?q=source:%22Twitter%20for%20iPhone%22\"\n```\n\nAs you can see, you can do a lot with a simple archive application.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichael-simons%2Ftweetarchive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichael-simons%2Ftweetarchive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichael-simons%2Ftweetarchive/lists"}