{"id":15171908,"url":"https://github.com/harshita2234/mern-chat","last_synced_at":"2026-02-15T10:15:24.406Z","repository":{"id":245983098,"uuid":"819743794","full_name":"harshita2234/mern-chat","owner":"harshita2234","description":"This is a chat application built using the MERN stack (MongoDB, Express, React, Node.js). The backend API connects to MongoDB and the frontend is developed with React.","archived":false,"fork":false,"pushed_at":"2024-06-25T06:31:15.000Z","size":122,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-01T04:31:40.398Z","etag":null,"topics":["autop","axios","bycrypt-js","cookie-parser","cors","dotenv","express","jwt","lodash","mongodb","mongoose","node-js","postcss","react","tailwind-css","vite","web-socket"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/harshita2234.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}},"created_at":"2024-06-25T05:56:35.000Z","updated_at":"2024-06-25T06:48:30.000Z","dependencies_parsed_at":"2024-06-25T07:59:04.962Z","dependency_job_id":"76059766-5af7-400d-8fa5-740d254a2160","html_url":"https://github.com/harshita2234/mern-chat","commit_stats":null,"previous_names":["harshita2234/mern-chat"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/harshita2234/mern-chat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshita2234%2Fmern-chat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshita2234%2Fmern-chat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshita2234%2Fmern-chat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshita2234%2Fmern-chat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harshita2234","download_url":"https://codeload.github.com/harshita2234/mern-chat/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harshita2234%2Fmern-chat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273919923,"owners_count":25191207,"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-09-06T02:00:13.247Z","response_time":2576,"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":["autop","axios","bycrypt-js","cookie-parser","cors","dotenv","express","jwt","lodash","mongodb","mongoose","node-js","postcss","react","tailwind-css","vite","web-socket"],"created_at":"2024-09-27T09:21:21.805Z","updated_at":"2026-02-15T10:15:19.353Z","avatar_url":"https://github.com/harshita2234.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mern-chat app\n\nThis is a chat application built using the MERN stack (MongoDB, Express, React, Node.js). The backend API connects to MongoDB and the frontend is developed with React. \n\nThe project is deployed locally using `nodemon` for the backend and `yarn dev` for the frontend folder.\n\n## Technologies Used\n\n### Backend\n- **Node.js**: JavaScript runtime environment that executes JavaScript code outside a web browser.\n- **Express**: Fast, unopinionated, minimalist web framework for Node.js, used for building the API.\n- **MongoDB**: NoSQL database for storing user data and messages.\n- **Mongoose**: Elegant MongoDB object modeling for Node.js.\n- **JWT (jsonwebtoken)**: For user authentication and securing API routes.\n- **bcryptjs**: Library to hash passwords.\n- **ws**: A simple WebSocket library for real-time communication.\n- **dotenv**: Loads environment variables from a `.env`.\n- **cors**: Middleware for enabling CORS (Cross-Origin Resource Sharing).\n- **cookie-parser**: Middleware to parse cookies.\n\n### Frontend\n- **React**: JavaScript library for building user interfaces.\n- **Vite**: Next-generation frontend tooling for building modern web applications.\n- **Axios**: Promise-based HTTP client for the browser and Node.js.\n- **Tailwind CSS**: Utility-first CSS framework for rapid UI development.\n- **Lodash**: Utility library providing many useful functions for common programming tasks.\n\n## Prerequisites\n\nMake sure you have the following installed:\n\n- Node.js\n- Yarn\n- MongoDB\n\n## Installation\n\n1. **Clone the repository:**\n\n   ```bash\n   git clone https://github.com/harshita2234/mern-chat.git\n   cd mern-chat\n   ```\n\n2. **Install dependencies for the API:**\n\n   ```bash\n   cd api\n   yarn install\n   ```\n\n3. **Install dependencies for the client:**\n\n   ```bash\n   cd ../client\n   yarn install\n   ```\n## Dependencies\n\n### Backend (api)\n\n```json\n{\n  \"bcryptjs\": \"^2.4.3\",\n  \"cookie-parser\": \"^1.4.6\",\n  \"cors\": \"^2.8.5\",\n  \"dotenv\": \"^16.4.5\",\n  \"express\": \"^4.19.2\",\n  \"jsonwebtoken\": \"^9.0.2\",\n  \"mongoose\": \"^8.4.3\",\n  \"ws\": \"^8.17.1\"\n}\n```\n\n### Frontend (client)\n\n```json\n{\n  \"autoprefixer\": \"^10.4.19\",\n  \"axios\": \"^1.7.2\",\n  \"lodash\": \"^4.17.21\",\n  \"postcss\": \"^8.4.38\",\n  \"react\": \"^18.3.1\",\n  \"react-dom\": \"^18.3.1\",\n  \"tailwind\": \"^4.0.0\",\n  \"tailwindcss\": \"^3.4.4\"\n}\n```\n## Environment Variables\n\nCreate a `.env` file in the `api` directory with the following content:\n\n```env\nMONGO_URL=\"your_mongo_url\"\nJWT_SECRET=\"your_jwt_secret\"\nCLIENT_URL=\"http://localhost:____\"\n```\n\nReplace `your_mongo_url` and `your_jwt_secret` with your actual MongoDB connection string and JWT secret key.\n\n## Running the Application\n\n1. **Start the backend server:**\n\n   Navigate to the `api` directory and run:\n\n   ```bash\n   nodemon index.js\n   ```\n\n2. **Start the frontend server:**\n\n   Navigate to the `client` directory and run:\n\n   ```bash\n   yarn dev\n   ```\n\nThe application should now be running on `http://localhost:____`.\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharshita2234%2Fmern-chat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharshita2234%2Fmern-chat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharshita2234%2Fmern-chat/lists"}