You can visit demo website: myrealog.com
This is a Spring Boot based API Server for managing Blog Contents including User Authentication, Article, Comments(=discussions), Reaction to Articles and Comments etc.
- Period: 2023.12 ~ (In progress)
- Scope: To build a robust and secure service for managing blog contents and to provide place where you can create meaningful blog contents.
- Technology Stack
- Backend: Java 17, Spring Boot 3, MySQL 8 Repository Link - here
- Frontend: TypeScript, Next.js 14, shadcn/ui Repository Link
- Infra: AWS Cloud(EC2, RDS), Vercel
The Key Features followed by:
- User Authentication with JWT and OAuth2 without Spring Security.
- Basic CRUD with Articles, Discussions entities (In progress)
- Further features will be included in the future.
- Request (always be HTTP POST) from Browser send to Next Server deployed in Vercel.
- Next Server analyzes it and makes request based on the request from browser to external API server which is Spring Application
- Spring Application handles and can query Database to retrieve data from MySQL Server installed in RDS.
- Spring Application then make response and return it to Next Server.
- Next Server handles response data and renders the page at the specific URL route.
- Rendered page and data returned to Browser.
- Click here to see a magnified image.
- ERD can be modified at any moment while it's being developed.
- Lastly Updated at 2023.01.22
- Authentication required: ✔
- Authentication not required: ✘
Method | End Point | Description | Auth | Details |
---|---|---|---|---|
GET | /api/v1/signin/oauth/google |
Redirect to OAuth Provider | ✘ | |
GET | /api/v1/signin/callback/google |
Sign in | ✘ |
Method | End Point | Description | Auth |
---|---|---|---|
POST | /api/v1/users |
Register User | ✔ |
GET | /api/v1/users/me |
Get user with profile | ✔ |
DELETE | /api/v1/users/{userId} |
Delete a user by {userId} | ✔ |
PATCH | /api/v1/users/{userId}/profile/{profileId} |
Update profile elements by {Ids} | ✔ |
Method | End Point | Description | Auth |
---|---|---|---|
POST | /api/v1/articles/draft |
Create a draft or return the existing one | ✔ |
GET | /api/v1/articles/{username}/{slug} |
Get an existing article by username and slug | |
GET | /api/v1/articles/users/{userId} |
Get All recent articles by {userId} | |
GET | /api/v1/articles/recent |
Get All recent articles | |
PATCH | /api/v1/articles/{articleId} |
Update an article by {articleId} | ✔ |
PATCH | /api/v1/articles/{articleId}/publish |
Make a draft publish by {articleId} | ✔ |
DELETE | /api/v1/articles/{articleId} |
Delete an article by {articleId} | ✔ |
Method | End Point | Description | Auth | Details |
---|---|---|---|---|
POST | /api/v1/articles/{articleId}/discussions/new |
Create new discussion in the article | ✔ | |
GET | /api/v1/articles/{articleId}/discussions |
Get All article related discussions | ||
PATCH | /api/v1/discussions/{discussionId} |
Update given {discussionId} discussion | ✔ | |
DELETE | /api/v1/discussions/{discussionId} |
Delete given {discussionId} discussion | ✔ |
Method | End Point | Description | Auth | Details |
---|---|---|---|---|
POST | /api/v1/categories/new |
Create new category | ||
GET | /api/v1/categories |
Get All categories | ||
PATCH | /api/v1/categories/{id} |
Update given {id} category | ||
DELETE | /api/v1/cateogries/{id} |
Delete given {id} category |
{
"code": 200,
"httpStatus": "OK",
"message": "message example",
"data": "object",
"success": true
}
- Api response will be wrapped by ApiResponse object
{
"code": 200,
"httpStatus": "OK",
"success": true,
"message": "",
"data": {
"id": 1,
"username": "Gukin-Han",
"email": "gukin.dev@gmail.com",
"password": null,
"recentlyPublishedDate": null,
"profile": {
"id": 1,
"displayName": "Gukin-Han",
"avatarUrl": "",
"bio": "Gukin-Han"
}
}
}
2xx
- 200 Ok: Successfully processed
- 203 Created: Successfully created
4xx
- 400 Bad Request: Successfully authenticated but not be able to find user info
- 401 Unauthorized: Authentication fail