{"id":19930679,"url":"https://github.com/jongdeug/blog-backend","last_synced_at":"2026-04-04T21:32:27.536Z","repository":{"id":242827345,"uuid":"810217340","full_name":"JongDeug/blog-backend","owner":"JongDeug","description":"개인 프로젝트: 블로그 백엔드","archived":false,"fork":false,"pushed_at":"2025-09-20T04:01:36.000Z","size":4392,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-03T14:38:51.450Z","etag":null,"topics":["backend","cache","docker","docker-compose","express","github-actions","mysql","nestjs","prisma","redis","typescript"],"latest_commit_sha":null,"homepage":"https://jongdeug.ddns.net/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JongDeug.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-04T09:17:53.000Z","updated_at":"2025-08-15T11:25:26.000Z","dependencies_parsed_at":"2024-06-20T02:43:55.914Z","dependency_job_id":"9c12cbc2-2af4-4b00-a17f-d82b886ffa51","html_url":"https://github.com/JongDeug/blog-backend","commit_stats":null,"previous_names":["jongdeug/board-backend"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/JongDeug/blog-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JongDeug%2Fblog-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JongDeug%2Fblog-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JongDeug%2Fblog-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JongDeug%2Fblog-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JongDeug","download_url":"https://codeload.github.com/JongDeug/blog-backend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JongDeug%2Fblog-backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31415110,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend","cache","docker","docker-compose","express","github-actions","mysql","nestjs","prisma","redis","typescript"],"created_at":"2024-11-12T23:04:54.910Z","updated_at":"2026-04-04T21:32:27.502Z","avatar_url":"https://github.com/JongDeug.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌐 blog-backend\n\n## 📌 1. 프로젝트 소개\n\n![image](https://github.com/user-attachments/assets/2d278c6c-a1de-458d-8720-3268146c5c02)\n\n#### 프로젝트 주제 선정 배경\n\n학부 시절 여러 팀 프로젝트를 진행했지만, 실질적으로 운영 및 유지 보수한 경험은 없었습니다.\n\n다양한 아이디어를 고민한 끝에, 기능을 자유롭게 확장하고 수정하며 **지속적으로 개선할 수 있는 블로그 서비스를 개발**하는 것이 적절하다고 판단했습니다.\n\n#### 개발 주요사항\n\n- **사용자 인증:** JWT, Google OAuth 2.0, RBAC(Role-Based Access Control)\n- **CRUD 기능 구현:** 블로그 서비스 관련 API 개발 및 이미지 업로드 기능 추가\n- **테스트 코드 작성:** Unit, Integration, E2E 테스트 코드 작성\n- **프론트엔드 개발:** 서버 연동 및 SEO 최적화 적용\n- **라즈베리파이 웹 서버 설정**\n\n#### 프로젝트 관련 링크\n\n- [프로젝트 배포 링크](https://jongdeug.ddns.net)\n- [⭐Trouble Shooting 기록⭐](https://github.com/users/JongDeug/projects/9/views/3)\n- [기능 개발 기록](https://github.com/users/JongDeug/projects/9/views/1)\n- [Swagger 배포 주소](https://jongdeug.ddns.net/api/nest/docs)\n- [프론트엔드 깃허브](https://github.com/JongDeug/blog-frontend)\n\n## 📌 2. 기술 스택\n\n![image](https://github.com/user-attachments/assets/e588c142-8ded-483d-a395-e04dcddf56a6)\n\n![image](https://github.com/user-attachments/assets/5599965c-46e6-4c47-a369-9db4fb53830b)\n\n## 📌 3. 아키텍처\n\n#### 전체적인 서비스 구조\n\n![image](https://github.com/user-attachments/assets/231a7d3b-c3fa-434e-8679-b2a7520ef191)\n\n**애플리케이션 캐시 vs 분산 캐시**\n\n단일 인스턴스로만 서비스를 진행하는 상황이므로 분산 캐시를 두는 것은 불필요하다고 판단해 애플리케이션 캐시를 이용했습니다.\n\n\n\n\n## 📌 4. API 명세서\n\n| 구분             | 기능명                        | HTTP Method | REST API                                   | JWT | ROLE(하위 범주) |\n| ---------------- | ----------------------------- | ----------- | ------------------------------------------ | --- | --------------- |\n| 1. 회원 관리     | 1.1 이메일 가입               | POST        | /auth/register                             | X   | ALL             |\n|                  | 1.2 로그인                    | POST        | /auth/login                                | X   | ALL             |\n|                  | 1.3 구글 OAuth 2.0 로그인     | GET         | /auth/to-google                            | X   | ALL             |\n|                  | 1.4 구글 OAuth 2.0 리다이렉트 | GET         | /auth/google                               | X   | ALL             |\n|                  | 1.5 로그아웃                  | GET         | /auth/logout                               | O   | USER            |\n|                  | 1.6 로그인 갱신               | GET         | /auth/token/refresh                        | O   | USER            |\n|                  | 1.7 토큰 무효화               | GET         | /auth/token/revoke/:id                     | O   | ADMIN           |\n|                  | 1.8 유저 목록 조회            | GET         | /user                                      | O   | ADMIN           |\n|                  | 1.9 유저 상세 조회            | GET         | /user/:id                                  | O   | ADMIN           |\n|                  | 1.10 유저 삭제                | DELETE      | /user/:id                                  | O   | ADMIN           |\n| 2. 게시글 관리   | 2.1 게시글 목록 조회          | GET         | /post?search=\u0026take=\u0026draft=\u0026cursor=\u0026order[] | X   | ALL             |\n|                  | 2.2 게시글 상세 조회          | GET         | /post/:id                                  | X   | ALL             |\n|                  | 2.3 게시글 등록               | POST        | /post                                      | O   | ADMIN           |\n|                  | 2.4 게시글 수정               | PATCH       | /post/:id                                  | O   | ADMIN           |\n|                  | 2.5 게시글 삭제               | DELETE      | /post/:id                                  | O   | ADMIN           |\n|                  | 2.6 게시글 좋아요             | POST        | /post/like/:id                             | X   | ALL             |\n|                  | 2.7 이미지 업로드             | POST        | /common/image                              | O   | ADMIN           |\n| 3. 댓글 관리     | 3.1 댓글 작성(회원)           | POST        | /post/comment/user                         | O   | USER            |\n|                  | 3.2 댓글 수정(회원)           | PATCH       | /post/comment/user/:id                     | O   | USER            |\n|                  | 3.3 댓글 삭제(회원)           | DELETE      | /post/comment/user/:id                     | O   | USER            |\n|                  | 3.4 댓글 작성(비회원)         | POST        | /post/comment/guest                        | X   | ALL             |\n|                  | 3.5 댓글 수정(비회원)         | PATCH       | /post/comment/guest/:id                    | X   | ALL             |\n|                  | 3.6 댓글 삭제(비회원)         | DELETE      | /post/comment/guest/:id                    | X   | ALL             |\n| 4. 태그 관리     | 4.1 태그 목록 조회            | GET         | /tag                                       | X   | ALL             |\n|                  | 4.2 태그 상세 조회            | GET         | /tag/:id                                   | X   | ALL             |\n|                  | 4.3 태그 생성                 | POST        | /tag                                       | O   | ADMIN           |\n|                  | 4.4 태그 수정                 | PATCH       | /tag/:id                                   | O   | ADMIN           |\n|                  | 4.5 태그 삭제                 | DELETE      | /tag/:id                                   | O   | ADMIN           |\n| 5. 카테고리 관리 | 5.1 카테고리 목록 조회        | GET         | /category                                  | X   | ALL             |\n|                  | 5.2 카테고리 상세 조회        | GET         | /category/:id                              | X   | ALL             |\n|                  | 5.3 카테고리 생성             | POST        | /category                                  | O   | ADMIN           |\n|                  | 5.4 카테고리 수정             | PATCH       | /category/:id                              | O   | ADMIN           |\n|                  | 5.5 카테고리 삭제             | DELETE      | /category/:id                              | O   | ADMIN           |\n\n## 📌 6. ERD 설계\n\n```mermaid\nerDiagram\n\"GuestComment\" {\n  Int id PK\n  String nickName\n  String email\n  String password\n  String guestId FK\n}\n\"Guest\" {\n  Int id PK\n  String guestId UK\n}\n\"Category\" {\n  Int id PK\n  String name UK\n  DateTime createdAt\n  DateTime updatedAt\n}\n\"Comment\" {\n  Int id PK\n  String content\n  DateTime createdAt\n  DateTime updatedAt\n  Int parentCommentId FK \"nullable\"\n  Int postId FK\n  Int authorId FK \"nullable\"\n  Int guestId FK \"nullable\"\n}\n\"Image\" {\n  Int id PK\n  String url\n  Int postId FK\n}\n\"PostLike\" {\n  Int postId FK\n  String guestId FK\n  DateTime createdAt\n}\n\"Post\" {\n  Int id PK\n  String title UK\n  String content\n  DateTime createdAt\n  DateTime updatedAt\n  Int prevId \"nullable\"\n  Int nextId \"nullable\"\n  Boolean draft\n  String summary\n  Int views\n  Int likes\n  Int authorId FK\n  Int categoryId FK\n}\n\"Tag\" {\n  Int id PK\n  String name UK\n}\n\"User\" {\n  Int id PK\n  String name\n  String email UK\n  String password \"nullable\"\n  Role role\n  DateTime createdAt\n  String providerId UK \"nullable\"\n}\n\"_PostToTag\" {\n  String A FK\n  String B FK\n}\n\"GuestComment\" }o--|| \"Guest\" : guest\n\"Comment\" }o--o| \"Comment\" : parentComment\n\"Comment\" }o--|| \"Post\" : post\n\"Comment\" }o--o| \"User\" : author\n\"Comment\" |o--o| \"GuestComment\" : guest\n\"Image\" }o--|| \"Post\" : post\n\"PostLike\" }o--|| \"Post\" : post\n\"PostLike\" }o--|| \"Guest\" : guest\n\"Post\" }o--|| \"User\" : author\n\"Post\" }o--|| \"Category\" : category\n\"_PostToTag\" }o--|| \"Post\" : Post\n\"_PostToTag\" }o--|| \"Tag\" : Tag\n```\n\n## 📌 7. UI\n#### 메인 화면\n![메인](https://github.com/user-attachments/assets/90e51c54-c23a-45a3-8c8a-33b26ffd7369)\n\n#### 블로그 화면\n![블로그](https://github.com/user-attachments/assets/8359b9bf-583d-4eab-b471-742a3a72a4ef)\n\n#### rss 구독 화면\n![rss 구독](https://github.com/user-attachments/assets/42caad44-c623-4c10-bb5f-03717ba69fe2)\n\n#### 로그인 화면\n![로그인](https://github.com/user-attachments/assets/92f4332c-f5cd-4552-b35b-2674a118458c)\n\n#### 검색 화면\n![검색](https://github.com/user-attachments/assets/2d85241f-1c46-41f6-9d9a-66da6f0b1064)\n\n#### 카테고리 관리 화면\n![카테고리 관리](https://github.com/user-attachments/assets/121dfa70-6c16-410c-88e3-572ff994cf13)\n\n#### 게시글 상세 화면\n![게시글 상세](https://github.com/user-attachments/assets/3de2418e-1fd4-4fa2-b051-ec684d8dc03e)\n\n#### 게시글 작성 화면\n![게시글 작성](https://github.com/user-attachments/assets/eb132f62-6a9f-4a44-b7d3-45a599f21c67)\n\n#### 게시글 수정 화면\n![게시글 수정](https://github.com/user-attachments/assets/f5a546ad-a0ec-4c85-a46c-45edea777d2e)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjongdeug%2Fblog-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjongdeug%2Fblog-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjongdeug%2Fblog-backend/lists"}