{"id":20744018,"url":"https://github.com/itsluisjim/blog-api","last_synced_at":"2026-04-29T20:34:54.910Z","repository":{"id":228289929,"uuid":"771719701","full_name":"itsluisjim/blog-api","owner":"itsluisjim","description":"Blog API","archived":false,"fork":false,"pushed_at":"2024-04-29T01:29:14.000Z","size":219,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-26T05:42:35.843Z","etag":null,"topics":["api","express","jwt-authentication","mondodb","mongoose","nodejs","rest-api","swagger"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/itsluisjim.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":"2024-03-13T20:26:04.000Z","updated_at":"2024-04-29T01:31:46.000Z","dependencies_parsed_at":"2024-04-29T01:46:14.145Z","dependency_job_id":null,"html_url":"https://github.com/itsluisjim/blog-api","commit_stats":null,"previous_names":["itsluisjim/blog-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/itsluisjim/blog-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsluisjim%2Fblog-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsluisjim%2Fblog-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsluisjim%2Fblog-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsluisjim%2Fblog-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itsluisjim","download_url":"https://codeload.github.com/itsluisjim/blog-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itsluisjim%2Fblog-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32443564,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T20:22:27.477Z","status":"ssl_error","status_checked_at":"2026-04-29T20:22:26.507Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["api","express","jwt-authentication","mondodb","mongoose","nodejs","rest-api","swagger"],"created_at":"2024-11-17T07:14:02.742Z","updated_at":"2026-04-29T20:34:54.893Z","avatar_url":"https://github.com/itsluisjim.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# REST API with Node.js, Express, and MongoDB\n\n## Blogaway - A blogging platform\n\n**Project Goal:**\nThe goal of this project was to build a robust and secure REST API using Node.js, Express, and MongoDB. The API would follow best practices for RESTful design and include features such as JWT-based authentication and authorization. Used Swagger to document API endpoints.\n\n**BlogAway User Interface:** \u003ca href=\"https://github.com/itsluisjim/blog-ui\"\u003eView Repo\u003c/a\u003e\n\n\n**Technologies Used:**\n\n- ![NodeJS](https://img.shields.io/badge/node.js-6DA55F?style=for-the-badge\u0026logo=node.js\u0026logoColor=white): A JavaScript runtime environment that allows developers to run JavaScript on the server-side.\n- ![Express.js](https://img.shields.io/badge/express.js-%23404d59.svg?style=for-the-badge\u0026logo=express\u0026logoColor=%2361DAFB): A popular web application framework for Node.js, which simplifies the process of building web servers and APIs.\n- ![MongoDB](https://img.shields.io/badge/MongoDB-%234ea94b.svg?style=for-the-badge\u0026logo=mongodb\u0026logoColor=white)\n: A popular NoSQL database that stores data in flexible, JSON-like documents.\n- **JSON Web Tokens (JWT)**: An open standard for securely transmitting information between parties as a JSON object.\n\n**Key Features:**\n1. **RESTful Design**: The API was designed to follow RESTful principles, ensuring a clear and intuitive structure for the endpoints, HTTP methods, and data responses.\n\n2. **JWT-based Authentication and Authorization**: The API implemented a JWT-based authentication and authorization system. Users can register and log in, and the API uses signed JWT tokens to authenticate and authorize requests.\n\n3. **CRUD Operations**: The API supports standard CRUD (Create, Read, Update, Delete) operations for various resources, such as authors, blogs etc.\n\n4. **Data Persistence with MongoDB**: The API uses MongoDB as the database to store and retrieve data. MongoDB's flexible document-oriented data model is well-suited for the API's requirements.\n\n5. **Error Handling and Response Formatting**: The API includes robust error handling mechanisms, providing clear and informative error messages to clients. Responses are consistently formatted, often in JSON format.\n\n6. **Security Practices**: The API follows security best practices, such as hashing passwords, validating inputs, and protecting against common web vulnerabilities like CSRF and XSS.\n\n**Project Structure and Organization:**\nThe project is structured in a modular and maintainable way, with the following key components:\n\n- **Routes**: Responsible for handling incoming requests and mapping them to the appropriate controller functions.\n- **Controllers**: Contain the business logic for processing requests and interacting with the database.\n- **Models**: Represent the data structures and schemas used in the API, leveraging Mongoose (an Object Document Mapping library for MongoDB).\n- **Middleware**: Handles cross-cutting concerns, such as authentication, authorization, and error handling.\n- **Utilities**: Includes helper functions, configuration settings, and other supporting code.\n\n![Screenshot 2024-04-28 at 8 26 24 PM](https://github.com/itsluisjim/blog-api/assets/105807191/4940071b-0dee-433f-a912-3999446ff9c9)\n\n### Future Work:\n- Allow users to upload their own profile images.\n- Allow users to change their email.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsluisjim%2Fblog-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitsluisjim%2Fblog-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsluisjim%2Fblog-api/lists"}