{"id":30942984,"url":"https://github.com/ashutosh-kumar-rao/realtime-messanger-clone","last_synced_at":"2026-04-16T22:30:59.640Z","repository":{"id":291569575,"uuid":"977626457","full_name":"ASHUTOSH-KUMAR-RAO/Realtime-Messanger-Clone","owner":"ASHUTOSH-KUMAR-RAO","description":"A modern real-time messaging application built with cutting-edge technologies. FlashChat offers seamless communication with instant message delivery, read receipts, and user-friendly interface. Features include user authentication, message encryption, and responsive design for cross-platform usage.","archived":false,"fork":false,"pushed_at":"2025-08-31T05:00:53.000Z","size":8979,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-11T00:10:52.679Z","etag":null,"topics":["claudinary","mongodb-database","next-auth","next-auth-cre","next-auth-prisma-adapter","nextjs14","prisma-client","pusher","react-hot-toast","typescript"],"latest_commit_sha":null,"homepage":"https://realtime-messanger-clone.vercel.app","language":"TypeScript","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/ASHUTOSH-KUMAR-RAO.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,"zenodo":null}},"created_at":"2025-05-04T16:24:36.000Z","updated_at":"2025-08-31T05:00:56.000Z","dependencies_parsed_at":"2025-05-05T12:50:14.032Z","dependency_job_id":null,"html_url":"https://github.com/ASHUTOSH-KUMAR-RAO/Realtime-Messanger-Clone","commit_stats":null,"previous_names":["ashutosh-kumar-rao/realtime-messanger-clone"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ASHUTOSH-KUMAR-RAO/Realtime-Messanger-Clone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ASHUTOSH-KUMAR-RAO%2FRealtime-Messanger-Clone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ASHUTOSH-KUMAR-RAO%2FRealtime-Messanger-Clone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ASHUTOSH-KUMAR-RAO%2FRealtime-Messanger-Clone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ASHUTOSH-KUMAR-RAO%2FRealtime-Messanger-Clone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ASHUTOSH-KUMAR-RAO","download_url":"https://codeload.github.com/ASHUTOSH-KUMAR-RAO/Realtime-Messanger-Clone/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ASHUTOSH-KUMAR-RAO%2FRealtime-Messanger-Clone/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018702,"owners_count":26086604,"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-10-14T02:00:06.444Z","response_time":60,"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":["claudinary","mongodb-database","next-auth","next-auth-cre","next-auth-prisma-adapter","nextjs14","prisma-client","pusher","react-hot-toast","typescript"],"created_at":"2025-09-10T22:02:21.418Z","updated_at":"2025-10-14T13:10:05.332Z","avatar_url":"https://github.com/ASHUTOSH-KUMAR-RAO.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Real-Time Messenger - Live Chat Application\n\nA modern, real-time messaging application with authentication, file sharing, and live chat capabilities. Built with Next.js 15, Prisma, Pusher, and NextAuth.\n\n## 🚀 Tech Stack\n\n- **Frontend:** Next.js 15 with React 19\n- **Database:** Prisma ORM (PostgreSQL/MySQL compatible)\n- **Authentication:** NextAuth.js with Prisma adapter\n- **Real-time:** Pusher for live messaging\n- **Styling:** Tailwind CSS 4 with Headless UI\n- **File Upload:** Cloudinary integration\n- **State Management:** Zustand\n- **Forms:** React Hook Form\n- **Security:** bcrypt for password hashing\n- **Notifications:** React Hot Toast\n\n## ✨ Features\n\n- **Real-time Messaging** - Instant message delivery with Pusher\n- **User Authentication** - Secure login/signup with NextAuth\n- **File Sharing** - Image and document upload via Cloudinary\n- **Group Chats** - Create and manage group conversations\n- **Online Status** - See who's online in real-time\n- **Message History** - Persistent chat history with database\n- **Responsive Design** - Works perfectly on mobile and desktop\n- **Modern UI** - Beautiful interface with smooth animations\n- **Profile Management** - User profiles with avatar support\n- **Message Reactions** - React to messages with emojis\n\n## 🛠️ Installation\n\n### Prerequisites\n- Node.js 18+\n- Database (PostgreSQL, MySQL, or SQLite)\n- Pusher account for real-time features\n- Cloudinary account for file uploads\n- NextAuth compatible OAuth providers (optional)\n\n### Setup Steps\n\n1. **Clone the repository**\n   ```bash\n   git clone https://github.com/ASHUTOSH-KUMAR-RAO/real-time-messanger.git\n   cd real-time-messanger\n   ```\n\n2. **Install dependencies**\n   ```bash\n   npm install\n   ```\n\n3. **Environment Setup**\n   Create a `.env.local` file in the root directory:\n   ```env\n   # Database\n   DATABASE_URL=\"postgresql://username:password@localhost:5432/messenger\"\n   \n   # NextAuth\n   NEXTAUTH_SECRET=your-nextauth-secret\n   NEXTAUTH_URL=http://localhost:3000\n   \n   # Pusher Configuration\n   PUSHER_APP_ID=your-pusher-app-id\n   PUSHER_KEY=your-pusher-key\n   PUSHER_SECRET=your-pusher-secret\n   PUSHER_CLUSTER=your-pusher-cluster\n   \n   # Cloudinary\n   CLOUDINARY_CLOUD_NAME=your-cloud-name\n   CLOUDINARY_API_KEY=your-api-key\n   CLOUDINARY_API_SECRET=your-api-secret\n   \n   # OAuth Providers (optional)\n   GOOGLE_CLIENT_ID=your-google-client-id\n   GOOGLE_CLIENT_SECRET=your-google-client-secret\n   GITHUB_CLIENT_ID=your-github-client-id\n   GITHUB_CLIENT_SECRET=your-github-client-secret\n   ```\n\n4. **Database Setup**\n   ```bash\n   # Generate Prisma client\n   npx prisma generate\n   \n   # Run database migrations\n   npx prisma db push\n   \n   # (Optional) Seed database\n   npx prisma db seed\n   ```\n\n## 🚀 Running the Application\n\n### Development Mode\n```bash\n# Start development server\nnpm run dev\n\n# Application will be available at http://localhost:3000\n```\n\n### Production Mode\n```bash\n# Build the application\nnpm run build\n\n# Start production server\nnpm run start\n```\n\n### Type Checking\n```bash\n# Run TypeScript type checking\nnpm run typecheck\n```\n\n## 💬 Pusher Real-time Setup\n\n### Create Pusher App\n1. Sign up at [Pusher.com](https://pusher.com)\n2. Create a new app\n3. Get your app credentials\n4. Add to environment variables\n\n### Pusher Features Used\n- **Private Channels** - Secure user-to-user messaging\n- **Presence Channels** - Online status tracking\n- **Event Broadcasting** - Message delivery\n- **Connection Management** - User connection handling\n\n## ☁️ Cloudinary Setup\n\n### File Upload Configuration\n1. Create account at [Cloudinary](https://cloudinary.com)\n2. Get cloud name and API credentials\n3. Configure upload presets\n4. Add credentials to environment variables\n\n### Supported File Types\n- **Images** - JPG, PNG, GIF, WebP\n- **Documents** - PDF, DOC, DOCX\n- **Media** - Audio and video files (configurable)\n\n## 🗄️ Database Schema\n\n### Core Models\n- **User** - User accounts and profiles\n- **Conversation** - Chat conversations (1-on-1 and groups)\n- **Message** - Individual messages\n- **ConversationMember** - User participation in conversations\n\n### Prisma Commands\n```bash\n# Generate Prisma client after schema changes\nnpx prisma generate\n\n# Push schema changes to database\nnpx prisma db push\n\n# Open Prisma Studio (database GUI)\nnpx prisma studio\n\n# Reset database (development only)\nnpx prisma migrate reset\n```\n\n## 📁 Project Structure\n\n```\nreal-time-messanger/\n├── app/\n│   ├── api/             # API routes (NextAuth, webhooks)\n│   ├── components/      # Reusable React components\n│   ├── conversations/   # Chat interface pages\n│   ├── users/          # User management pages\n│   ├── auth/           # Authentication pages\n│   └── layout.tsx      # Root layout component\n├── lib/\n│   ├── prisma.ts       # Prisma client configuration\n│   ├── pusher.ts       # Pusher client/server setup\n│   ├── auth.ts         # NextAuth configuration\n│   └── utils.ts        # Utility functions\n├── prisma/\n│   ├── schema.prisma   # Database schema\n│   └── migrations/     # Database migrations\n├── public/             # Static assets\n├── types/              # TypeScript type definitions\n└── middleware.ts       # Next.js middleware\n```\n\n## 🛠️ Available Scripts\n\n| Script | Description |\n|--------|-------------|\n| `dev` | Start Next.js development server |\n| `build` | Build production application |\n| `start` | Start production server |\n| `lint` | Run ESLint for code quality |\n| `postinstall` | Automatically generate Prisma client |\n\n## 🔐 Authentication\n\n### NextAuth Configuration\n- **Multiple Providers** - Google, GitHub, credentials\n- **Database Sessions** - Persistent user sessions\n- **Protected Routes** - Authenticated-only pages\n- **Profile Management** - User profile updates\n\n### Security Features\n- **Password Hashing** - bcrypt for secure passwords\n- **CSRF Protection** - NextAuth built-in security\n- **Session Management** - Secure session handling\n- **Input Validation** - Form validation with React Hook Form\n\n## 🎨 UI Features\n\n### Modern Interface\n- **Tailwind CSS 4** - Modern utility-first styling\n- **Headless UI** - Accessible component primitives\n- **Framer Motion** - Smooth animations and transitions\n- **React Icons** - Comprehensive icon library\n- **Responsive Design** - Mobile-first approach\n\n### Interactive Elements\n- **React Select** - Enhanced dropdown menus\n- **React Spinners** - Loading indicators\n- **Hot Toast** - Non-intrusive notifications\n- **Smooth Animations** - Page transitions and micro-interactions\n\n## 🚀 Deployment\n\n### Recommended Platforms\n- **Vercel** (Next.js optimized)\n- **Railway**\n- **Render**\n- **DigitalOcean App Platform**\n\n### Database Hosting\n- **Neon** (PostgreSQL)\n- **PlanetScale** (MySQL)\n- **Supabase** (PostgreSQL)\n- **Railway** (PostgreSQL/MySQL)\n\n### Environment Setup for Production\n```bash\n# Set all environment variables\n# Configure Pusher for production\n# Set up Cloudinary for file uploads\n# Configure database connection\n```\n\n## 🔧 Development Tools\n\n- **TypeScript** - Full type safety\n- **ESLint** - Code quality and formatting\n- **Prisma Studio** - Visual database management\n- **React DevTools** - Component debugging\n- **Next.js DevTools** - Performance monitoring\n\n## 📱 Features Overview\n\n### Core Messaging\n- Send and receive messages instantly\n- Create group conversations\n- File and image sharing\n- Message timestamps and status\n- User online/offline indicators\n\n### Advanced Features\n- Message search functionality\n- Conversation management\n- User blocking/unblocking\n- Message encryption (optional)\n- Push notifications (configurable)\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/new-chat-feature`)\n3. Commit your changes (`git commit -m 'Add new chat feature'`)\n4. Push to the branch (`git push origin feature/new-chat-feature`)\n5. Open a Pull Request\n\n## 📝 License\n\nThis project is private and proprietary.\n\n## 👤 Author\n\n**Ashutosh Kumar Rao**\n- GitHub: [@ASHUTOSH-KUMAR-RAO](https://github.com/ASHUTOSH-KUMAR-RAO)\n\n## 🙏 Acknowledgments\n\n- **Pusher** - For real-time messaging infrastructure\n- **Prisma** - For excellent database toolkit\n- **NextAuth** - For authentication solutions\n- **Cloudinary** - For media management\n\n---\n\n*Connect instantly, chat securely, share seamlessly* 💬✨\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashutosh-kumar-rao%2Frealtime-messanger-clone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fashutosh-kumar-rao%2Frealtime-messanger-clone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fashutosh-kumar-rao%2Frealtime-messanger-clone/lists"}