{"id":15091424,"url":"https://github.com/ahmedrafat-sw/spring-reddit-api","last_synced_at":"2026-01-04T14:50:56.641Z","repository":{"id":199880892,"uuid":"701333124","full_name":"ahmedrafat-SW/spring-reddit-api","owner":"ahmedrafat-SW","description":"Reddit clone application built using Spring Boot, Spring Security, Hibernate, Angular, Tailwind CSS, and MySQL. The project mimics the core functionality of Reddit, providing a platform for users to post content, comment, upvote, and downvote posts, while incorporating robust security features like OAuth2 authentication, JWT authorization","archived":false,"fork":false,"pushed_at":"2024-07-27T12:47:24.000Z","size":66,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T10:48:28.627Z","etag":null,"topics":["java-mail-sender","jwt-authentication","mailtrap-io","mapstruct","mysql-database","open-api-specification","spring-boot","springdata-jpa","springsecurity","swagger-ui","timeago"],"latest_commit_sha":null,"homepage":"","language":"Java","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/ahmedrafat-SW.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}},"created_at":"2023-10-06T12:23:51.000Z","updated_at":"2024-12-18T21:07:37.000Z","dependencies_parsed_at":"2023-10-13T05:15:43.647Z","dependency_job_id":"fdb65a3e-b598-4eb7-8ded-90536bde05bf","html_url":"https://github.com/ahmedrafat-SW/spring-reddit-api","commit_stats":{"total_commits":18,"total_committers":1,"mean_commits":18.0,"dds":0.0,"last_synced_commit":"85fe507e313266d00cc326998f6511d6f9b4cfee"},"previous_names":["ahmedrafat-sw/reddit"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmedrafat-SW%2Fspring-reddit-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmedrafat-SW%2Fspring-reddit-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmedrafat-SW%2Fspring-reddit-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmedrafat-SW%2Fspring-reddit-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahmedrafat-SW","download_url":"https://codeload.github.com/ahmedrafat-SW/spring-reddit-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244945590,"owners_count":20536296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["java-mail-sender","jwt-authentication","mailtrap-io","mapstruct","mysql-database","open-api-specification","spring-boot","springdata-jpa","springsecurity","swagger-ui","timeago"],"created_at":"2024-09-25T10:41:01.042Z","updated_at":"2026-01-04T14:50:56.592Z","avatar_url":"https://github.com/ahmedrafat-SW.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reddit Clone using Spring And Angular \u003cimg src=\"https://github.com/ahmedrafat-SW/reddit/assets/129176607/cf6b4719-2075-43f9-aee4-4657fd139c1a\" width=\"30\" height=\"30\" \u003e\n\n**A vibrant online community where users can engage in discussions, share content, and discover a world of diverse perspectives.**\n**Built with Angular for a sleek and dynamic front-end experience, paired with the robust Spring Boot framework and MySQL backend,**\n**Our platform offers a seamless and responsive environment for users to connect.**\n\n**Angular Client repo: https://github.com/ahmedrafat-SW/reddit-ui**\n# API Documentation\n\n## AuthController\n\n### `POST /api/auth/sign-up`\nRegisters a new user.\n\n- **Request Body**: `RegisterRequest`\n- **Response**: `200 OK` with message \"User Registration Successful\"\n\n### `GET /api/auth/accountVerification/{token}`\nVerifies user account with the given token.\n\n- **Path Variable**: `token` (String)\n- **Response**: `200 OK` with message \"Account is Activated Successfully.\"\n\n### `POST /api/auth/login`\nAuthenticates a user and returns a JWT.\n\n- **Request Body**: `LoginRequest`\n- **Response**: `200 OK` with `AuthenticationResponse`\n\n### `POST /api/auth/refresh/token`\nGenerates a new JWT using a refresh token.\n\n- **Request Body**: `RefreshTokenRequest`\n- **Response**: `201 Created` with `AuthenticationResponse`\n\n### `POST /api/auth/logout`\nLogs out the user and deletes the refresh token.\n\n- **Request Body**: `RefreshTokenRequest`\n- **Response**: `200 OK` with message \"Refresh Token Successfully deleted.\"\n\n## CommentController\n\n### `POST /api/comments`\nCreates a new comment.\n\n- **Request Body**: `CommentDto`\n- **Response**: `201 Created` with `CommentDto`\n\n### `GET /api/comments/by-postId/{id}`\nGets comments by post ID.\n\n- **Path Variable**: `id` (long)\n- **Response**: `200 OK` with list of `CommentDto`\n\n### `GET /api/comments/by-user/{name}`\nGets comments by username.\n\n- **Path Variable**: `name` (String)\n- **Response**: `200 OK` with list of `CommentDto`\n\n## PostController\n\n### `POST /api/posts`\nCreates a new post.\n\n- **Request Body**: `PostRequest`\n- **Response**: `201 Created` with `PostResponse`\n\n### `GET /api/posts`\nGets all posts.\n\n- **Response**: `200 OK` with list of `PostResponse`\n\n### `GET /api/posts/{id}`\nGets a post by ID.\n\n- **Path Variable**: `id` (int)\n- **Response**: `200 OK` with `PostResponse`\n\n### `GET /api/posts/by-subreddit/{id}`\nGets posts by subreddit ID.\n\n- **Path Variable**: `id` (int)\n- **Response**: `200 OK` with list of `PostResponse`\n\n### `GET /api/posts/by-user/{name}`\nGets posts by username.\n\n- **Path Variable**: `name` (String)\n- **Response**: `200 OK` with list of `PostResponse`\n\n## SubredditController\n\n### `POST /api/subreddit`\nCreates a new subreddit.\n\n- **Request Body**: `SubredditDto`\n- **Response**: `201 Created` with `SubredditDto`\n\n### `GET /api/subreddit/{id}`\nGets a subreddit by ID.\n\n- **Path Variable**: `id` (int)\n- **Response**: \n  - `200 OK` with `SubredditDto`\n  - `404 Not Found` with message \"Can't find this subreddit\"\n\n### `GET /api/subreddit`\nGets all subreddits.\n\n- **Response**: `200 OK` with list of `SubredditDto`\n\n## VoteController\n\n### `POST /api/votes`\nCreates a vote.\n\n- **Request Body**: `VoteDto`\n- **Response**: `201 Created`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmedrafat-sw%2Fspring-reddit-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahmedrafat-sw%2Fspring-reddit-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmedrafat-sw%2Fspring-reddit-api/lists"}