{"id":26426215,"url":"https://github.com/glory42/twitter_like_api","last_synced_at":"2026-04-06T08:31:12.472Z","repository":{"id":282585857,"uuid":"946226976","full_name":"Glory42/Twitter_like_API","owner":"Glory42","description":"📱 Social Media API A Twitter-like backend using Express.js \u0026 PostgreSQL. Features tweet posting, hashtags, follow/unfollow, and personalized feeds. Optimized SQL queries for performance. ⚡","archived":false,"fork":false,"pushed_at":"2025-03-15T15:28:48.000Z","size":33,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T16:28:31.825Z","etag":null,"topics":["expressjs","jwt","postgresql","websockets"],"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/Glory42.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":"2025-03-10T20:12:02.000Z","updated_at":"2025-03-15T15:28:52.000Z","dependencies_parsed_at":"2025-03-15T16:38:41.832Z","dependency_job_id":null,"html_url":"https://github.com/Glory42/Twitter_like_API","commit_stats":null,"previous_names":["glory42/twitter_like_api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Glory42/Twitter_like_API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Glory42%2FTwitter_like_API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Glory42%2FTwitter_like_API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Glory42%2FTwitter_like_API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Glory42%2FTwitter_like_API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Glory42","download_url":"https://codeload.github.com/Glory42/Twitter_like_API/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Glory42%2FTwitter_like_API/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31464604,"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":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"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":["expressjs","jwt","postgresql","websockets"],"created_at":"2025-03-18T03:29:02.245Z","updated_at":"2026-04-06T08:31:12.455Z","avatar_url":"https://github.com/Glory42.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📱 Social Media API\n\n## 📌 Description  \n🚀 *Social Media API* is a backend system for a simplified Twitter-like platform. It allows users to 📝 post tweets with hashtags, 🔄 follow/unfollow users, and 📜 view a personalized feed. Built with **Express.js** and **PostgreSQL**, it utilizes **advanced SQL queries** for hashtag detection and feed generation.\n\n## 🎯 Objective  \nBuild a scalable and efficient backend for a social media platform with essential features like user interactions, feeds, and hashtags.\n\n## 🚀 Key Features  \n- 📝 **Post tweets** with hashtags.\n- 🔄 **Follow/unfollow** users.\n- 📜 **Feed** showing tweets from followed users.\n- 🔍 **Hashtag detection** using LIKE queries.\n- 🗄 **Optimized SQL queries** for better performance.\n\n## 🏗 Steps to Build  \n1️⃣ **Database Setup**: Create tables for `users`, `tweets`, `hashtags`, and `follows`.  \n2️⃣ **Followers System**: Add a `followers` join table (`follower_id`, `followed_id`).  \n3️⃣ **Hashtag Detection**: Implement `LIKE` queries to detect hashtags (e.g., `#express`).  \n4️⃣ **Feed Generation**: Use complex SQL queries to fetch tweets from followed users.  \n5️⃣ **Real-Time Updates** (Optional): Implement WebSockets for live tweet updates.  \n\n## 🛠 Technologies Used  \n- **Backend Framework**: Express.js  \n- **Database**: PostgreSQL  \n- **Authentication**: JWT  \n- **WebSockets** (Optional for real-time updates)  \n\n## 📂 Project Structure  \n```sh\nsocial-media-api/\n├── config/\n│   └── db.js           # PostgreSQL connection\n├── routes/\n│   ├── auth.js         # User registration/login\n│   ├── tweets.js       # Tweet CRUD, hashtag extraction\n│   ├── users.js        # Follow/unfollow, profile\n│   └── feed.js         # User feed logic\n├── controllers/\n│   ├── authController.js\n│   ├── tweetController.js\n│   ├── userController.js\n│   └── feedController.js\n├── models/\n│   ├── User.js         # User schema/queries\n│   ├── Tweet.js        # Tweet schema/queries\n│   ├── Hashtag.js      # Hashtag schema/queries\n│   └── Follow.js       # Follow schema/queries\n├── middleware/\n│    ├── auth.js         # Authentication\n│    └── errorHandler.js # Global error handling\n└── app.js\n```\n\n## 📌 API Endpoints  \n| ⚡ Method | 🔗 Endpoint       | 📝 Description |\n|--------|--------------|-------------|\n| POST   | /auth/register | 🆕 User registration |\n| POST   | /auth/login | 🔑 User login |\n| POST   | /tweets | 📝 Create a tweet |\n| GET    | /tweets/:id | 🔍 View a tweet |\n| GET    | /feed | 📜 Get user feed |\n| POST   | /users/:id/follow | 🔄 Follow a user |\n| POST   | /users/:id/unfollow | ❌ Unfollow a user |\n\n## 📚 Concepts Learned  \n- 📊 **Advanced SQL queries** for efficient data retrieval.  \n- 📜 **Feed algorithms** to generate personalized timelines.  \n- 🔄 **Real-time updates** (with WebSockets, optional).  \n\n## 🤝 Contributing  \nContributions are welcome! Open an issue or submit a pull request.  \n\n## 📜 License  \nThis project is licensed under the MIT **[License](LICENSE)**.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglory42%2Ftwitter_like_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglory42%2Ftwitter_like_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglory42%2Ftwitter_like_api/lists"}