{"id":17504653,"url":"https://github.com/rishraks/management-service","last_synced_at":"2026-01-29T15:31:42.154Z","repository":{"id":258252603,"uuid":"873565121","full_name":"rishraks/Management-Service","owner":"rishraks","description":"A RESTful API built with Node.js, Express.js, and MongoDB for managing healthcare services. It supports CRUD operations with validations for service name, description, and price, ensuring data integrity and error handling.","archived":false,"fork":false,"pushed_at":"2024-10-16T11:58:32.000Z","size":23,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T00:41:35.374Z","etag":null,"topics":["express-js","mogodb","mongoose-schema","nodejs"],"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/rishraks.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-10-16T11:35:14.000Z","updated_at":"2024-10-26T07:51:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"9a71caed-c24b-4d73-b0b8-b593bbc2b007","html_url":"https://github.com/rishraks/Management-Service","commit_stats":{"total_commits":5,"total_committers":2,"mean_commits":2.5,"dds":"0.19999999999999996","last_synced_commit":"a00c0d19a0f33ef968fa51830e5bb762732b0c05"},"previous_names":["rishraks/management-service"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishraks%2FManagement-Service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishraks%2FManagement-Service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishraks%2FManagement-Service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rishraks%2FManagement-Service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rishraks","download_url":"https://codeload.github.com/rishraks/Management-Service/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248333132,"owners_count":21086193,"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":["express-js","mogodb","mongoose-schema","nodejs"],"created_at":"2024-10-20T01:15:17.972Z","updated_at":"2026-01-29T15:31:42.141Z","avatar_url":"https://github.com/rishraks.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Healthcare Service Management API\n\nThis API is designed for managing healthcare services, allowing users to create, read, update, and delete service records. Built with Node.js, Express.js, and MongoDB, it provides a simple interface for managing services, ensuring data integrity through validation and structured responses.\n\n## Features\n- **CRUD Operations**: Easily create, read, update, and delete services.\n- **Validation**: Ensure valid input for service name, description, and price.\n- **Auto-generated IDs**: Each service record has a unique identifier.\n\n## Endpoints\n\n### 1. Get All Services\n- **URL**: `/service/find`\n- **Method**: `GET`\n- **Description**: Retrieves a list of all services.\n\n### 2. Get Service by ID\n- **URL**: `/service/find/id`\n- **Method**: `GET`\n- **Description**: Fetches a service by its unique ID.\n- **Response**:\n    - **200 OK**: Returns the service object if found.\n    - **404 Not Found**: Returns an error message if no service is found with the given ID.\n\n### 3. Create a New Service\n- **URL**: `/service/create`\n- **Method**: `POST`\n- **Request Body**:\n    ```json\n    {\n        \"service_name\": \"string\",\n        \"description\": \"string\",\n        \"price\": number\n    }\n    ```\n- **Description**: Adds a new service record.\n- **Response**:\n    - **201 Created**: Returns the created service object.\n\n### 4. Update a Service\n- **URL**: `/service/update/id`\n- **Method**: `PUT`\n- **Request Body**:\n    ```json\n    {\n        \"service_name\": \"string\",\n        \"description\": \"string\",\n        \"price\": number\n    }\n    ```\n- **Description**: Updates an existing service by its ID. Users can update only necessary fields.\n- **Response**:\n    - **200 OK**: Returns the updated service object.\n    - **404 Not Found**: Returns an error message if no service is found with the given ID.\n\n### 5. Delete a Service\n- **URL**: `/service/delete/id`\n- **Method**: `DELETE`\n- **Description**: Removes a service from the database by its ID.\n- **Response**:\n    - **204 No Content**: Indicates the service has been successfully deleted.\n    - **404 Not Found**: Returns an error message if no service is found with the given ID.\n\n## Installation\n1. Clone the repository:\n   ```bash\n   git clone \u003crepository-url\u003e\n   ```\n2. Navigate to the Project Directory: Change your current directory to the project folder:\n    ```bash\n    cd healthcare-service-management-api\n    ```\n3. Install Dependencies: Install the necessary Node.js packages by running:\n    ```bash\n    npm install\n    ```\n4. Set Up Environment Variables: Create a .env file in the root directory of the project and add the following variables:\n   ```bash\n   MONGODB_URI=\u003cyour-mongodb-connection-string\u003e\n   PORT=8080\n   ```\n   Replace \u003cyour-mongodb-connection-string\u003e with your actual MongoDB connection string.\n\n5. Start the Server: Start the API server with the following command:\n   ```bash\n   npm run start\n   ```\n   The server will run on http://localhost:8080.\n6. Test the Endpoints: Use Postman or any other API testing tool to interact with the API endpoints.\n\n## License\nThis project is licensed under the MIT License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frishraks%2Fmanagement-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frishraks%2Fmanagement-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frishraks%2Fmanagement-service/lists"}