{"id":31978703,"url":"https://github.com/leocodeio/minichat","last_synced_at":"2025-10-14T22:25:51.116Z","repository":{"id":318598609,"uuid":"1071285531","full_name":"leocodeio/minichat","owner":"leocodeio","description":null,"archived":false,"fork":false,"pushed_at":"2025-10-08T04:19:32.000Z","size":285,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-08T06:18:56.101Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leocodeio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-10-07T06:19:22.000Z","updated_at":"2025-10-08T04:19:28.000Z","dependencies_parsed_at":"2025-10-08T06:29:14.549Z","dependency_job_id":null,"html_url":"https://github.com/leocodeio/minichat","commit_stats":null,"previous_names":["leocodeio/minichat"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/leocodeio/minichat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leocodeio%2Fminichat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leocodeio%2Fminichat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leocodeio%2Fminichat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leocodeio%2Fminichat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leocodeio","download_url":"https://codeload.github.com/leocodeio/minichat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leocodeio%2Fminichat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279021780,"owners_count":26087055,"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":[],"created_at":"2025-10-14T22:25:45.313Z","updated_at":"2025-10-14T22:25:51.112Z","avatar_url":"https://github.com/leocodeio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MiniChat\n\nA real-time chat application built with Next.js, featuring instant messaging, typing indicators, online presence, and message read receipts.\n\n## 🚀 Quick Start\n\n### Prerequisites\n- Node.js 18+\n- PostgreSQL database\n- pnpm package manager\n\n### Installation\n\n1. **Clone and install dependencies:**\n   ```bash\n   git clone \u003crepository-url\u003e\n   cd minichat\n   pnpm install\n   ```\n\n2. **Set up the database:**\n   ```bash\n   # Set up Prisma and run migrations\n   pnpm run prisma:local\n   ```\n\n3. **Configure environment variables:**\n   Create a `.env.local` file with:\n   ```env\n   # Database\n   DATABASE_URL=\"postgresql://username:password@localhost:5432/minichat\"\n\n   # Better Auth\n   NEXT_PUBLIC_BETTER_AUTH_URL=\"http://localhost:3000\"\n   BETTER_AUTH_SECRET=\"your-secret-key\"\n   BETTER_AUTH_GOOGLE_ID=\"your-google-client-id\"\n   BETTER_AUTH_GOOGLE_SECRET=\"your-google-client-secret\"\n\n   # WebSocket Server\n   NEXT_PUBLIC_WEBSOCKET_URL=\"http://localhost:3001\"\n   WEBSOCKET_PORT=3001\n   ```\n\n### Running the Application\n\n**Development Mode (with WebSocket):**\n```bash\npnpm run dev\n```\nThis starts both the Next.js app (port 3000) and WebSocket server (port 3001) simultaneously.\n\n**Production Mode:**\n```bash\n# Build the Next.js app\npnpm run build\n\n# Start both servers\npnpm run start:full\n```\n\n**Individual Services:**\n```bash\n# Next.js only\npnpm run dev:next\n\n# WebSocket server only\npnpm run dev:websocket\n```\n\n## 🏗️ Architecture\n\n### Tech Stack\n- **Frontend:** Next.js 15, React 19, TypeScript, Tailwind CSS\n- **Backend:** Next.js API Routes, Better Auth\n- **Database:** PostgreSQL with Prisma ORM\n- **Real-time:** Socket.IO (separate server)\n- **UI:** shadcn/ui, Radix UI\n- **Styling:** Tailwind CSS with custom themes\n\n### Project Structure\n```\nminichat/\n├── src/\n│   ├── app/                 # Next.js App Router\n│   ├── components/          # React components\n│   ├── hooks/              # Custom React hooks\n│   ├── lib/                # Utilities\n│   └── server/             # Server-side code\n├── websocket-server.js     # Standalone WebSocket server\n├── prisma/                 # Database schema \u0026 migrations\n└── public/                 # Static assets\n```\n\n## ✨ Features\n\n- 🔐 **Authentication:** Email/password and Google OAuth\n- 💬 **Real-time Messaging:** Instant message delivery\n- ⌨️ **Typing Indicators:** See when others are typing\n- 👥 **Online Presence:** User online/offline status\n- 📖 **Read Receipts:** Message delivery and read status\n- 🎨 **Themes:** Light/dark mode with custom colors\n- 🌍 **Internationalization:** Multi-language support (EN, ES, FR)\n- 📱 **Responsive:** Mobile-first design\n\n## 🔧 Development\n\n### Available Scripts\n- `pnpm run dev` - Start development servers (Next.js + WebSocket)\n- `pnpm run build` - Build for production\n- `pnpm run lint` - Run ESLint\n- `pnpm run prisma:local` - Set up database locally\n\n### WebSocket Architecture\nThe application uses a **separate WebSocket server** for real-time features:\n- **Next.js App:** Port 3000 (HTTP API routes)\n- **WebSocket Server:** Port 3001 (Socket.IO real-time communication)\n\nThis separation allows:\n- Better scalability\n- No custom server configuration needed\n- Standard Next.js deployment\n- Independent WebSocket server management\n\n## 🚀 Deployment\n\n### Environment Variables for Production\n```env\n# Production URLs\nNEXT_PUBLIC_BETTER_AUTH_URL=\"https://yourdomain.com\"\nNEXT_PUBLIC_WEBSOCKET_URL=\"wss://websocket.yourdomain.com\"\nWEBSOCKET_PORT=3001\n\n# Database\nDATABASE_URL=\"postgresql://...\"\n\n# Auth\nBETTER_AUTH_SECRET=\"...\"\nBETTER_AUTH_GOOGLE_ID=\"...\"\nBETTER_AUTH_GOOGLE_SECRET=\"...\"\n```\n\n### Deployment Steps\n1. Deploy Next.js app to Vercel/Netlify\n2. Deploy WebSocket server to a VPS or cloud service\n3. Configure environment variables\n4. Set up PostgreSQL database\n5. Run database migrations\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Run tests and linting\n5. Submit a pull request\n\n## 📄 License\n\nMIT License - see LICENSE file for details.\n\n---\n\nBuilt with ❤️ using Next.js and Socket.IO\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleocodeio%2Fminichat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleocodeio%2Fminichat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleocodeio%2Fminichat/lists"}