{"id":18647748,"url":"https://github.com/sahejadkadivar/hospital-api","last_synced_at":"2026-04-07T09:32:25.514Z","repository":{"id":251381160,"uuid":"837248863","full_name":"sahejadkadivar/Hospital-API","owner":"sahejadkadivar","description":"Welcome to the Hospital API. This API is designed for doctors and patients to manage patient reports and track patient health, aiming to control the spread of COVID-19 effectively.","archived":false,"fork":false,"pushed_at":"2024-08-02T16:01:22.000Z","size":987,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-17T19:38:04.459Z","etag":null,"topics":["backend-api","backend-projects","begineersfriendly","cookie","express","hospital-management","jwt-authentication","jwt-token","mongodb","mongoose","nodejs","rest-api","swagger-ui"],"latest_commit_sha":null,"homepage":"https://hospital-api-qm11.onrender.com","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/sahejadkadivar.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-08-02T14:27:01.000Z","updated_at":"2024-08-02T16:01:25.000Z","dependencies_parsed_at":"2024-08-02T16:16:51.441Z","dependency_job_id":"8a6d9006-36aa-49e8-9f67-778cb6d20a1d","html_url":"https://github.com/sahejadkadivar/Hospital-API","commit_stats":null,"previous_names":["sahejadkadivar/hospital-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sahejadkadivar/Hospital-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahejadkadivar%2FHospital-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahejadkadivar%2FHospital-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahejadkadivar%2FHospital-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahejadkadivar%2FHospital-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sahejadkadivar","download_url":"https://codeload.github.com/sahejadkadivar/Hospital-API/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sahejadkadivar%2FHospital-API/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31508059,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","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":["backend-api","backend-projects","begineersfriendly","cookie","express","hospital-management","jwt-authentication","jwt-token","mongodb","mongoose","nodejs","rest-api","swagger-ui"],"created_at":"2024-11-07T06:27:45.845Z","updated_at":"2026-04-07T09:32:25.501Z","avatar_url":"https://github.com/sahejadkadivar.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\r\n# Hospital API 🚀\r\nWelcome to the Hospital API. This API is designed for doctors and patients to manage patient reports and track patient health, aiming to control the spread of COVID-19 effectively.\r\n\r\n## ⭐ Introduction\r\n\r\nThe Hospital API is designed to facilitate doctors working in a hospital designated by the government for COVID-19 patient testing, quarantine, and well-being management. It provides essential functionalities to manage patient data, track test results, allocate quarantine facilities, and ensure the overall health and safety of COVID-19 patients.\r\n\r\nIt is created using the REST API pattern and built with MongoDB, ExpressJS, NodeJS, and Mongoose. Swagger is used to provide a testing UI.\r\n\r\n## Features\r\n- **Authentication**: Secure authentication system for doctors.\r\n- **Authorization**: Role-based access control for managing resources.\r\n- **Operations**: Create, read, and update doctors, and patients.\r\n- **Relationships**: Establish relationships between hospitals, doctors, and patients.\r\n- **Search**: Search functionality to find hospitals, doctors, and patients by various criteria.\r\n- **Error Handling**: Proper error handling and response messages.\r\n\r\n## Technologies Used\r\n- **Node.js**: JavaScript runtime environment.\r\n- **Express.js**: Web application framework for Node.js.\r\n- **MongoDB**: NoSQL database for storing hospital, doctor, and patient data.\r\n- **Mongoose**: MongoDB object modeling tool for Node.js.\r\n- **JWT**: JSON Web Tokens for secure authentication.\r\n- **Bcrypt**: Library for hashing passwords securely.\r\n- **Swagger**: A tool for designing, building, and documenting RESTful APIs with an interactive user interface for testing.\r\n\r\n## File Structure\r\n```csharp\r\nHospital API/\r\n├── config/                     # contains the configuration File For connecting with database.\r\n├── middlewares/                # Contains authrentication middleware\r\n├── src/                        # contains all the source files of REST API\r\n|    └── doctors/               # Contains all the Required files of Doctor API\r\n|    |     └── controllers/     # All business logic   \r\n|    |     └── models/          # Schemas and repository\r\n|    |     └── routes/          # Route definitions\r\n|    └── patients/              # Contains all the Required files of patient API\r\n|    |     └── controllers/     # All business logic\r\n|    |     └── models/          # Schemas and repository\r\n|    |     └── routes/          # Route definitions\r\n|    └── utils/                 # For sending JWT token\r\n├── index.js                    # Express application setup\r\n├── package.json                # NPM package configuration\r\n├── README.md                   # Project README File\r\n├── .gitignore                  # Git ignore configuration\r\n|── swagger.json                # Contain Swagger components For test API UI\r\n\r\n```\r\n## 🔥 Getting Started With The Project\r\n\r\n1. Clone the repository:\r\n\r\n    ```bash\r\n    git clone https://github.com/sahejadkadivar/Hospital-API\r\n    ```\r\n\r\n2. Install dependencies:\r\n\r\n    ```bash\r\n    cd Hospital_API\r\n    npm install\r\n    ```\r\n\r\n3. Set up environment variables:\r\n\r\n    Create a `.env` file in the root directory and add the following variables:\r\n\r\n    ```plaintext\r\n    PORT=6000\r\n    DB_URL=your_mongodb_uri\r\n    JWT_Secret=your_jwt_secret\r\n    JWT_Expire=specify days in which token expires\r\n\r\n    ```\r\n\r\n4. Start the server:\r\n\r\n    ```bash\r\n    npm start\r\n    ```\r\n## API Documentation\r\n\r\n\r\nThe API documentation is available using Swagger UI. After starting the server, navigate to `http://localhost:8000` there you can click on provided link or navigate to `http://localhost:8000/api-docs/`in your browser to view the API documentation and test the endpoints.\r\n\r\n## Screenshots\r\n\r\n![Screenshot 1](public/SS_1.png)\r\n\r\n![Screenshot 2](public/SS_2.png)\r\n\r\n![Screenshot 3](public/SS_3.png)\r\n\r\n![Screenshot 4](public/SS_4.png)\r\n\r\n![Screenshot 5](public/SS_5.png)\r\n\r\n## Contributing\r\nFeel free to contribute to this project by creating issues or submitting pull requests. Your contributions are welcome!\r\n## Hosted URL\r\nThe Hospital API is currently hosted on Render.\r\n\r\nlink for trial is:\r\n[click here to experience it!](https://hospital-api-qm11.onrender.com)\r\n\r\n## Authors\r\n\r\n- [sahejadkadivar](https://github.com/sahejadkadivar)\r\n\r\n## 🐦 Follow Me:\r\n\r\n\u003e [LinkedIn](https://www.linkedin.com/in/sahejad-kadivar-667bb9227/)\r\n\r\n\r\nI hope you like the project. Thanks for reading :)\r\n\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsahejadkadivar%2Fhospital-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsahejadkadivar%2Fhospital-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsahejadkadivar%2Fhospital-api/lists"}