This web starter template is based on Spring, PostgreSQL, React, React router and Axios. Check the following links for documentation and guides:
Our development environment for a full-stack web application will consist of three main parts:
- Database (Postgres).
- Backend server (Spring).
- Frontend development server (React).
docker
and docker-compose
.
nodejs
.
In the root folder, run
Starting the backend server
Open the root folder and run
Starting the frontend development server
The frontend application is in the directory frontend
. From there, run
to install all the dependencies needed for the project.
Then start the frontend application by running
These are the endpoints for the posts API that should exist:
HTTP Method |
HTTP Path |
Action |
GET |
/users |
return loggedIn User. |
GET |
/users/{userName} |
return false if userName not found, True if userName found case sensitive |
POST |
/users |
Sets firstLogIn to true on User profile. |
PUT |
/users |
Update the given User, this route is used to add Avatar and Bio as well. |
DELETE |
/users |
Delete logged in user. |
HTTP Method |
HTTP Path |
Action |
GET |
/groups |
return all groups not created or joined by user. |
GET |
/groups/{groupId} |
return a group by given groupId |
POST |
/groups |
Create a new group. |
POST |
/groups/{groupId} |
Join a group. |
POST |
/groups/{groupId}/topics/{topicId} |
Join a topic. |
PUT |
/groups |
Update group tile, group description, group rules or group avatar only. |
DELETE |
/groups/{groupId} |
Delete a Group |
DELETE |
/groups/{groupId}/topics/{topicId} |
Remove topic from group. |
DELETE |
/groups/{groupId}/user |
Leave a group |
HTTP Method |
HTTP Path |
Action |
GET |
/posts |
return all posts. |
GET |
/posts/{postId} |
return a specific post based on the provided id. |
POST |
/posts/{groupId} |
create a new post on a given Group. |
PUT |
/posts/{postId} |
update the given post. |
DELETE |
/posts/{postId} |
delete the given post. |
HTTP Method |
HTTP Path |
Action |
GET |
/posts/{postId}/likes |
Get all likes on a given post |
POST |
/posts/{postId}/likes |
Create a like on a given post |
DELETE |
/posts/likes/{id} |
Delete a like on a given post |
HTTP Method |
HTTP Path |
Action |
GET |
/posts/{postId}/dislikes |
returns all dislikes on a post. |
POST |
/posts/{postId}/dislikes |
create a dislike on a given post |
DELETE |
/posts/dislikes/{Id} |
delete the given dislike. |
Comment Routes
HTTP Method |
HTTP Path |
Action |
GET |
/comments/{postId} |
return all comments for a specific post. |
POST |
/comments/{postId} |
create a new comment on the given post. |
PUT |
/comments/{commentId} |
update the given comment. |
DELETE |
/comments/{commentId} |
delete the given comment. |
Comment Like Routes
HTTP Method |
HTTP Path |
Action |
GET |
/comments/{commentId}/likes |
Get all likes on a given Comment |
POST |
/comments/{commentId}/likes |
Create a like on a given comment |
DELETE |
/comments/likes/{id} |
Delete a like on a given comment |
Comment Dislikes Routes
HTTP Method |
HTTP Path |
Action |
GET |
/comments/{commentId}/dislikes |
return all dislikes for a specific comment. |
POST |
/comments/{commentId}/dislikes |
create a dislike on the given comment. |
DELETE |
/comments//dislikes/{Id} |
delete the given dislike. |
HTTP Method |
HTTP Path |
Action |
GET |
/comments/{commentId}/likes |
Get all likes on a given comment |
POST |
/comments/{commentId}/likes |
Create a like on a given comment |
DELETE |
/comments/likes/{id} |
Delete a like on a given comment |