{"id":23257260,"url":"https://github.com/satyam-software-developer/postaway-backend","last_synced_at":"2025-04-06T04:42:27.184Z","repository":{"id":268621776,"uuid":"904958829","full_name":"satyam-software-developer/postaway-backend","owner":"satyam-software-developer","description":"postaway created with nodejs for backend web development.","archived":false,"fork":false,"pushed_at":"2025-01-29T09:13:39.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T10:53:36.263Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/satyam-software-developer.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-12-17T22:01:34.000Z","updated_at":"2025-01-29T09:13:42.000Z","dependencies_parsed_at":"2025-02-12T10:42:30.506Z","dependency_job_id":"840b6f81-f3e8-45a4-862b-13c81ca12eb4","html_url":"https://github.com/satyam-software-developer/postaway-backend","commit_stats":null,"previous_names":["satyam-software-developer/postaway-backend"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satyam-software-developer%2Fpostaway-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satyam-software-developer%2Fpostaway-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satyam-software-developer%2Fpostaway-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/satyam-software-developer%2Fpostaway-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/satyam-software-developer","download_url":"https://codeload.github.com/satyam-software-developer/postaway-backend/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247436139,"owners_count":20938532,"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":[],"created_at":"2024-12-19T12:27:41.427Z","updated_at":"2025-04-06T04:42:27.164Z","avatar_url":"https://github.com/satyam-software-developer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Mini Project Postaway\n  - Problem statement: https://classroom.codingninjas.com/app/classroom/me/25431/content/694261/offering/11351901\n\n# Postaway Social Media API\n\nPostaway is a social media platform API built using Express.js, designed to enable users to perform various social networking activities such as registration, authentication, post creation, commenting, liking, and more.\n\n## Features\n\n- **User Management**: Register and authenticate users.\n- **Post Creation**: Users can create posts with text and media.\n- **Commenting**: Users can comment on posts.\n- **Liking**: Users can like posts.\n- **File Upload**: Supports file upload for user avatars and post images.\n- **Error Handling**: Graceful handling of errors with appropriate HTTP status codes and error messages.\n- **Authentication**: Implements JSON Web Tokens (JWT) for user authentication.\n- **Security**: Ensures security measures like data validation and input sanitization.\n- **Scalable Architecture**: Uses Express.js for a scalable and modular architecture.\n\n## Installation\n\n1. Install dependencies:\n   **npm install**\n\n2. Set up environment variables:\n\n   - Create a `.env` file in the root directory with the following variables:\n     - **PORT**=3200\n     - **JWT_SECRET**=your_jwt_secret_key_here\n\n3. Start the server:\n   **node server.js**\n\n## API Endpoints\n\n### User Routes\n\n- **POST /api/user/register**: Register a new user account.\n- **POST /api/user/login**: Log in as a user.\n- **POST /api/user/upload-avatar**: Upload user avatar.\n\n### Post Routes\n\n- **POST /api/posts**: Create a new post.\n- **POST /api/posts/upload-image**: Upload post image.\n- **GET /api/posts**: Retrieve all posts.\n- **GET /api/posts/:id**: Retrieve a specific post by ID.\n- **PUT /api/posts/:id**: Update a specific post by ID.\n- **DELETE /api/posts/:id**: Delete a specific post by ID.\n\n### Comment Routes\n\n- **POST /api/comments**: Create a new comment.\n- **GET /api/comments**: Retrieve all comments for a specific post.\n- **PUT /api/comments/:id**: Update a specific comment by ID.\n- **DELETE /api/comments/:id**: Delete a specific comment by ID.\n\n### Like Routes\n\n- **POST /api/likes**: Add a like to a post.\n- **DELETE /api/likes/:id**: Remove a like from a post.\n- **GET /api/likes/:postId**: Retrieve all likes for a specific post.\n\n## Technologies Used\n\n- Express.js\n- JSON Web Tokens (JWT)\n- bcryptjs\n- Multer\n- Morgan\n- Helmet\n\n## Contributing\n\nContributions to the Postaway API are welcome! Feel free to fork the repository, make improvements, and submit pull requests for new features or bug fixes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsatyam-software-developer%2Fpostaway-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsatyam-software-developer%2Fpostaway-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsatyam-software-developer%2Fpostaway-backend/lists"}