A vibrant online community where users can engage in discussions, share content, and discover a world of diverse perspectives. Built with Angular for a sleek and dynamic front-end experience, paired with the robust Spring Boot framework and MySQL backend, Our platform offers a seamless and responsive environment for users to connect.
Angular Client repo: https://github.com/ahmedrafat-SW/reddit-ui
Registers a new user.
- Request Body:
RegisterRequest
- Response:
200 OK
with message "User Registration Successful"
Verifies user account with the given token.
- Path Variable:
token
(String) - Response:
200 OK
with message "Account is Activated Successfully."
Authenticates a user and returns a JWT.
- Request Body:
LoginRequest
- Response:
200 OK
withAuthenticationResponse
Generates a new JWT using a refresh token.
- Request Body:
RefreshTokenRequest
- Response:
201 Created
withAuthenticationResponse
Logs out the user and deletes the refresh token.
- Request Body:
RefreshTokenRequest
- Response:
200 OK
with message "Refresh Token Successfully deleted."
Creates a new comment.
- Request Body:
CommentDto
- Response:
201 Created
withCommentDto
Gets comments by post ID.
- Path Variable:
id
(long) - Response:
200 OK
with list ofCommentDto
Gets comments by username.
- Path Variable:
name
(String) - Response:
200 OK
with list ofCommentDto
Creates a new post.
- Request Body:
PostRequest
- Response:
201 Created
withPostResponse
Gets all posts.
- Response:
200 OK
with list ofPostResponse
Gets a post by ID.
- Path Variable:
id
(int) - Response:
200 OK
withPostResponse
Gets posts by subreddit ID.
- Path Variable:
id
(int) - Response:
200 OK
with list ofPostResponse
Gets posts by username.
- Path Variable:
name
(String) - Response:
200 OK
with list ofPostResponse
Creates a new subreddit.
- Request Body:
SubredditDto
- Response:
201 Created
withSubredditDto
Gets a subreddit by ID.
- Path Variable:
id
(int) - Response:
200 OK
withSubredditDto
404 Not Found
with message "Can't find this subreddit"
Gets all subreddits.
- Response:
200 OK
with list ofSubredditDto
Creates a vote.
- Request Body:
VoteDto
- Response:
201 Created