{"id":28287192,"url":"https://github.com/karan19698/FriendSync","last_synced_at":"2025-12-30T23:04:36.769Z","repository":{"id":281403193,"uuid":"945171345","full_name":"karanshah1561998/FriendSync","owner":"karanshah1561998","description":"Real-time chat app with GitHub, Google, and Facebook OAuth, user profiles, and secure messaging.","archived":false,"fork":false,"pushed_at":"2025-04-04T22:07:29.000Z","size":209,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-21T22:11:37.163Z","etag":null,"topics":["cloudinary","express","javascript","jwt","mongodb-atlas","nodejs","oauth2","passportjs","react","render","socket-io"],"latest_commit_sha":null,"homepage":"https://friendsync-8snh.onrender.com","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/karanshah1561998.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":"2025-03-08T20:25:06.000Z","updated_at":"2025-04-04T22:07:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"52f99ed6-88f2-45ed-9415-d4b0db93615a","html_url":"https://github.com/karanshah1561998/FriendSync","commit_stats":null,"previous_names":["karanshah1561998/friendsync"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/karanshah1561998/FriendSync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karanshah1561998%2FFriendSync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karanshah1561998%2FFriendSync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karanshah1561998%2FFriendSync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karanshah1561998%2FFriendSync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karanshah1561998","download_url":"https://codeload.github.com/karanshah1561998/FriendSync/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karanshah1561998%2FFriendSync/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260488245,"owners_count":23016873,"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":["cloudinary","express","javascript","jwt","mongodb-atlas","nodejs","oauth2","passportjs","react","render","socket-io"],"created_at":"2025-05-21T22:11:12.107Z","updated_at":"2025-12-30T23:04:36.763Z","avatar_url":"https://github.com/karanshah1561998.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 💬 FriendSync\nFriendSync is a real-time chat application that enables users to authenticate using GitHub, Facebook, and Google OAuth, manage their profile, and interact with their social connections securely. Users can send messages, and maintain an engaging conversation experience with friends.\n\n## 🚀 Live Demo\nAccess the live app here: [FriendSync](https://friendsync-8snh.onrender.com)\n\n## ✨ Features\n- Real-Time Chat (One-on-One)\n- OAuth Authentication using GitHub, Facebook, and Google\n- User Profile Management\n- Online Status \u0026 Presence Indicators\n- Secure User Sessions with JWT\n- Responsive UI for Mobile \u0026 Desktop\n\n## 🛠 Tech Stack\n- Frontend: React.js (Vite)\n- Backend: Node.js (Express.js)\n- Database: MongoDB (Atlas)\n- Authentication: OAuth (GitHub, Facebook, Google)\n- Hosting: Render\n\n## ⚙️ Installation\n### Prerequisites\n**Ensure you have the following installed:**\n- Node.js (v18+)\n- MongoDB (if using locally)\n\n### Setup\n1. **Clone the repository:**\n   ```bash\n   git clone https://github.com/karanshah1561998/friendsync.git\n   cd friendsync\n\n2. **Install dependencies:**\n   ```bash\n   cd friendsync/frontend\n   npm install\n\n   cd friendsync/backend\n   npm install\n\n3. **Set up environment variables:**\n   Create a `.env` file in the friendsync/backend directory and add:\n   ```bash\n   # Common\n   PORT = 5000\n   JWT_SECRET = your_jwt_secret\n   MONGO_URI = your_mongodb_uri\n   NODE_ENV = development\n   SESSION_SECRET = your_session_secret\n\n   # GitHub OAuth Credentials\n   GITHUB_CLIENT_ID = your_github_client_id\n   GITHUB_CLIENT_SECRET = your_github_client_secret\n\n   # Facebook OAuth Credentials\n   FACEBOOK_APP_ID = your_facebook_app_id\n   FACEBOOK_APP_SECRET = your_facebook_app_secret\n\n   # Google OAuth Credentials\n   GOOGLE_CLIENT_ID = your_google_client_id\n   GOOGLE_CLIENT_SECRET = your_google_client_secret\n   \n   # Backend \u0026 Frontend URLs\n   DEV_SERVER_URL = http://localhost:5000\n   DEV_CLIENT_URL = http://localhost:5173\n\n   # Cloudinary Credentials\n   CLOUDINARY_CLOUD_NAME = name\n   CLOUDINARY_API_KEY = key\n   CLOUDINARY_API_SECRET = secret\n\n4. **Navigate to the backend directory and start the backend server:**\n   ```bash\n   cd friendsync/backend\n   npm run dev\n\n5. **Navigate to the frontend directory and start the React app:**\n   ```bash\n   cd friendsync/frontend\n   npm run dev\n\n   Open http://localhost:5173 to view the app in your browser.\n\n## OAuth Setup\n\n### GitHub OAuth\n1. Go to [GitHub Developer Settings](https://github.com/settings/developers).\n2. Create a new OAuth application.\n3. Set the following:\n- Homepage URL: `http://localhost:5173`\n- Authorization Callback URL: `http://localhost:5000/api/auth/github/callback`\n4. Copy Client ID and Client Secret to your `.env` file.\n\n### Facebook OAuth\n1. Go to [Facebook Developer Console](https://developers.facebook.com/).\n2. Create an App and add Facebook Login.\n3. Configure Valid OAuth Redirect URIs: `http://localhost:5000/api/auth/facebook/callback`\n4. Set a valid Privacy Policy URL (e.g., `https://yourdomain.com/privacy-policy`).\n5. Copy App ID and App Secret to your `.env` file.\n\n### Google OAuth\n1. Go to [Google Cloud Console](https://console.cloud.google.com/).\n2. Create a new project and enable the OAuth consent screen.\n3. Add Authorized Redirect URIs:  `http://localhost:5000/api/auth/google/callback`\n4. Copy Client ID and Client Secret to your `.env` file.\n\n## 🧩 Troubleshooting\n\n### 1. Invalid Privacy Policy URL (Facebook)\n- Ensure the Privacy Policy URL is publicly accessible.\n- Use a valid URL like `https://yourdomain.com/privacy-policy`.\n\n### 2. OAuth Redirect Mismatch\n- Ensure OAuth callback URLs match the exact ones registered in GitHub, Facebook, and Google.\n- Check if your app is in Live Mode for production.\n\n### 3. App Verification Required (Facebook \u0026 Google)\n- Make sure your app is in Live Mode.\n- Submit the app review request if required.\n\n### 4. Server Not Starting\n- Double-check the MongoDB URI and OAuth credentials in `.env`.\n\n### 5. Chat Messages Not Being Sent\n- Ensure the Socket.io server is running.\n- Check that DEV_SERVER_URL is set correctly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaran19698%2FFriendSync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaran19698%2FFriendSync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaran19698%2FFriendSync/lists"}