{"id":22660932,"url":"https://github.com/kirankumar-matham96/socialsync","last_synced_at":"2025-08-02T04:09:18.676Z","repository":{"id":244777148,"uuid":"816170990","full_name":"kirankumar-Matham96/SocialSync","owner":"kirankumar-Matham96","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-23T14:30:16.000Z","size":389,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-23T17:19:41.155Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kirankumar-Matham96.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-06-17T07:20:32.000Z","updated_at":"2024-10-23T14:31:56.000Z","dependencies_parsed_at":"2024-10-23T17:19:46.687Z","dependency_job_id":"039d170d-6ef3-49d2-8dce-09a21206b4e7","html_url":"https://github.com/kirankumar-Matham96/SocialSync","commit_stats":null,"previous_names":["kirankumar-matham96/social-media-api-2","kirankumar-matham96/socialsync"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kirankumar-Matham96/SocialSync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirankumar-Matham96%2FSocialSync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirankumar-Matham96%2FSocialSync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirankumar-Matham96%2FSocialSync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirankumar-Matham96%2FSocialSync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kirankumar-Matham96","download_url":"https://codeload.github.com/kirankumar-Matham96/SocialSync/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirankumar-Matham96%2FSocialSync/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268334116,"owners_count":24233782,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"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":[],"created_at":"2024-12-09T11:12:54.247Z","updated_at":"2025-08-02T04:09:18.643Z","avatar_url":"https://github.com/kirankumar-Matham96.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SocialSync API (NODE-Repository-API)\n\nA Node.js application to replicate social media platform. Built with the repository-API pattern.\n\n## Table of Contents\n\n- [Features](#features)\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n- [Project Structure](#project-structure)\n- [API Endpoints](#api-endpoints)\n- [Technologies Used](#technologies-used)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Features\n\n- User\n\n  - Sign up\n  - Sign in\n  - Sign out\n  - Sign out from all devices\n  - Get user details\n  - Get all users\n  - Update user details\n\n- Post\n\n  - Create\n  - Get post by id\n  - Get user posts\n  - Get all posts\n  - Update (only post creator can do)\n  - Delete (only post creator can do)\n\n- Comment\n\n  - Create\n  - Get comments by post\n  - Update (only post creator or comment creator can do)\n  - Delete (only post creator or comment creator can do)\n\n- Like\n\n  - Get likes of comment/post\n  - toggle like of comment/post\n\n- Friendship\n\n  - Send friend request\n  - Get all friend requests\n  - Get all friends\n  - Toggle friendship (add or remove from friend list)\n  - Accept or Reject friend request\n\n- OTP based password reset\n  - Send OTP to reset password\n  - Verify the OTP and update the password\n\n## Prerequisites\n\n- Node.js (\u003e=14.x)\n- npm (\u003e=6.x)\n\n## Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/kirankumar-Matham96/Social-Media-API-2.git\n\n   ```\n\n2. Install the dependencies:\n   ```bash\n   npm install\n   ```\n3. Set up environment variables:\n\n- Create a `.env` file in the root directory and add the following:\n  ```bash\n    PORT=8000\n    DB_URL=mongodb://localhost:27017/social-media\n    SECRET_KEY='your_secret_key'\n  ```\n\n4. Start the application:\n\n- if dev:\n\n```bash\nnpm run dev\n```\n\n- if production\n\n```bash\n npm run start\n```\n\n5. Open your browser and navigate to `http://localhost:3000`\n\n## Project Structure\n\n    POST AWAY - II/\n    ├── src/\n    │ ├── config/\n    │ │ └── mongoose.config.js\n    │ ├── config/\n    │ │ └── mongoose.config.js\n    │ ├── features/\n    │ │ ├── comments/\n    │ │ | ├── controllers/\n    │ │ | | └── comment.controller.js\n    │ │ | ├── repositories/\n    │ │ | | └── comment.repository.js\n    │ │ | ├── routes/\n    │ │ | | └── comment.routes.js\n    │ │ | └── schemas/\n    │ │ | └── comment.schema.js\n    │ │ ├── friendship/\n    │ │ | ├── controllers/\n    │ │ | | └── friendship.controller.js\n    │ │ | ├── repositories/\n    │ │ | | └── friendship.repository.js\n    │ │ | ├── routes/\n    │ │ | | └── friendship.routes.js\n    │ │ | └── schemas/\n    │ │ | └── friendship.schema.js\n    │ │ ├── likes/\n    │ │ | ├── controllers/\n    │ │ | | └── likes.controller.js\n    │ │ | ├── repositories/\n    │ │ | | └── likes.repository.js\n    │ │ | ├── routes/\n    │ │ | | └── likes.routes.js\n    │ │ | └── schemas/\n    │ │ | └── likes.schema.js\n    │ │ ├── OTP/\n    │ │ | ├── controllers/\n    │ │ | | └── otp.controller.js\n    │ │ | ├── repositories/\n    │ │ | | └── otp.repository.js\n    │ │ | ├── routes/\n    │ │ | | └── otp.routes.js\n    │ │ | └── schemas/\n    │ │ | └── otp.schema.js\n    │ │ ├── posts/\n    │ │ │ ├── controllers/\n    │ │ │ | └── post.controller.js\n    │ │ │ ├── repositories/\n    │ │ │ | └── post.repository.js\n    │ │ │ ├── routes/\n    │ │ │ | └── post.routes.js\n    │ │ │ └── schemas/\n    │ │ │ └── post.schema.js\n    │ │ └── user/\n    │ │ ├── controllers/\n    │ │ | └── user.controller.js\n    │ │ ├── repositories/\n    │ │ | └── user.repository.js\n    │ │ ├── routes/\n    │ │ | └── user.routes.js\n    │ │ └── schemas/\n    │ │ └── tokenBlocklist.schema.js\n    │ │ └── user.schema.js\n    | └── middlewares/\n    │ ├── 404Handler/\n    | | └── unknownPathHandler.middleware.js\n    │ ├── authorization/\n    | | └── auth.middleware.js\n    │ ├── errorHandling/\n    | | └── customErrorHandling.middleware.js\n    │ ├── Loggers/\n    | | └── combinedLogger.middleware.js\n    | | └── userLogger.middleware.js\n    │ ├── uploadFileHandling/\n    | | └── multer.middleware.js\n    │ └── validations/\n    │ ├── comment/\n    │ | └── commentValidation.middleware.js\n    │ ├── post/\n    │ | └── postValidation.middleware.js\n    │ └── user/\n    │ └── userValidation.middleware.js\n    ├── .env\n    ├── .gitignore\n    ├── combined.log\n    ├── package-lock.json\n    ├── package.json\n    ├── README.md\n    └── server.js\n\n## API Endpoints\n\n### User Routes\n\n- `POST /api/users/signup`: Register a new user\n- `POST /api/users/signin`: Login a user\n- `GET /api/users/logout`: Logout a user\n- `GET /api/users/logout-all-devices`: Logout a user from all devices\n- `GET /api/users/get-details/:id`: Get details of user by id\n- `GET /api/users/get-all-details`: Get details of all users\n- `GET /api/users/update-details/:id`: Update user details by id\n\n### Post Routes\n\n- `POST /api/posts/`: Create a post\n- `GET /api/posts/:id`: Get a post by id\n- `GET /api/posts`: Get all posts of the user\n- `GET /api/posts/all`: Get all posts\n- `PUT /api/posts/:id`: Update a post by id\n- `DELETE /api/posts/:id`: Delete a post by id\n\n### Comment Routes\n\n- `POST /api/comments/:id`: Add a comment to a post by post id (id -\u003e post id)\n- `GET /api/comments/:id`: Get comments of a post by post id (id -\u003e post id)\n- `PUT /api/comments/:id`: Update comment of a post by id (id -\u003e comment id)\n- `DELETE /api/comments/:id`: Update comment of a post by id (id -\u003e comment id)\n\n### Like Routes\n\n- `GET /api/likes/toggle/:id?type=\u003centity\u003e`: Add or remove like by id (id -\u003e post id or comment id, type entity -\u003e \"Post\" or \"Comment\")\n- `GET /api/likes/:id`: Get likes by id (id -\u003e post id or comment id)\n\n### Friendship Routes\n\n- `POST /api/friends/send-request/:id`: Send a friend request\n- `GET /api/friends/get-friends/:id`: Get friends\n- `GET /api/friends/get-pending-requests`: Get friend pending requests\n- `GET /api/friends/toggle-friendship/:id`: Add or remove from friend list\n- `GET /api/friends/response-to-request/:id?response=\u003coption\u003e`: Accept or reject a friend request (option -\u003e \"accept\" or \"reject\")\n\n### OTP Routes\n\n- `POST /api/otp/send`: Send an OTP to email\n- `POST /api/otp/verify`: Verify the OTP\n- `PUT /api/otp/reset-password`: Reset the password\n\n## Technologies Used\n\n- Node.js\n- Express\n- MongoDB (Mongoose)\n- express-validator (for validation)\n- bcrypt\n- dotenv\n- jsonwebtoken\n- mongoose\n- multer\n- nodemailer\n- otp-generator\n- winston\n- REST Full API\n\n## Contributing\n\nContributions are welcome! Please follow these steps:\n\n1. Fork the repository\n2. Create a new branch (`git checkout -b feature/your-feature`)\n3. Commit your changes (`git commit -m 'Add some feature'`)\n4. Push to the branch (`git push origin feature/your-feature`)\n5. Open a pull request\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkirankumar-matham96%2Fsocialsync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkirankumar-matham96%2Fsocialsync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkirankumar-matham96%2Fsocialsync/lists"}