{"id":18366122,"url":"https://github.com/mutahir-riaz/twitter","last_synced_at":"2026-04-05T21:32:02.530Z","repository":{"id":252605161,"uuid":"840921598","full_name":"mutahir-riaz/Twitter","owner":"mutahir-riaz","description":"Backend for a Twitter clone built with Node.js, featuring API routes for user, tweet, and comment management. Implements JWT for secure authentication, role-based access control, and real-time chat with Socket.io. Includes schemas for users, tweets, and comments. Nodemailer handles email verification and OTP-based password resets. ","archived":false,"fork":false,"pushed_at":"2024-08-11T06:07:13.000Z","size":48,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T17:00:41.977Z","etag":null,"topics":["cloudinary","expressjs","jwt-authentication","mongodb","multer","nodejs","otp-verification","socket-io"],"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/mutahir-riaz.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-08-11T05:15:26.000Z","updated_at":"2024-08-11T06:33:08.000Z","dependencies_parsed_at":"2024-08-11T06:32:18.267Z","dependency_job_id":"a19e8dc6-040c-4a6d-9e26-7f3f85c22b84","html_url":"https://github.com/mutahir-riaz/Twitter","commit_stats":null,"previous_names":["mutahir-riaz/twitter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mutahir-riaz/Twitter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mutahir-riaz%2FTwitter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mutahir-riaz%2FTwitter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mutahir-riaz%2FTwitter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mutahir-riaz%2FTwitter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mutahir-riaz","download_url":"https://codeload.github.com/mutahir-riaz/Twitter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mutahir-riaz%2FTwitter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31451438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"ssl_error","status_checked_at":"2026-04-05T21:22:51.943Z","response_time":75,"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":["cloudinary","expressjs","jwt-authentication","mongodb","multer","nodejs","otp-verification","socket-io"],"created_at":"2024-11-05T23:16:11.641Z","updated_at":"2026-04-05T21:32:02.505Z","avatar_url":"https://github.com/mutahir-riaz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Twitter Clone Backend\n\nThis backend application is the server-side component of a Twitter clone, built using Node.js and Express.js. It handles various functionalities that mirror the core features of Twitter, with a focus on scalability, security, and real-time communication.\n\n## Key Features\n\n### API Routes\n- **User Management:** \n  - User registration, login, profile management, following/unfollowing users, and retrieving user timelines.\n- **Tweet Management:**\n  - CRUD operations for tweets: create, read, update, delete, like, and retweet.\n- **Comments and Likes:**\n  - Add comments to tweets, like comments, and view comment threads.\n- **Search and Hashtags:**\n  - Search functionality for users, tweets, and hashtags.\n\n### Schemas\n- **User Schema:**\n  - Stores user information: username, email, password, bio, profile picture, followers, and following lists.\n- **Tweet Schema:**\n  - Manages tweet content, author, timestamps, comments, and likes references.\n- **Comment Schema:**\n  - Handles comment content, linking them to both the tweet and the author.\n\n### Authentication \u0026 Authorization\n- **JWT Authentication:**\n  - Secures API endpoints with JWT tokens, ensuring only authenticated users can access protected routes.\n- **Role-Based Access Control:**\n  - Restricts access to certain routes based on user roles (e.g., admin, user).\n\n### Email Sending with Nodemailer\n- **Email Verification:**\n  - Sends a verification email to new users during registration to confirm their email addresses.\n- **Password Reset:**\n  - Implements an OTP (One-Time Password) system for password resets, where users receive an OTP via email to verify their identity before resetting their password.\n\n### Real-Time Chat with Socket.io\n- **Direct Messaging:**\n  - Enables real-time direct messaging between users using Socket.io for seamless communication.\n- **Notifications:**\n  - Real-time notifications for mentions, replies, and messages, enhancing user engagement.\n\n### OTP for Password Reset\n- **Secure OTP Generation:**\n  - Generates secure, time-limited OTPs for password reset functionality.\n- **Verification Process:**\n  - Users receive an OTP via email, which they must enter to proceed with resetting their password, ensuring enhanced security.\n\n## Tech Stack\n- **Node.js \u0026 Express.js:** For building the server and API routes.\n- **MongoDB \u0026 Mongoose:** For database management and schema definitions.\n- **JWT:** For handling authentication and securing API endpoints.\n- **Socket.io:** For enabling real-time communication between users.\n- **Nodemailer:** For sending emails, including OTPs and verification emails.\n- **BCrypt:** For securely hashing and storing user passwords.\n\nThis backend is optimized for performance and designed to handle a large number of concurrent users while maintaining the integrity and security of user data. It lays the foundation for a full-featured Twitter clone, providing robust API endpoints and real-time features essential for a social media platform.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmutahir-riaz%2Ftwitter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmutahir-riaz%2Ftwitter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmutahir-riaz%2Ftwitter/lists"}