{"id":20196201,"url":"https://github.com/shaikrasheed99/springboot-twitter","last_synced_at":"2026-04-20T05:33:57.502Z","repository":{"id":62827602,"uuid":"558958235","full_name":"shaikrasheed99/springboot-twitter","owner":"shaikrasheed99","description":"Features of Twitter using Spring Boot. ","archived":false,"fork":false,"pushed_at":"2022-11-08T17:38:03.000Z","size":160,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-05T06:46:30.176Z","etag":null,"topics":["java","postgresql","rest-api","spring-boot","spring-mvc","tdd","tdd-java"],"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/shaikrasheed99.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}},"created_at":"2022-10-28T17:24:45.000Z","updated_at":"2022-12-30T04:45:39.000Z","dependencies_parsed_at":"2022-11-07T12:45:33.080Z","dependency_job_id":null,"html_url":"https://github.com/shaikrasheed99/springboot-twitter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shaikrasheed99/springboot-twitter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaikrasheed99%2Fspringboot-twitter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaikrasheed99%2Fspringboot-twitter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaikrasheed99%2Fspringboot-twitter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaikrasheed99%2Fspringboot-twitter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shaikrasheed99","download_url":"https://codeload.github.com/shaikrasheed99/springboot-twitter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shaikrasheed99%2Fspringboot-twitter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32034687,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["java","postgresql","rest-api","spring-boot","spring-mvc","tdd","tdd-java"],"created_at":"2024-11-14T04:22:26.797Z","updated_at":"2026-04-20T05:33:57.488Z","avatar_url":"https://github.com/shaikrasheed99.png","language":"Java","readme":"# Spring Boot Twitter\n\n## Gradle based spring boot application which provide APIs to implement few features of twitter using test driven development.\n\n## Features of the Application\n    - Create User\n    - Read Users by User id\n    - Post a Tweet\n    - Read Tweets of User\n    - Read Tweet of User by Tweet Id\n    - Follow a User\n    - Read Followers of a User\n    - Read Follows of a User\n    - Unfollow a User\n\n## Users APIs\n\n### Users - Create a User\n\n* Request\n```\nPOST /users \nHost: localhost:3000\nContent-Type: application/json\n{\n    \"id\": 1,\n    \"name\": “Ironman”,\n}\n```\n* Response\n```\nStatus code: 201 Created\nBody: \n{\n    \"data\": {\n        \"id\": 1\n    }\n}\n```\n\n### Users - If we try to provide empty User’s name in the request body\n\n* Request\n```\nPOST /users \nHost: localhost:3000\nContent-Type: application/json\n{\n    \"id\": 1\n}\n```\n* Response\n```\nStatus code: 400 Bad Request\nBody:\n{\n    \"error\": {\n        \"message\": \"User name should not be empty!\"\n    }\n}\n```\n\n### Users - If the User is already exists\n\n* Request\n```\nPOST /users \nHost: localhost:3000\nContent-Type: application/json\n{\n    \"id\": 1,\n    \"name\": “Ironman”,\n}\n```\n* Response\n```\nStatus code: 400 Bad Request\nBody:\n{\n    \"error\": {\n        \"message\": \"User is already exists with id = 1”\n    }\n}\n```\n\n### Users - Get User details by User Id\n\n* Request\n```\nGET /users/{1}\nHost: localhost:3000\n```\n* Response\n```\nStatus code: 200 OK\nBody:\n{\n    \"data\": {\n        \"id\": 1,\n        \"name\": \"Ironman\"\n    }\n}\n```\n\n### Users - If we try to provide not existed User Id in the path url\n\n* Request\n```\nGET /users/{1}\nHost: localhost:3000\n```\n* Response\n```\nStatus code: 404 Not Found\nBody:\n{\n    \"error\": {\n        \"message\": \"User not found with id = 1\"\n    }\n}\n```\n\n## Tweets APIs\n\n### Tweets - Post a Tweet\n\n* Request\n```\nPOST /users/{1}/tweets\nHost: localhost:3000\nContent-Type: application/json\n{\n    \"description\": \"This is my first tweet!”\n}\n```\n* Response\n```\nStatus code: 201 Created\nBody:\n{\n    \"data\": {\n        \"tweet_id\": 1\n    }\n}\n```\n\n### Tweets - If we try to provide empty Tweet’s description in the request body\n\n* Request\n```\nPOST /users/{1}/tweets\nHost: localhost:3000\nContent-Type: application/json\n{\n    \"description\": \"”\n}\n```\n* Response\n```\nStatus code: 400 Bad Request\nBody:\n{\n    \"error\": {\n          \"message\": \"Description should not be null or empty!\"\n     }\n}\n```\n\n### Tweets - If we try to provide not existed User Id in the path url\n\n* Request\n```\nPOST /users/{1}/tweets\nHost: localhost:3000\nContent-Type: application/json\n{\n    \"description\": “This is my first tweet!”\n}\n```\n* Response\n```\nStatus code: 404 Not Found\nBody:\n{\n    \"error\": {\n        \"message\": \"User not found with id = 1”\n    }\n}\n```\n\n### Tweets - Get Tweets by User Id\n\n* Request\n```\nGET /users/{1}/tweets\nHost: localhost:3000\n```\n* Response\n```\nStatus code: 200 OK\nBody:\n{\n    \"data\": [\n        {\n            \"id\": 22,\n            \"description\": \"This is my first tweet!\",\n            \"authorId\": 1,\n            \"authorName\": \"Ironman\"\n        },\n        {\n            \"id\": 23,\n            \"description\": \"This is my second tweet!\",\n            \"authorId\": 1,\n            \"authorName\": \"Ironman\"\n        }\n    ]\n}\n```\n\n### Tweets - Get Tweet details of a User by Tweet Id\n\n* Request\n```\nGET /users/{1}/tweets/{22}\nHost: localhost:3000\n```\n* Response\n```\nStatus code: 200 OK\nBody:\n{\n    \"data\": {\n        \"id\": 22,\n        \"description\": \"This is my first tweet!\",\n        \"authorId\": 1,\n        \"authorName\": \"Ironman\"\n    }\n}\n```\n\n### Tweets - If we provide not existed Tweet Id in the path url\n\n* Request\n```\nGET /users/{1}/tweets/{220}\nHost: localhost:3000\n```\n* Response\n```\nStatus code: 404 Not Found\nBody:\n{\n    \"error\": {\n        \"message\": \"Tweet is not found with tweet id = 220”\n    }\n}\n```\n\n### Tweets - If we try to find another User’s Tweet details by Tweet Id in path url\n\n* Request\n```\nGET /users/{1}/tweets/{22}\nHost: localhost:3000\n```\n* Response\n```\nStatus code: 403 Forbidden\nBody:\n{\n    \"error\": {\n        \"message\": \"Author cannot see another author's complete tweet details!\"\n    }\n}\n```\n\n## Follows APIs\n\n### Follows - Follow a User\n\n* Request\n```\nPOST /users/{1}/follow\nHost: localhost:3000\nContent-Type: application/json\n{\n    \"followsId\": 2\n}\n```\n* Response\n```\nStatus code: 200 OK\nBody:\n{\n    \"data\": {\n        \"followerId\": 1,\n        \"followsId\": 2\n    }\n}\n```\n\n### Follows - If we try to provide same User Id as follower Id and follows Id to follow\n\n* Request\n```\nPOST /users/{1}/follow\nHost: localhost:3000\nContent-Type: application/json\n{\n    \"followsId\": 1\n}\n```\n* Response\n```\nStatus code: 400 Bad Request\nBody:\n{\n    \"error\": {\n        \"message\": \"User id = 1 cannot follow itself!\"\n    }\n}\n```\n\n### Follows - If we try to provide not existed User Id in the path url as follower Id\n\n* Request\n```\nPOST /users/{1}/follow\nHost: localhost:3000\nContent-Type: application/json\n{\n    \"followsId\": 2\n}\n```\n* Response\n```\nStatus code: 404 Not Found\nBody:\n{\n    \"error\": {\n        \"message\": \"User is not found with follower Id = 1\"\n    }\n}\n```\n\n### Follows - If we try to provide not existed User Id in the request body as follows Id\n\n* Request\n```\nPOST /users/{1}/follow\nHost: localhost:3000\nContent-Type: application/json\n{\n    \"followsId\": 2\n}\n```\n* Response\n```\nStatus code: 404 Not Found\nBody:\n{\n    \"error\": {\n        \"message\": \"User is not found with follows Id = 2”\n    }\n}\n```\n\n### Follows - If we try to provide User Id as follows Id who is already following\n\n* Request\n```\nPOST /users/{1}/follow\nHost: localhost:3000\nContent-Type: application/json\n{\n    \"followsId\": 2\n}\n```\n* Response\n```\nStatus code: 400 Bad Request\nBody:\n{\n    \"error\": {\n        \"message\": \"User Id = 1 is already following User Id = 2”\n    }\n}\n```\n\n### Follows - Get Followers of a User by User Id\n\n* Request\n```\nGET /users/{1}/followers\nHost: localhost:3000\n```\n* Response\n```\nStatus code: 200 OK\nBody:\n{\n    \"data\": {\n        \"count\": 2,\n        \"followers\": [\n            {\n                \"name\": \"Thanos\",\n                \"id\": 4\n            },\n            {\n                \"name\": “Thor”,\n                \"id\": 2\n            }\n        ]\n    }\n}\n```\n\n### Follows - If we try to provide not existed User Id in the path url\n\n* Request\n```\nGET /users/{1}/followers\nHost: localhost:3000\n```\n* Response\n```\nStatus code: 404 Not Found\nBody:\n{\n    \"error\": {\n        \"message\": \"User not found with id = 1”\n    }\n}\n```\n\n### Follows - Get Follows of a User by User Id\n\n* Request\n```\nGET /users/{1}/follows\nHost: localhost:3000\n```\n* Response\n```\nStatus code: 200 OK\nBody:\n{\n    \"data\": {\n        \"count\": 4,\n        \"follows\": [\n            {\n                \"name\": \"Spider Man\",\n                \"id\": 5\n            },\n            {\n                \"name\": \"Captain\",\n                \"id\": 3\n            },\n            {\n                \"name\": \"Thor\",\n                \"id\": 2\n            },\n            {\n                \"name\": \"Thanos\",\n                \"id\": 4\n            }\n        ]\n    }\n}\n```\n\n### Follows - If we try to provide not existed User Id in the path url\n\n* Request\n```\nGET /users/{1}/follows\nHost: localhost:3000\n```\n* Response\n```\nStatus code: 404 Not Found\nBody:\n{\n    \"error\": {\n        \"message\": \"User not found with id = 1”\n    }\n}\n```\n\n### Follow - Unfollow a User\n\n* Request\n```\nPOST /users/{1}/unfollow\nHost: localhost:3000\nContent-Type: application/json\n{\n    \"followsId\": 2\n}\n```\n* Response\n```\nStatus code: 200 OK\nBody:\n{\n    \"data\": {\n        \"message\": \"User Id = 1 unfollowed User Id = 2\"\n    }\n}\n```\n\n### Follows - If we try to provide same User Id as follower Id and follows Id to unfollow\n\n* Request\n```\nPOST /users/{1}/unfollow\nHost: localhost:3000\nContent-Type: application/json\n{\n    \"followsId\": 1\n}\n```\n* Response\n```\nStatus code: 400 Bad Request\nBody:\n{\n    \"error\": {\n        \"message\": \"User id = 1 cannot unfollow itself!\"\n    }\n}\n```\n\n### Follows - If we try to provide User Id as follows Id who is not following\n\n* Request\n```\nPOST /users/{1}/unfollow\nHost: localhost:3000\nContent-Type: application/json\n{\n    \"followsId\": 2\n}\n```\n* Response\n```\nStatus code: 400 Bad Request\nBody:\n{\n    \"error\": {\n        \"message\": \"User Id = 1 is not following User Id = 2”\n    }\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaikrasheed99%2Fspringboot-twitter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshaikrasheed99%2Fspringboot-twitter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshaikrasheed99%2Fspringboot-twitter/lists"}