A spring boot application to stream live tweets from Twitter Stream APIs. User interface allows user to Add rules based on Follower/Track and Reset the App without restart.
- User can view live feeds in - Live Tab
- User can view historical tweets in - History Tab
- H2 - Open-Source Embedded Relational Database Engine
- Angular - Angular is a platform for building mobile and desktop web applications.
- Angular Material - UI component infrastructure and Material Design components for mobile and desktop Angular web applications.
- JDK - Java™ Platform, Standard Edition Development Kit
- Spring Boot - Framework to ease the bootstrapping and development of new Spring Applications
- Maven - Dependency Management
- Lombok - Lombok is used to reduce boilerplate code for model/data objects.
- git - Free and Open-Source distributed version control system
- Postman - API Development Environment (Testing Documentation)
- Travis CI - A hosted continuous integration service used to build and test software projects hosted at GitHub.
- Codecov - A hosted tool that is used to measure the test coverage of your codebase.
- Download the zip or clone the Git repository.
- Unzip the zip file (if you downloaded one)
- Move the root directory and run below command to run tests.
mvn test
- Download the zip or clone the Git repository.
- Unzip the zip file (if you downloaded one)
- Replace the Twitter API Key in
application.properties
filetwitter.config.token=<your API key>
- Build the project using below command
mvn clean install
- Use the Spring Boot Maven plugin like so:
mvn spring-boot:run
{
"id": 42,
"data": "{\"data\":{\"created_at\":\"2020-10-01T06:07:43.000Z\",\"author_id\":\"806204521919762432\",\"id\":\"1311548328186834945\",\"text\":\"RT @ashoswai: No end to Upper caste terror! Another Dalit woman has been gang-raped and killed in UP under Modi-Yogi's Raj! https://t.co/6a…\"},\"includes\":{\"users\":[{\"id\":\"806204521919762432\",\"name\":\"rabia\",\"username\":\"rabiiik527\"}]},\"matching_rules\":[{\"id\":1311547334208053248,\"tag\":\"\"}]}"
}
- Generate Java Documentation in
tweet-streamer\target\site\apidocs
using the Maven command
mvn javadoc:javadoc
- Postman collection for APIs included in
/docs
folder - Importing Collection to Postman
│ .gitignore
│ .travis.yml
│ mvnw
│ mvnw.cmd
│ pom.xml
│ README.md
│ tweet-streamer.iml
│
├───.mvn
│ └───wrapper
│ maven-wrapper.jar
│ maven-wrapper.properties
│ MavenWrapperDownloader.java
│
├───src
│ ├───main
│ │ ├───java
│ │ │ └───com
│ │ │ └───demo
│ │ │ │ TweetStreamer.java
│ │ │ │
│ │ │ ├───config
│ │ │ │ AsyncConfiguration.java
│ │ │ │ Config.java
│ │ │ │
│ │ │ ├───controller
│ │ │ │ TweetController.java
│ │ │ │
│ │ │ ├───dto
│ │ │ │ Datum.java
│ │ │ │ RuleAddRequest.java
│ │ │ │ RuleDeleteRequest.java
│ │ │ │ RuleObject.java
│ │ │ │
│ │ │ ├───entity
│ │ │ │ │ TweetEntity.java
│ │ │ │ │ TweetView.java
│ │ │ │ │
│ │ │ │ └───repo
│ │ │ │ TweetRepo.java
│ │ │ │
│ │ │ └───service
│ │ │ ITweetService.java
│ │ │ TweetService.java
│ │ │
│ │ └───resources
│ │ │ application.properties
│ │ │
│ │ └───static
│ │ 3rdpartylicenses.txt
│ │ favicon.ico
│ │ index.html
│ │ main.99369130811ab3e1a6fa.js
│ │ polyfills.35a5ca1855eb057f016a.js
│ │ runtime.acf0dec4155e77772545.js
│ │ styles.7a56496004aef477cd49.css
│ │
│ └───test
│ └───java
│ └───com
│ └───demo
│ │ TweetStreamerTest.java
│ │
│ ├───controller
│ │ TweetControllerTest.java
│ │
│ ├───dto
│ │ DatumTest.java
│ │ RuleDeleteRequestTest.java
│ │
│ ├───entity
│ │ TweetEntityTest.java
│ │
│ └───service
│ TweetServiceTest.java
Twitter Stream API - Twitter Documentation