Backend for Friend Tutor
This is the backend server for the Friend Tutor project, built under the Google Developer Student Club - GIST. It provides real-time functionalities based on REST API for user registration, login, and browsing of posts. The architecture is running Spring and MySQL simultaneously on a single VM instance in GCP.
- Authentication : Supports user registration and login using JWT, and most of the APIs require authentication, so an access token should be attached to the Authorization header.
- Posts : Users can upload and browse lectures, as well as view the most recent or most recommended lectures. In addition, the system provides the functionality to like or unlike a lecture post.
- Certification : Dedicated mentors who have actively participated can receive a certificate that includes their activity period, the number of uploaded posts, the total number of recommendations received, and their certification rank.
- API docs : Provides API documentation using Swagger. However, it is recommended to use browser-based translation as the documentation is written in Korean.
In the 2023 GDSC Solution Challenge, GCP credit and a free domain were provided, so the project is being deployed using HTTPS. Spring and MySQL are running on a single GCP VM instance.
- Backend domain : https://www.gdsc-gist-lms.page
- API docs : https://www.gdsc-gist-lms.page/apidocs
The frontend is deployed on Netlify and is receiving the API using the above domain.
- Frontend domain : https://friends-tutor.netlify.app
This project currently supports HTTPS and is being deployed, so its features can be easily accessed through the above domain. Therefore, here we will introduce the method of setting up a backend environment that is the same as our development environment locally and running the code so that APIs can be accessed at http://localhost:8080.
- Port 8080 must be available.
- Docker must be running.
To facilitate easy backend environment setup, we provide Docker. Normally, the database and server should be executed in separate containers, but for simplicity, an image is provided that can run both MySQL and Spring in the same container.
By running the following commands in the terminal, you can start the server, and receive responses via http://localhost:8080.
docker pull mtkim/gdsc_friends_tutor:1.0.0
docker run -it --name friends_tutor_BE -p 8080:8080 mtkim/gdsc_friends_tutor:1.0.0
If Docker is not available, you can set up the backend environment directly by following the requirements below.
- JDK 17
- MySQL 8.0.32
You can run MySQL and Spring server by following these steps:
- Clone the source code of the
demo
branch. - Create a new database named
lms
. - Navigate to the project directory and update the MySQL username and password in the
application-demo.properties
file. And grant privilege access to the user for thelms
DB. - Run MySQL in background.
- Build the project using the Gradle build command.
- Run the application using the command
java -jar <jar-file-name>.jar
.
Now you should be able to supply APIs locally for the demo version of the Friend Tutor project instead of the deploy version (HTTPS).
If there are any issues with the setup, please feel free to contact kimtks456@naver.com
for assistance.