This project is a Twitter-like backend application built using Spring Boot and Maven. It provides RESTful APIs to perform various Twitter-like functionalities such as posting tweets, following/unfollowing users, and fetching timelines.
- Java (version : JDK 22)
- Spring Boot (version 3.3.0)
- Dependencies
- Spring Web
- Spring Security
- Spring Data Jpa
- MySQL Driver
- Lombok
- MySQL
JAVA : To Install Java in Windows, Go to The Official JAVA Website by Click Here and download the latest java Package (used : JDK22). If you Don't Know the Complete Installation Process, then Watch this Youtube Video.
To Install MySql in Windows, Visit The The Official MySQL site by Click Here and Choose the Latest Supported version (used : V8.0.36) click the MSI installer and Download it. the follow the steps By Watching This Youtube Video.
- Creating Accounts
- Deleting Accounts
- Following Users
- Followers
- Posts
- Tweets
- Likes
- comments
- Authentication and Authorization
CREATE TABLE users_table (
id bigint NOT NULL AUTO_INCREMENT,
user_id varchar(50) NOT NULL UNIQUE,
user_name varchar(50) NOT NULL,
user_dob date DEFAULT NULL,
user_email varchar(50) NOT NULL,
user_passwd varchar(100) NOT NULL,
time_stamp varchar(255) DEFAULT NULL,
user_pic varchar(255) DEFAULT NULL,
banner_pic varchar(255) DEFAULT NULL,
followers bigint DEFAULT NULL,
following bigint DEFAULT NULL,
PRIMARY KEY (id)
);
CREATE TABLE tweets_table (
tweet_id bigint NOT NULL AUTO_INCREMENT,
user_id varchar(255) DEFAULT NULL,
hashtags varchar(255) DEFAULT NULL,
time_stamp varchar(255) DEFAULT NULL,
tweet_content varchar(255) DEFAULT NULL,
likes_count bigint DEFAULT NULL,
PRIMARY KEY (tweet_id)
);
CREATE TABLE comments_table (
id bigint NOT NULL AUTO_INCREMENT,
comment_content varchar(255) DEFAULT NULL,
time_stamp varchar(255) DEFAULT NULL,
tweet_id bigint DEFAULT NULL,
user_id varchar(255) DEFAULT NULL,
PRIMARY KEY (id)
);
CREATE TABLE likes_table (
id bigint NOT NULL AUTO_INCREMENT,
liked_by varchar(255) DEFAULT NULL,
tweet_id bigint DEFAULT NULL,
time_stamp varchar(255) DEFAULT NULL,
PRIMARY KEY (id)
);
CREATE TABLE followers_table (
id bigint NOT NULL AUTO_INCREMENT,
followed_by varchar(255) DEFAULT NULL,
time_stamp varchar(255) DEFAULT NULL,
user_id varchar(255) DEFAULT NULL,
PRIMARY KEY (id)
);
CREATE TABLE following_table (
id bigint NOT NULL AUTO_INCREMENT,
following varchar(255) DEFAULT NULL,
time_stamp varchar(255) DEFAULT NULL,
user_id varchar(255) DEFAULT NULL,
PRIMARY KEY (id)
);
CREATE TABLE media_table (
id bigint NOT NULL AUTO_INCREMENT,
file_name varchar(255) DEFAULT NULL,
file_path varchar(255) DEFAULT NULL,
file_type varchar(255) DEFAULT NULL,
time_stamp varchar(255) DEFAULT NULL,
PRIMARY KEY (id)
);
POST - localhost:8080/register
- REGISTER USER
GET - localhost:8080/{userId}
- GET USER DETAILS
DELETE - localhost:8080/{userId}
- DELETE USER
PUT - localhost:8080/{userId}/follow
- FOLLOW USER
PUT - localhost:8080/{userId}/unfollow
- UNFOLLOW USER
GET - localhost:8080/home
- FEED POSTS
POST - localhost:8080/home
- POST TWEET
DELETE - localhost:8080/home/{tweetId}
- DELETE TWEET
PUT - localhost:8080/home/{tweetId}/comment
- POST COMMENT
DELETE - llocalhost:8080/home/{tweetId}/comment
- DELETE COMMENT
PUT - localhost:8080/home/{tweetId}/like
- LIKE POST
PUT - localhost:8080/home/{tweetId}/dislike
- DISLIKE POST