{"id":24487991,"url":"https://github.com/sanjithrk06/blog-platform","last_synced_at":"2026-04-11T11:33:15.212Z","repository":{"id":262737319,"uuid":"861207859","full_name":"sanjithrk06/Blog-Platform","owner":"sanjithrk06","description":"A RESTful API for managing blogs with user authentication. ","archived":false,"fork":false,"pushed_at":"2024-11-14T01:21:32.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T16:13:08.298Z","etag":null,"topics":["expressjs","jwt-authentication","mongodb","nodejs","rest-api"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sanjithrk06.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-09-22T09:47:58.000Z","updated_at":"2024-12-10T08:45:50.000Z","dependencies_parsed_at":"2024-11-14T03:15:08.531Z","dependency_job_id":null,"html_url":"https://github.com/sanjithrk06/Blog-Platform","commit_stats":null,"previous_names":["sanjithrk06/blog-platform","sanjithrk06/blog"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanjithrk06%2FBlog-Platform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanjithrk06%2FBlog-Platform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanjithrk06%2FBlog-Platform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanjithrk06%2FBlog-Platform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sanjithrk06","download_url":"https://codeload.github.com/sanjithrk06/Blog-Platform/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243663662,"owners_count":20327303,"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":["expressjs","jwt-authentication","mongodb","nodejs","rest-api"],"created_at":"2025-01-21T16:13:21.917Z","updated_at":"2026-04-11T11:33:15.149Z","avatar_url":"https://github.com/sanjithrk06.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **Blog Platform(RESTful API)**\n\n## Project Overview\n\nA RESTful API for managing blogs with user authentication. This API allows users to create, read, update, and delete blog posts, while ensuring only authenticated users have access to the blog-related functionality. User registration and login are secured using JWT tokens for authentication.\n\n---\n## Tech Stack\n\n**Server:** Node.js, Express.js\n\n**Database:** MongoDB\n\n**ODM Tool:** Mongoose\n\n**Authentication:** JWT (JSON Web Token)\n\n**Password Security:** bcrypt.js for password hashing\n\n---\n## Key features\n\n- **User Management:** Endpoints for user registration, login, and profile access.\n- **Blog Management:** Endpoints for creating, reading, updating, and deleting blog posts.\n- **JWT Authentication:** Secure access to blog routes using JWT tokens.\n- **Protected Routes:** Only authenticated users can create, update, or delete blog posts.\n- **Error Handling:** Graceful error handling for all endpoints.\n\n---\n## Environment Variables\n\nTo run this project, you will need to add the following environment variables to your .env file:\n\n```env\nPORT=\u003cYour preferred port number\u003e\nMONGO_URI=\u003cYour MongoDB connection string\u003e\nJWT_SECRET=\u003cYour secret key for JWT\u003e\n```\n\n---\n## Run Locally\n\n1. **Clone the project**\n\n```bash\n  https://github.com/sanjithrk06/Blog-Platform.git\n```\n\n2. **Go to the project directory**\n\n```bash\n  cd Blog-Platform\n```\n\n3. **Install dependencies**\n\n```bash\n  npm install\n```\n\n4. **Create a .env file**\n\n    Add the required environment variables as shown above.\n\n5. **Start the server**\n\n```bash\n  npm run start\n```\n\nThe server will start on the port you specified in the .env file or on port 3000 by default.\n\n---\n## API Documentation\n\n#### Auth Routes\n\n|            | Method   | End Point      | Description             |\n| :--------- | :------- | :------------- | :---------------------- |\n| **Signup** | **POST** | `/auth/signup` | Register a new user     |\n| **Login**  | **POST** | `/auth/login`  | Log in an existing user |\n\n#### Blog Routes\n\n| Method     | End Point   | Description       |\n| :--------- | :---------- | :---------------- |\n| **GET**    | `/blog`     | Get all blogs     |\n| **POST**   | `/blog`     | Create a new blog |\n| **PUT**    | `/blog/:id` | Update a blog     |\n| **DELETE** | `/blog/:id` | Delete a blog     |\n\n#### Request Headers\n\nFor protected routes, include the JWT token in the headers:\n\n```json\n{\n  \"Authorization\": \"Bearer \u003cyour-jwt-token\u003e\"\n}\n```\n\n---\n## License\n\nThis project is licensed under the MIT License. You are free to use, modify, and distribute it as you see fit.\n\n---","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanjithrk06%2Fblog-platform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanjithrk06%2Fblog-platform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanjithrk06%2Fblog-platform/lists"}