{"id":23988690,"url":"https://github.com/ajaykumar2pp/chat-app-nodejs","last_synced_at":"2026-04-08T23:32:43.090Z","repository":{"id":270293219,"uuid":"909915022","full_name":"ajaykumar2pp/Chat-APP-NodeJS","owner":"ajaykumar2pp","description":"A feature-rich real-time chat application.","archived":false,"fork":false,"pushed_at":"2024-12-30T03:57:56.000Z","size":1631,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-25T03:12:45.188Z","etag":null,"topics":["expressjs","githuboauth","google","googleoauth2","moment","mongoose","nodejs","socket-io"],"latest_commit_sha":null,"homepage":"","language":"EJS","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/ajaykumar2pp.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":"2024-12-30T03:43:38.000Z","updated_at":"2024-12-30T04:01:20.000Z","dependencies_parsed_at":"2024-12-30T04:37:57.998Z","dependency_job_id":null,"html_url":"https://github.com/ajaykumar2pp/Chat-APP-NodeJS","commit_stats":null,"previous_names":["ajaykumar2pp/chat-app-nodejs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ajaykumar2pp/Chat-APP-NodeJS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajaykumar2pp%2FChat-APP-NodeJS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajaykumar2pp%2FChat-APP-NodeJS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajaykumar2pp%2FChat-APP-NodeJS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajaykumar2pp%2FChat-APP-NodeJS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ajaykumar2pp","download_url":"https://codeload.github.com/ajaykumar2pp/Chat-APP-NodeJS/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajaykumar2pp%2FChat-APP-NodeJS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31579052,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["expressjs","githuboauth","google","googleoauth2","moment","mongoose","nodejs","socket-io"],"created_at":"2025-01-07T16:14:47.003Z","updated_at":"2026-04-08T23:32:43.075Z","avatar_url":"https://github.com/ajaykumar2pp.png","language":"EJS","readme":"## Chat Message App 🚀\n\nA feature-rich authentication via Google and GitHub OAuth, real-time chat application built using **Node.js**, **Express**, **Socket.IO**, **MongoDB**, and **EJS** for templating. The application supports real-time messaging, typing indicators, and persistent chat history.Additionally, it provides a user private-chat dashboard\n\n\n\n## 🌟 Features\n\n- 🔒 **User Registration and Login**\n  - Traditional email and password authentication using Passport.js.\n- 🌐 **OAuth Integration**\n  - Google and GitHub authentication support.\n- 📧 **Forget Password Flow**\n  - Reset your password securely via email.\n- 🛠️ **Protected Private-Chat**\n  - Accessible only to authenticated users.\n- 🔗 **Real-Time Messaging**\n  - Send and receive messages instantly using Socket.io.\n- 👥 **User Management**\n  - View active users and their count.\n- 📜 **Persistent Chat History**\n  - Retrieve stored messages from the database.\n- ⌨️ **Typing Indicators**\n  - Know when another user is typing.\n- 🖼️ **User Profiles**\n  - Includes user avatars and display names.\n- 📱  **Responsive Design**\n  - Built using EJS and Bootstrap for a modern, adaptive interface.\n\n## 🚀 Tech Stack\n\n| Technology        | Description                 |\n| ----------------- | --------------------------- |\n| 📦 **NPM**        | Dependency management       |\n| ⚛️ **EJS**   | Templating engine          |\n| 🟢 **Node.js**    | Backend runtime environment |\n| ⚡ **Express.js** | Backend web framework       |\n| 🔑 **Passport.js**        | Authentication middleware  |\n| ✉️ **Nodemailer**        | Email Service for password reset  |\n| ⚡ **Socket.IO**       |Real-time communication |\n| 🗄️ **MongoDB**    | NoSQL Database for user data           |\n\n## 🚀 Installation and Setup\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/ajaykumar2pp/Chat-APP-NodeJS\n   ```\n2. Navigate to the project directory:\n   ```bash\n    cd chat-app-nodejs\n   ```\n3. Install dependencies:\n   ```bash\n   npm install\n   ```\n4. Set up environment variables:\n   ```bash\n   DATABASE_URL=mongodb+srv://\u003cusername\u003e:\u003cpassword\u003emongodb.net/USER_AUTH?retryWrites=true\u0026w=majority\n   JWT_SECRET=themyscret\n   GOOGLE_CLIENT_ID=**6444762183-***************************.apps.googleusercontent.com\n   GOOGLE_CLIENT_SECRET=GOCSPX-VGOKmLZdJx2oJ2WxON_***********\n   EMAIL_USER=abc@gmail.com\n   EMAIL_PASS=tsqp **** **** jeym\n   GOOGLE_CALLBACK_URL=https://abc-coder-in.onrender.com/auth/google/callback\n   GITHUB_CLIENT_ID=Ov23li8zO2Uw8c7******\n   GITHUB_CLIENT_SECRET=ab882befa44617**********56695388fd7d1b07\n   GITHUB_CALLBACK_URL=https://abc-coder-in.onrender.com/auth/github/callback\n   ```\n5. Start the development server:\n   ```bash\n   npm start\n   ```\n\n\n## 📁 Project Structure\n\n```\nMulti-Authentication/\nsrc/\n├── config/                  # Configuration files\n│   └── db.config.js         # Database connection configuration\n│   └── nodemailer.js        # Email service setup\n├── controllers/             # Route controllers\n│   └── userController.js    # Controller for authentication-related logic\n├── middlewares/             # Custom middleware\n│   └── auth.middleware.js   # Middleware for authentication and authorization\n├── models/                  # Database models\n│   └── user.model.js        # User schema and model definition\n├── passport/                # Passport.js strategies\n│   └── passport.js          # Passport-Local, Google \u0026 GitHub strategies\n├── routes/                  # Application routes\n│   └── userRoutes.js        # Routes related to authentication\n├── views/                   # EJS templates\n├── .env.example             # Sample environment file\n├── index.js                 # Main entry point for the server\n├── package.json             # Project configuration\n├── README.md                # Documentation\n```\n\n## 🚦 API Endpoints\n\n| HTTP Method | Endpoint                  | Description                                    |\n|--------------|---------------------------|------------------------------------------------|\n| `GET`        | `/register`                | Displays the registration page.               |\n| `POST`       | `/register`                | Registers a new user.                         |\n| `GET`        | `/login`                   | Displays the login page.                      |\n| `POST`       | `/login`                   | Logs in the user.                             |\n| `GET`        | `/google`             | Initiates Google OAuth.                       |\n| `GET`        | `/google/callback`    | Google OAuth callback.                        |\n| `GET`        | `/github`             | Initiates GitHub OAuth.                       |\n| `GET`        | `/github/callback`    | GitHub OAuth callback.                        |\n| `GET`        | `/private-chat`               | Private chat dashboard  |\n| `GET`        | `/forget-password`         | Displays the forget password page.            |\n| `POST`       | `/forget-password`         | Sends reset password email.                   |\n| `GET`        | `/check-email`             | Prompts user to check email for reset link.   |\n| `GET`        | `/reset-password/:token`   | Displays the reset password page.             |\n| `POST`       | `/reset-password/:token`   | Resets the user password.                     |\n| `GET`        | `/success`                 | Displays success page.                        |\n| `GET`        | `/logout`                  | Logs the user out.                            |\n\n\n\n## 📷 Screenshots\n![Chat-APP-12](https://github.com/user-attachments/assets/a4607a43-6880-4159-8390-94dd78ec08c9)\n\n## 🛡️ Security\n\n- Encrypted passwords using bcrypt 🔒.\n- Secure OAuth flows with Google and GitHub.\n- Environment variables stored securely with dotenv.\n\n## 📞 Contact\n\n- 👤 Author: Ajay Kumar Prajapati\n- 📧 Email: ajay2kumarpp@gmail.com\n- 🌐 Github: https://github.com/ajaykumar2pp\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajaykumar2pp%2Fchat-app-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fajaykumar2pp%2Fchat-app-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajaykumar2pp%2Fchat-app-nodejs/lists"}