{"id":31642316,"url":"https://github.com/rohityadav-sas/instagram-clone","last_synced_at":"2026-04-13T21:31:30.958Z","repository":{"id":317992525,"uuid":"1063476160","full_name":"rohityadav-sas/instagram-clone","owner":"rohityadav-sas","description":"A full-stack Instagram clone with real-time messaging, stories, posts, and OAuth authentication. Built with Next.js, TypeScript, Express, MongoDB, and Socket.IO.","archived":false,"fork":false,"pushed_at":"2025-10-04T10:02:16.000Z","size":7891,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-04T12:07:39.179Z","etag":null,"topics":["better-auth","full-stack","instagram","instagram-clone","realtime-chat","social-media","socket-io","zustand"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/rohityadav-sas.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-24T17:16:57.000Z","updated_at":"2025-10-04T10:02:19.000Z","dependencies_parsed_at":"2025-10-08T22:15:38.113Z","dependency_job_id":null,"html_url":"https://github.com/rohityadav-sas/instagram-clone","commit_stats":null,"previous_names":["rohityadav-sas/instagram-clone"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/rohityadav-sas/instagram-clone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohityadav-sas%2Finstagram-clone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohityadav-sas%2Finstagram-clone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohityadav-sas%2Finstagram-clone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohityadav-sas%2Finstagram-clone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rohityadav-sas","download_url":"https://codeload.github.com/rohityadav-sas/instagram-clone/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohityadav-sas%2Finstagram-clone/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31771803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T20:17:16.280Z","status":"ssl_error","status_checked_at":"2026-04-13T20:17:08.216Z","response_time":93,"last_error":"SSL_read: 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":["better-auth","full-stack","instagram","instagram-clone","realtime-chat","social-media","socket-io","zustand"],"created_at":"2025-10-07T03:58:10.175Z","updated_at":"2026-04-13T21:31:30.931Z","avatar_url":"https://github.com/rohityadav-sas.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Instagram Clone\n\nA full-stack Instagram clone built with modern web technologies, featuring real-time messaging, stories, posts, and social interactions.\n\n![Instagram Clone](https://img.shields.io/badge/Instagram-Clone-E4405F?style=for-the-badge\u0026logo=instagram\u0026logoColor=white)\n![Next.js](https://img.shields.io/badge/Next.js-15.5-black?style=for-the-badge\u0026logo=next.js\u0026logoColor=white)\n![TypeScript](https://img.shields.io/badge/TypeScript-5.9-blue?style=for-the-badge\u0026logo=typescript\u0026logoColor=white)\n![MongoDB](https://img.shields.io/badge/MongoDB-8.18-green?style=for-the-badge\u0026logo=mongodb\u0026logoColor=white)\n\n## 📸 Screenshots\n\n\u003cdiv align=\"center\"\u003e\n\n### Login Page\n\n\u003cimg src=\"assets/preview1.png\" alt=\"Home Feed\" width=\"800\"/\u003e\n\n### Signup Page\n\n\u003cimg src=\"assets/preview2.png\" alt=\"User Profile\" width=\"800\"/\u003e\n\n### Home Feed and Posts\n\n\u003cimg src=\"assets/preview6.png\" alt=\"Notifications\" width=\"800\"/\u003e\n\n### Stories\n\n\u003cimg src=\"assets/preview7.png\" alt=\"Search\" width=\"800\"/\u003e\n\n### Search\n\n\u003cimg src=\"assets/preview8.png\" alt=\"Post Details\" width=\"800\"/\u003e\n\n### Explore\n\n\u003cimg src=\"assets/preview11.png\" alt=\"Settings\" width=\"800\"/\u003e\n\n### Chat\n\n\u003cimg src=\"assets/preview9.png\" alt=\"Login\" width=\"800\"/\u003e\n\u003chr\u003e\n\u003cimg src=\"assets/preview10.png\" alt=\"Registration\" width=\"800\"/\u003e\n\n### Notifications\n\n\u003cimg src=\"assets/preview5.png\" alt=\"Stories\" width=\"800\"/\u003e\n\n### Profile\n\n\u003cimg src=\"assets/preview3.png\" alt=\"Messages\" width=\"800\"/\u003e\n\n### Post Dialog\n\n\u003cimg src=\"assets/preview4.png\" alt=\"Explore\" width=\"800\"/\u003e\n\n### Profile Edit\n\n\u003cimg src=\"assets/preview12.png\" alt=\"Settings\" width=\"800\"/\u003e\n\n\u003c/div\u003e\n\n## 🚀 Features\n\n- 🔐 **Authentication**\n\n  - Email/Password login and registration\n  - OAuth login (GitHub \u0026 Google)\n  - Email verification\n  - Password reset functionality\n  - Account deletion with verification\n\n- 📱 **Core Features**\n\n  - Create, edit, and delete posts\n  - Like and comment on posts\n  - Bookmark posts\n  - User profiles with bio and avatar\n  - Follow/unfollow users\n  - Real-time stories (24-hour expiration)\n  - Explore feed for discovering new content\n  - Search users\n\n- 💬 **Real-time Messaging**\n\n  - One-on-one chat\n  - Real-time message delivery using Socket.IO\n  - Message notifications\n\n- 🔔 **Notifications**\n\n  - Real-time notifications for likes, comments, and follows\n  - Notification badge counter\n\n- 👥 **Social Features**\n  - User suggestions\n  - Followers/Following lists\n  - Block/unblock users\n  - User profile pages\n\n## 🛠️ Tech Stack\n\n### Frontend\n\n- **Framework**: Next.js 15.5 (App Router, Turbopack)\n- **Language**: TypeScript\n- **Styling**: Tailwind CSS\n- **State Management**: Zustand\n- **Data Fetching**: TanStack Query (React Query)\n- **Authentication**: Better Auth\n- **UI Components**: Radix UI\n- **Animations**: Framer Motion\n- **Real-time**: Socket.IO Client\n- **HTTP Client**: Axios\n- **Forms**: React Hook Form\n- **Notifications**: React Hot Toast\n\n### Backend\n\n- **Runtime**: Node.js\n- **Framework**: Express.js 5\n- **Language**: TypeScript\n- **Database**: MongoDB (Mongoose ORM)\n- **Authentication**: Better Auth\n- **Real-time**: Socket.IO\n- **Image Upload**: Cloudinary\n- **Email**: Nodemailer\n- **Password Hashing**: bcrypt.js\n- **Image Processing**: Sharp\n\n## 📦 Project Structure\n\n```\ninstagram-clone/\n├── backend/                 # Backend server\n│   ├── src/\n│   │   ├── auth/           # Authentication setup\n│   │   ├── config/         # Configuration files\n│   │   ├── controllers/    # Request handlers\n│   │   ├── middlewares/    # Custom middlewares\n│   │   ├── models/         # Database models\n│   │   ├── routes/         # API routes\n│   │   ├── socket/         # Socket.IO setup\n│   │   ├── utils/          # Utility functions\n│   │   └── server.ts       # Entry point\n│   ├── package.json\n│   └── tsconfig.json\n│\n└── frontend/               # Next.js frontend\n    ├── src/\n    │   ├── app/           # Next.js app router pages\n    │   ├── auth/          # Auth client setup\n    │   ├── components/    # React components\n    │   ├── config/        # Configuration files\n    │   ├── hooks/         # Custom React hooks\n    │   ├── lib/           # Utility libraries\n    │   ├── store/         # Zustand store\n    │   ├── types/         # TypeScript types\n    ├── public/            # Static assets\n    ├── package.json\n    └── next.config.ts\n```\n\n## 🚀 Getting Started\n\n### Prerequisites\n\n- Node.js 18+ and npm\n- MongoDB database\n- Cloudinary account (for image uploads)\n- GitHub OAuth App (optional, for GitHub login)\n- Google OAuth App (optional, for Google login)\n\n### Installation\n\n1. **Clone the repository**\n\n   ```bash\n   git clone https://github.com/rohityadav-sas/instagram-clone.git\n   cd instagram-clone\n   ```\n\n2. **Backend Setup**\n\n   ```bash\n   cd backend\n   npm install\n   ```\n\n   Create a `.env` file in the `backend` directory:\n\n   ```env\n   PORT=5000\n\n   FRONTEND_URL=http://localhost:3000\n\n   BETTER_AUTH_URL=http://localhost:5000\n\n   BETTER_AUTH_SECRET=your_secret_key_here\n\n   MONGODB_URI=your_mongodb_connection_string\n\n   CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name\n\n   CLOUDINARY_API_KEY=your_cloudinary_api_key\n\n   CLOUDINARY_API_SECRET=your_cloudinary_api_secret\n\n   GITHUB_CLIENT_ID=your_github_client_id\n\n   GITHUB_CLIENT_SECRET=your_github_client_secret\n\n   GOOGLE_APP_PASSWORD=your_google_app_password\n\n   GOOGLE_CLIENT_ID=your_google_client_id\n\n   GOOGLE_CLIENT_SECRET=your_google_client_secret\n   ```\n\n3. **Frontend Setup**\n\n   ```bash\n   cd ../frontend\n   npm install\n   ```\n\n   Create a `.env.local` file in the `frontend` directory:\n\n   ```env\n   NEXT_PUBLIC_API_URL=http://localhost:5000\n\n   NEXT_PUBLIC_FRONTEND_URL=http://localhost:3000\n\n   BETTER_AUTH_SECRET=your_secret_key_here\n\n   BETTER_AUTH_URL=http://localhost:3000\n   ```\n\n### Running the Application\n\n1. **Start the Backend** (from the `backend` directory)\n\n   ```bash\n   # Development mode with auto-reload\n   npm run build  # In one terminal\n   npm run dev  # In another terminal\n   ```\n\n2. **Start the Frontend** (from the `frontend` directory)\n\n   ```bash\n   npm run dev\n   ```\n\n3. **Access the Application**\n\n   - Frontend: http://localhost:3000\n\n   - Backend API: http://localhost:5000\n\n## 🔧 Configuration\n\n### OAuth Setup\n\n#### GitHub OAuth\n\n1. Go to [GitHub Developer Settings](https://github.com/settings/developers)\n2. Create a new OAuth App\n3. Set Authorization callback URL to: `http://localhost:5000/api/auth/callback/github`\n4. Add the Client ID and Client Secret to your `.env` file\n\n#### Google OAuth\n\n1. Go to [Google Cloud Console](https://console.cloud.google.com/)\n2. Create a new project or select existing\n3. Enable Google+ API\n4. Create OAuth 2.0 credentials\n5. Set Authorized redirect URIs to: `http://localhost:5000/api/auth/callback/google`\n6. Add the Client ID and Client Secret to your `.env` file\n\n### Cloudinary Setup\n\n1. Sign up at [Cloudinary](https://cloudinary.com/)\n2. Get your Cloud Name, API Key, and API Secret from the dashboard\n3. Add them to your `.env` file\n\n### MongoDB Setup\n\n- Use [MongoDB Atlas](https://www.mongodb.com/cloud/atlas) for a cloud database\n- Or install MongoDB locally\n- Add your connection string to the `.env` file\n\n## 🚢 Deployment\n\n### Frontend (Vercel)\n\n1. Push your code to GitHub\n2. Import project in [Vercel](https://vercel.com)\n3. Set Root Directory to `frontend`\n4. Add environment variable: `NEXT_PUBLIC_API_URL` (your backend URL)\n5. Deploy\n\n### Backend (Railway/Render)\n\n1. Create account on [Railway](https://railway.app) or [Render](https://render.com)\n2. Create new project from GitHub repository\n3. Set Root Directory to `backend`\n4. Add all environment variables from `.env.example`\n5. Deploy\n\n\u003e **Note**: Vercel is not recommended for the backend due to Socket.IO requirements. Use Railway, Render, or similar platforms that support WebSockets.\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## 📄 License\n\nThis project is open source and available under the [MIT License](LICENSE).\n\n## 👤 Author\n\n**Rohit Yadav**\n\n## 🙏 Acknowledgments\n\n- Inspired by Instagram\n- Built with modern web technologies\n- Icons from [Lucide](https://lucide.dev/)\n- UI components from [Radix UI](https://www.radix-ui.com/)\n\n\u003chr\u003e\n\n⭐ If you find this project helpful, please consider giving it a star!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohityadav-sas%2Finstagram-clone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frohityadav-sas%2Finstagram-clone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohityadav-sas%2Finstagram-clone/lists"}