Spring Boot backend for the P-Project application.
- Java 17
- Spring Boot 3.5.6
- Spring Web, Spring Data JPA
- Spring Security + OAuth2 Client
- MariaDB
- JWT (jjwt)
- Springdoc OpenAPI
src/main/java/com/p_projectadminAdmin dashboards and statisticsAIAI gateway client and DTOsbookBook report flowcalendarCalendar summaries and daily writing listconfigSpring config (Security, CORS, Swagger, RestTemplate, file)customUserUserDetails integrationdiaryDiary statsemailEmail verificationfriendFriend requests and access controlhomeHome summaryjwtJWT filter and utilitiesmessageWriting session messagesmypageProfile + account updatesoauth2OAuth2 success handlingprofileProfile image storagesociaLoginOAuth2 provider mappinguserUser registration/loginwritingWriting session flow
src/main/resourcesapplication.propertiesapplication-oauth.propertieslogback-spring.xml
- Auth
- Local login:
POST /api/users/login - OAuth2 login:
/oauth2/authorization/{provider}(Google/Naver/Kakao) - JWT filter validates
Authorization: Bearer <token>and optionally refreshes viaX-Refresh-Token
- Local login:
- Writing
- Start -> Answer -> Finalize -> Title/Feedback
- AI server is called via
AiService(defaulthttp://127.0.0.1:61299)
- Calendar
- Monthly summary and daily writing list
- Friends
- Requests, accept, and friend calendar access
- MyPage
- Profile image upload and account updates
Set the following environment variables before running:
MARIA_DB_URLMARIA_DB_IDMARIA_DB_PWDGOOGLE_SMTPUPLOAD_DIRBASE_URL- OAuth2 provider variables in
application-oauth.properties:GOOGLE_CLIENT_ID,GOOGLE_CLIENT_SECRET,GOOGLE_REDIRECT_URINAVER_CLIENT_ID,NAVER_CLIENT_SECRET,NAVER_REDIRECT_URIKAKAO_CLIENT_ID,KAKAO_CLIENT_SECRET,KAKAO_REDIRECT_URI
./gradlew bootRun- Swagger UI:
/swagger-ui.html - OpenAPI:
/api-docs
- Database schema uses
users,writing_sessions,messages,friends,profile,social_identities. - File uploads are stored under
file.upload-dirand exposed viafile.base-url.