{"id":26038880,"url":"https://github.com/mu-senpai/appifydevs-task-server","last_synced_at":"2026-04-07T16:31:39.348Z","repository":{"id":281103501,"uuid":"944215490","full_name":"mu-senpai/appifydevs-task-server","owner":"mu-senpai","description":"Server side of a EchoGPT-based AI chatbot.","archived":false,"fork":false,"pushed_at":"2025-03-07T01:25:26.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-07T02:27:17.487Z","etag":null,"topics":["dotenv","expressjs","mongodb","nodejs"],"latest_commit_sha":null,"homepage":"https://echogpt-server.vercel.app/","language":"JavaScript","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/mu-senpai.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-03-07T01:14:27.000Z","updated_at":"2025-03-07T01:26:15.000Z","dependencies_parsed_at":"2025-03-07T02:27:20.059Z","dependency_job_id":"5ae08e1d-5eff-407c-9181-455cf6b19873","html_url":"https://github.com/mu-senpai/appifydevs-task-server","commit_stats":null,"previous_names":["mu-senpai/appifydevs-task-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mu-senpai/appifydevs-task-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mu-senpai%2Fappifydevs-task-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mu-senpai%2Fappifydevs-task-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mu-senpai%2Fappifydevs-task-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mu-senpai%2Fappifydevs-task-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mu-senpai","download_url":"https://codeload.github.com/mu-senpai/appifydevs-task-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mu-senpai%2Fappifydevs-task-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31520431,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"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":["dotenv","expressjs","mongodb","nodejs"],"created_at":"2025-03-07T10:38:02.901Z","updated_at":"2026-04-07T16:31:39.331Z","avatar_url":"https://github.com/mu-senpai.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# EchoGPT Server\n\nEchoGPT Server is the backend for the EchoGPT client application. It is built using **Node.js**, **Express**, and **MongoDB** for storing user, chat, and message data. The server handles authentication, manages user and chat data, and processes messages for real-time interactions with EchoGPT.\n\n## Features\n- **User Management**: Handle user data, including creating and updating users in MongoDB.\n- **Chat Management**: Create, fetch, update, and delete chats for users.\n- **Message Management**: Store and retrieve messages for each chat.\n- **MongoDB Integration**: Store user data, chat data, and messages in MongoDB.\n- **Environment Configuration**: Use environment variables for sensitive data like MongoDB credentials.\n\n## Live Link\nYou can access the live version of the server here:  \n[**EchoGPT Server**](https://echogpt-server.vercel.app/)\n\nThis backend server supports the [**EchoGPT Client**](https://echogpt-9bc84.web.app/) application.\n\n## Project Structure\n\n```\nappifydevs-task-server/\n├── index.js                 # Main entry point for the server\n├── .env                     # Environment variables (MongoDB credentials, etc.)\n├── package.json             # Project dependencies and scripts\n└── node_modules/            # Node modules (installed dependencies)\n```\n\n## Installation\n\nTo set up the server, follow the steps below:\n\n### 1. Clone the repository\n```\ngit clone https://github.com/mu-senpai/appifydevs-task-server.git\ncd echogpt-server\n```\n\n### 2. Install dependencies\nYou will need to install the necessary dependencies for this project.\n\nUsing npm:\n```\nnpm install\n```\n\n### 3. Set up MongoDB\nMake sure to set up your MongoDB database and create the necessary collections (`users`, `chats`, `messages`). \n\n### 4. Configure environment variables\nCreate a `.env` file in the root of your project with the following content:\n\n```\nDB_USER=your-mongodb-username\nDB_PASS=your-mongodb-password\nPORT=5000\n```\n\n### 5. Run the server\nOnce you have installed the dependencies and set up MongoDB, you can run the server:\n\n```\nnpm start\n```\n\nThis will start the server on `http://localhost:5000`.\n\n## API Endpoints\n\n### User Routes\n\n- **GET /users/:uid**: Get user data by UID.\n- **PUT /users**: Update or insert a user in the database.\n\n### Chat Routes\n\n- **POST /chats**: Create a new chat for a user.\n- **GET /chats/:uid**: Get all chats for a specific user.\n- **GET /chatdetails/:id**: Get details of a specific chat.\n- **PATCH /chats/:id**: Update the title of a chat.\n- **DELETE /chats/:id**: Delete a specific chat and its associated messages.\n\n### Message Routes\n\n- **POST /messages**: Add a new message to a chat.\n- **GET /messages/:chatId**: Get all messages for a specific chat.\n\n## Dependencies\n\n- `express`: Web framework for Node.js.\n- `mongodb`: MongoDB driver for interacting with the database.\n- `dotenv`: Loads environment variables from a `.env` file.\n- `cors`: Middleware for enabling Cross-Origin Resource Sharing (CORS).\n\n## Dev Dependencies\n\n- `nodemon` (Optional): Tool that helps develop Node.js applications by automatically restarting the server when file changes are detected.\n\n## Running Tests\n\nThis project does not currently have tests set up. You can run the following command to get a placeholder error message:\n\n```\nnpm test\n```\n\n## Contributing\n\nIf you'd like to contribute to the development of EchoGPT Server, feel free to fork this repository, create a new branch, and submit a pull request. Contributions are welcome!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmu-senpai%2Fappifydevs-task-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmu-senpai%2Fappifydevs-task-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmu-senpai%2Fappifydevs-task-server/lists"}