[!IMPORTANT]
[ Bharat Seva+ Legacy API ]
This Express-based backend has been replaced by a new microservices architecture powered by Golang, Python, and Express. The new system provides better scalability, maintainability, and performance.
The current Express service is no longer actively maintained and is only provided for reference or legacy use cases. For the latest features, APIs, and updates, please refer to the respective microservices repositories.
Welcome to the Express server for Bharat Seva+, a MERN + Firebase project designed to facilitate seamless appointments between patients and healthcare professionals. This server handles user authentication, data management, and API interactions for the front-end applications. Refer to Official Organisation to get better idea of this whole project.
Docker (this is Optional, if you want to contribute to UI only them setting up container will help you to test your application.)
git clone <your-repo-url> .
Install dependencies
npm i
MONGODB_URL=<your-cluster-url-goes-here> # set this only rest are not necessary
JWT_SECRET_KEY=JWT_SECRET_KEY
Patient_JWT_SECRET_KEY=30d
SENDEREMAIL=SENDEREMAIL # optional
SENDERPASSWORD=SENDERPASSWORD # optional
JWT_LIFETIME=30d
Patient_JWT_LIFETIME=Patient_JWT_LIFETIME
Patient_JWT_SECRET_KEY=30d
PORT=5000
apiKey=<apiKey>
authDomain=<authDomain>
projectId=<projectId>
storageBucket=<storageBucket>
messagingSenderId=<messagingSenderId>
appId=<appId>
measurementId=<measurementId>
Run the server:
npm start
to start your server.Alternately you can setup docker-compose file and use command docker-compose up -d
to start your container, make sure you've added all the required env variables.
Go to http://localhost:5000/
for user dashboard, and http://localhost:5000/healthcare/
for Healthcare dashboard.
This project consist of two webapps User( also Referred as Patient) and Healthcare dashboard. If you're first time user you first need to create your healthcare account via Postman api collection with Register Healthcare
endpoint inHealthCare_endpoints
folder or you can use UI dashboard by hitting http://localhost:5000/healthcare/
url in your favourite browser.
Create User Bio Data (HealthCare)
enpoint, which user can register and login themselves inorder to use platform.Register User
and Login User
endpoint to verify and create your user account..
├── Bharat Seva.postman_collection.json
├── Controllers
│ ├── AppointmentController.js
│ ├── GET_Patient_BIoData.js
│ ├── Get_For_PatientProblem_Details.js
│ ├── HIP_Authorization.js
│ ├── HIP_Info.js
│ ├── HIP_Patient_Info.js
│ ├── HIP_Patient_Problem_Issuer.js
│ └── Patient_Authorization.js
├── Firebase
│ ├── Config.js
│ └── Service.js
├── LICENSE
├── MiddleWare
│ ├── HIP_Authentication.js
│ ├── Patient_Authentication.js
│ └── RateLimiter.js
├── MongoDB
│ └── Database.js
├── NodeMailer
│ ├── NodeMailer.js
│ └── NodeMessages.js
├── README.md
├── Router
│ ├── AppointsmentRouter.js
│ ├── HIP_Authorization_Router.js
│ ├── HIP_Info.js
│ ├── HIP_PatientDetails_Router.js
│ ├── HIP_Patient_Issues.js
│ ├── Patient.js
│ ├── Patient_Authorization_Router.js
│ ├── Patient_BioData.js
│ └── Patient_Details_Router.js
├── Schema
│ ├── Appointments.js
│ ├── HIP_Info_Schema.js
│ ├── Patient_CredentialSchema.js
│ ├── Patient_Info_Schema.js
│ └── Patient_problem_Schema.js
├── Server.js
├── package-lock.json
└── package.json
7 directories, 36 files
Please find Bharat Seva.postman_collection.json
for request endpoints. Import it directly in your postman as collection to explore it more.
licensed under the MIT License.
Please find CONTRIBUTING.md file to get better idea regarding contributions.