This project is a healthcare backend system designed to manage and facilitate healthcare services. It includes user authentication, appointment scheduling, and patient management features, utilizing a modern tech stack with React, Node.js, Express.js, and MongoDB.
- Frontend: React, HTML, Tailwind CSS
- Backend: Node.js, Express.js
- Database: MongoDB
- User Authentication: Register, login, and manage user profiles.
- Appointment Scheduling: Users can schedule, view, and manage appointments.
- Patient Management: Healthcare providers can manage patient records.
- Responsive Design: Fully responsive UI designed with Tailwind CSS.
- Node.js and npm installed
- MongoDB installed and running
- A modern web browser
-
Clone the repository:
git clone https://github.com/yourusername/healthcare-backend.git cd healthcare-backend
-
Install backend dependencies:
npm install
-
Create a
.env
file in the root directory and add your MongoDB connection string and other environment variables:MONGODB_URI=mongodb://localhost:27017/healthcare JWT_SECRET=your_jwt_secret
-
Start the backend server:
npm start
-
Navigate to the
frontend
directory:cd frontend
-
Install frontend dependencies:
npm install
-
Start the frontend development server:
npm start
├── backend/
│ ├── controllers/ # Controllers for handling requests
│ ├── models/ # Mongoose models
│ ├── routes/ # Express routes
│ ├── middleware/ # Custom middleware
│ ├── utils/ # Utility functions
│ ├── .env # Environment variables
│ ├── server.js # Main server file
├── frontend/
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── pages/ # React pages
│ │ ├── services/ # Services for API calls
│ │ ├── App.js # Main App component
│ │ ├── index.js # Entry point
│ ├── public/ # Public assets
│ ├── tailwind.config.js # Tailwind CSS configuration
│ ├── package.json # Frontend dependencies
├── README.md # Project documentation
**Usage**
Register a new user or log in with an existing account.
Schedule, view, and manage appointments.
Healthcare providers can manage patient records through the admin interface.
API Endpoints
**User**
POST /api/users/register: Register a new user
POST /api/users/login: User login
GET /api/users/profile: Get user profile
**Appointments**
POST /api/appointments: Schedule a new appointment
GET /api/appointments: Get all appointments
GET /api/appointments/
: Get appointment by ID
PUT /api/appointments/
: Update appointment by ID
DELETE /api/appointments/
: Delete appointment by ID
**Patients**
POST /api/patients: Add a new patient
GET /api/patients: Get all patients
GET /api/patients/
: Get patient by ID
PUT /api/patients/
: Update patient by ID
DELETE /api/patients/
: Delete patient by ID
**Contributing**
Contributions are welcome! Please fork the repository and use a feature branch. Pull requests are warmly welcomed.
Fork the repository.
Create your feature branch (git checkout -b feature/AmazingFeature).
Commit your changes (git commit -m 'Add some AmazingFeature').
Push to the branch (git push origin feature/AmazingFeature).
Open a Pull Request.