{"id":24639361,"url":"https://github.com/alashutosh/blog_assignment","last_synced_at":"2026-05-09T18:32:22.837Z","repository":{"id":273855554,"uuid":"921095475","full_name":"AlAshutosh/blog_assignment","owner":"AlAshutosh","description":"This is a blog management application built with Spring Boot and MySQL. It allows users to create, update, delete, and fetch blogs, as well as generate reports based on the most frequently used words in blogs created by the user.","archived":false,"fork":false,"pushed_at":"2025-01-23T11:17:10.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T11:32:38.528Z","etag":null,"topics":["hibernet","rest-api","springboot"],"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/AlAshutosh.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":"2025-01-23T10:27:33.000Z","updated_at":"2025-01-23T11:18:17.000Z","dependencies_parsed_at":"2025-01-23T11:42:47.778Z","dependency_job_id":null,"html_url":"https://github.com/AlAshutosh/blog_assignment","commit_stats":null,"previous_names":["alashutosh/blog_assignment"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlAshutosh%2Fblog_assignment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlAshutosh%2Fblog_assignment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlAshutosh%2Fblog_assignment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlAshutosh%2Fblog_assignment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlAshutosh","download_url":"https://codeload.github.com/AlAshutosh/blog_assignment/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244600687,"owners_count":20479304,"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":["hibernet","rest-api","springboot"],"created_at":"2025-01-25T11:11:16.979Z","updated_at":"2026-05-09T18:32:22.750Z","avatar_url":"https://github.com/AlAshutosh.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003eBlog Application\u003c/h1\u003e\nThis is a blog management application built with Spring Boot and MySQL. It allows users to create, update, delete, and fetch blogs, as well as generate reports based on the most frequently used words in blogs created by the user.\u003cbr\u003e\n\u003ch2\u003eFeatures\u003c/h2\u003e\nLogin: Allows users to authenticate.\u003cbr\u003e\nCreate Blog: Allows users to create a new blog.\u003cbr\u003e\nFetch Blog: Retrieves blogs associated with a user by userId.\u003cbr\u003e\nUpdate Blog: Updates an existing blog.\u003cbr\u003e\nDelete Blog: Deletes an existing blog by blogId.\u003cbr\u003e\nGenerate Report: Generates a report with the top 5 most frequently used words from all blogs created by the user.\u003cbr\u003e\n\u003ch2\u003eTechnologies Used\u003c/h2\u003e\nSpring Boot: A Java-based framework to build and run the application.\u003cbr\u003e\nMySQL: Used to store user and blog data.\u003cbr\u003e\nThymeleaf: Used to render HTML templates for the UI.\u003cbr\u003e\nSetup and Installation\u003cbr\u003e\n\n\u003ch2\u003ePrerequisites\u003c/h2\u003e\nJava 11 or higher\u003cbr\u003e\nMySQL Database\u003cbr\u003e\nMaven or Gradle\u003cbr\u003e\n\u003ch3\u003e1. Clone the Repository\u003c/h3\u003e\nbash\u003cbr\u003e\nCopy\u003cbr\u003e\nEdit\u003cbr\u003e\ngit clone https://github.com/AlAshutosh/blog_assignment.git\u003cbr\u003e\n\u003ch3\u003e2. Configure MySQL Database\u003c/h3\u003e\nCreate a new database in MySQL named blogdb.\u003cbr\u003e\nCreate the necessary tables for User and Blog.\u003cbr\u003e\nYou can refer to the application.properties file for connection details.\u003cbr\u003e\n\u003ch3\u003e3.Setup Application Properties\u003c/h3\u003e\nIn the src/main/resources/application.properties file, configure your database connection:\u003cbr\u003e\nspring.datasource.url=jdbc:mysql://localhost:3306/blog_app \u003cbr\u003e\nspring.datasource.username=root \u003cbr\u003e\nspring.datasource.password=yourpassword \u003cbr\u003e\nspring.jpa.hibernate.ddl-auto=update \u003cbr\u003e\nspring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver \u003cbr\u003e\n\u003ch3\u003e4. Build and Run the Application\u003c/h3\u003e \nTo build and run the Spring Boot application, execute the following commands:\n\nbash mvn clean install mvn spring-boot:run The application will start on localhost:8080.\u003cbr\u003e\n\n\u003ch2\u003eAPI Endpoints\u003c/h2\u003e\n\n1. Login URL: /auth/login \u003cbr\u003e\nMethod: POST \u003cbr\u003e\nDescription: Authenticates a user by username and password.\u003cbr\u003e \nRequest Body:\njson Copy Edit { \"username\": \"your-username\", \"password\": \"your-password\" } \u003cbr\u003e\n\n2. Create a Blog URL: /blogs/create\u003cbr\u003e \nMethod: POST \u003cbr\u003e\nDescription: Creates a new blog. \u003cbr\u003e\nRequest Body:\njson Copy Edit { \"title\": \"Your Blog Title\", \"body\": \"Your Blog Content\" } \u003cbr\u003e\n\n3. Fetch a Blog by User URL: /blogs/user/{userId}\u003cbr\u003e\nMethod: GET \u003cbr\u003e\nDescription: Retrieves all blogs for a specific user by userId.\u003cbr\u003e\n\n4. Update a Blog URL: /blogs/update/{blogId} \u003cbr\u003e\nMethod: PUT \u003cbr\u003e\nDescription: Updates an existing blog. \u003cbr\u003e\nRequest Body:\njson Copy Edit { \"title\": \"Updated Blog Title\", \"body\": \"Updated Blog Content\" } \u003cbr\u003e\n\n5. Delete a Blog URL: /blogs/delete/{blogId} \u003cbr\u003e\nMethod: DELETE \u003cbr\u003e\nDescription: Deletes a blog by blogId.\u003cbr\u003e\n\n6. Generate Report URL: /report/{userId} \u003cbr\u003e\nMethod: GET \u003cbr\u003e\nDescription: Generates a report showing the top 5 most frequently used words in blogs for a specific user.\u003cbr\u003e\n\u003ch2\u003eUI \u003c/h2\u003e\nThe front-end for interacting with the API can be built using HTML, Thymeleaf, and JavaScript.\u003cbr\n                                                                                                \u003e\n\u003ch3\u003eThe following pages are available for user interactions:\u003c/h3\u003e\nLogin Page: Allows users to log in and authenticate.\u003cbr\u003e \nCreate Blog Page: Allows users to create new blogs.\u003cbr\u003e \nView Blog Page: Displays all blogs for the logged-in user.\u003cbr\u003e \nUpdate Blog Page: Allows users to update existing blogs.\u003cbr\u003e \nDelete Blog Page: Allows users to delete existing blogs.\u003cbr\u003e \nReport Page: Displays the report with the most frequent words used in the blogs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falashutosh%2Fblog_assignment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falashutosh%2Fblog_assignment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falashutosh%2Fblog_assignment/lists"}