{"id":26762201,"url":"https://github.com/ore-codes/chatnest","last_synced_at":"2025-03-28T18:34:46.990Z","repository":{"id":279829779,"uuid":"940120162","full_name":"ore-codes/chatnest","owner":"ore-codes","description":"A real-time chat application built with NestJS and Next.js. It allows users to authenticate, join chat rooms, send messages, and track unread messages in real-time. The app features JWT authentication, WebSocket-based messaging, read receipts, and a responsive UI with a mobile-friendly chat experience.","archived":false,"fork":false,"pushed_at":"2025-02-27T19:31:21.000Z","size":1182,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T00:15:47.704Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://chatnest-webapp.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/ore-codes.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-02-27T16:41:19.000Z","updated_at":"2025-02-27T19:31:24.000Z","dependencies_parsed_at":"2025-02-28T00:28:28.486Z","dependency_job_id":null,"html_url":"https://github.com/ore-codes/chatnest","commit_stats":null,"previous_names":["ore-codes/chatnest"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ore-codes%2Fchatnest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ore-codes%2Fchatnest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ore-codes%2Fchatnest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ore-codes%2Fchatnest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ore-codes","download_url":"https://codeload.github.com/ore-codes/chatnest/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246081755,"owners_count":20720759,"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":[],"created_at":"2025-03-28T18:34:46.502Z","updated_at":"2025-03-28T18:34:46.977Z","avatar_url":"https://github.com/ore-codes.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **ChatNest - Real-time Chat Application** 🚀\n\nA real-time chat application built with **NestJS, GraphQL, TypeORM, PostgreSQL, WebSockets (Socket.io), and React (Next.js)**. This project allows users to **authenticate, join chat rooms, send messages, and track unread messages in real-time**.\n\n📌 **Live Demo:**\n- **Server (GraphQL \u0026 WebSockets)**: [https://chatnest-wj2w.onrender.com](https://chatnest-wj2w.onrender.com)\n- **Web App (Next.js UI)**: [https://chatnest-webapp.vercel.app](https://chatnest-webapp.vercel.app)\n\n---\n\n## **🚀 Features**\n### ✅ **Backend (NestJS)**\n- Authentication with **JWT** (Login \u0026 Token-based WebSocket authentication)\n- **GraphQL API** for fetching chat rooms, messages, and users\n- **WebSockets** for real-time chat functionality\n- **TypeORM \u0026 PostgreSQL** for database management\n- **Unread message tracking** per user\n- **Message read receipts** (per-user tracking)\n- **Automatic reconnection handling** for WebSockets\n\n### ✅ **Frontend (Next.js)**\n- **Authentication (JWT-based login)**\n- **Chat room selection with unread message count**\n- **Real-time messaging via WebSockets**\n- **Read receipts \u0026 message tracking**\n- **Responsive UI similar to modern chat applications**\n- **Optimized state management with RxJS \u0026 Apollo Client**\n\n---\n\n## **🛠️ Tech Stack**\n### **Backend (NestJS)**\n- **NestJS** (Framework)\n- **GraphQL** (API)\n- **TypeORM** (ORM)\n- **PostgreSQL** (Database)\n- **WebSockets (Socket.io)** (Real-time messaging)\n- **JWT Authentication** (Token-based security)\n\n### **Frontend (Next.js)**\n- **React (Next.js 14)** (Client-side UI)\n- **Apollo Client** (GraphQL state management)\n- **Socket.io-client** (WebSocket communication)\n- **RxJS** (Reactive state management)\n- **Tailwind CSS** (Styling)\n\n---\n\n## **🔧 Installation \u0026 Setup**\n### **1️⃣ Clone the Repository**\n```sh\ngit clone https://github.com/ore-codes/chatnest.git\ncd chatnest\n```\n\n### **2️⃣ Set Up the Backend (NestJS)**\n#### **Environment Variables**\nCreate a **`.env`** file inside the `server` directory:\n```sh\nPORT=2457\nJWT_SECRET=your-secret-key\nDB_HOST=localhost\nDB_PORT=5432\nDB_USER=your-db-user\nDB_PASS=your-db-password\nDB_NAME=chatnest\n```\n\n---\n\n### **3️⃣ Set Up the Frontend (Next.js)**\n#### **Environment Variables**\nCreate a **`.env.local`** file inside the `webapp` directory:\n```sh\nNEXT_PUBLIC_SERVER_URL=http://localhost:2457\n```\n\n#### **Run the app**\n```sh\nnpm install\nnpm run dev\n```\nThe server and webapp will run in dev mode simultaneously.\nThe app will run at **`http://localhost:2456`**.\n\n---\n\n## **🎯 How to Use**\n1. **Sign in** with a valid username and password.\n2. **Join a chat room** (or create a new one).\n3. **Send messages in real-time** (WebSockets).\n4. **Unread messages are tracked** per user.\n5. **Messages are marked as read** when a user views the chat.\n6. **Automatic WebSocket reconnection** ensures seamless chat experience.\n\n---\n\n## **🌍 Deployment**\n### **Backend (NestJS)**\n- Hosted on **Render**: [https://chatnest-wj2w.onrender.com](https://chatnest-wj2w.onrender.com)\n- Database: **PostgreSQL on Render**\n\n### **Frontend (Next.js)**\n- Hosted on **Vercel**: [https://chatnest-webapp.vercel.app](https://chatnest-webapp.vercel.app)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fore-codes%2Fchatnest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fore-codes%2Fchatnest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fore-codes%2Fchatnest/lists"}