A twitter clone implementation rest api, if not working with docker and compose please fill in your db details within application.properties
To test/run the code in a development environment, you will need (some are optional):
Git, Docker, Spring Boot, Java 11, PostgreSQL,
If it is just to run the application:
Git, Docker, Docker Compose ,
git clone https://github.com/3barney/Twitter-Clone.git
cd twitter_clone_rest_api/
- Generate the project image (API + PostgreSQL) with Docker Compose, in the same directory as the docker-compose.yml file
docker-compose up
Base URL: http://localhost:8080/v1/
DOC: http://localhost:8080/v1/swagger-ui.html/
To use, you must have an account or create an account first. And then, log in, taking the token and sending the other endpoints to be able to use them.
Free endpoints to use, without having to send a token:
- Create account: /api/auth/signup
- Auth: /api/auth/signIn
Mandatory header example:
{key: Authorization, value: Bearer flkjkds.......}
The following endpoints were implemented.
1. Signup [POST] http://localhost:8080/v1/api/auth/signup
{
"email": "string",
"name": "string",
"password": "string",
"username": "string"
}
2. Signin [POST] http://localhost:8080/v1/api/auth/signin
{
"password": "string",
"usernameOrEmail": "string"
}
1. Get Tweets [GET] http://localhost:8080/v1/api/tweet
{
"password": "string",
"usernameOrEmail": "string"
}
2. POST Tweets [GET] http://localhost:8080/v1/api/tweet
{
"content": "string"
}
3. Search Tweets [GET] http://localhost:8080/v1/api/tweet/{search}
{
"search": "string"
}
4. Retweet [POST] http://localhost:8080/v1/api/tweet/{tweetId}/retweet
5. FOLLOW USER [PUT] http://localhost:8080/v1/api/user/{userId}/follow
6. Get User details and tweets
[GET] http://localhost:8080/v1/api/user/{userName}
- Not factored in yet
The following tools were use in the construction of the project: