Skip to content

Latest commit

Β 

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DocPluse Healthcare - Hospital Management System

A full-stack web application for hospital management, built with .NET Core backend and React + Vite frontend.

πŸ“‹ Table of Contents

πŸ“ Project Structure

DocPluseHealthCare/
β”œβ”€β”€ HospitalApi/              # .NET Core Backend
β”‚   β”œβ”€β”€ HospitalApi/          # Main API project
β”‚   β”‚   β”œβ”€β”€ Controllers/      # API Controllers
β”‚   β”‚   β”œβ”€β”€ Models/           # Data Models
β”‚   β”‚   β”œβ”€β”€ Services/         # Business Logic Services
β”‚   β”‚   β”œβ”€β”€ Program.cs        # Application startup
β”‚   β”‚   └── appsettings.json  # Configuration
β”‚   └── HospitalApi.sln       # Solution file
β”œβ”€β”€ HospitalUi/               # React + Vite Frontend
β”‚   └── Hospital_Ui/
β”‚       β”œβ”€β”€ src/              # React components and pages
β”‚       β”œβ”€β”€ public/           # Static assets
β”‚       β”œβ”€β”€ package.json      # Dependencies
β”‚       └── vite.config.js    # Vite configuration
└── README.md                 # This file

πŸ›  Prerequisites

Backend

  • .NET 8.0 or later
  • Visual Studio 2022 (recommended) or Visual Studio Code with C# extension

Frontend

  • Node.js 16.0 or later
  • npm (comes with Node.js) or yarn

πŸš€ Getting Started

Clone the Repository

git clone <repository-url>
cd DocPluseHealthCare

πŸ”§ Backend Setup

1. Navigate to Backend Directory

cd HospitalApi/HospitalApi

2. Restore NuGet Packages

dotnet restore

3. Configure Database (if applicable)

Update appsettings.json with your database connection string:

{
  "ConnectionStrings": {
    "DefaultConnection": "Server=your-server;Database=HospitalDb;User Id=your-user;Password=your-password;"
  }
}

4. Run Migrations (if using Entity Framework)

dotnet ef database update

5. Build the Backend

dotnet build

πŸ’» Frontend Setup

1. Navigate to Frontend Directory

cd HospitalUi/Hospital_Ui

2. Install Dependencies

npm install
# or
yarn install

3. Configure API Endpoint

Update your API base URL in the environment configuration file:

# Create .env.local file
echo VITE_API_URL=http://localhost:5000 > .env.local

▢️ Running the Application

Run Backend

From HospitalApi/HospitalApi directory:

dotnet run

The API will be available at: https://localhost:5001 or http://localhost:5000

Run Frontend (Development)

From HospitalUi/Hospital_Ui directory:

npm run dev
# or
yarn dev

The application will be available at: http://localhost:5173

Build Frontend for Production

npm run build
# or
yarn build

The production build will be in the dist/ folder.

πŸ“š API Documentation

Visit HospitalApi/HospitalApi.http for API endpoint examples, or use Swagger if enabled:

http://localhost:5000/swagger

πŸ“ Configuration

Backend Configuration

  • appsettings.json - Production settings
  • appsettings.Development.json - Development settings (ignored in git)

Frontend Configuration

  • .env - Default environment variables
  • .env.local - Local overrides (ignored in git)

🀝 Contributing

  1. Create a feature branch
  2. Make your changes
  3. Commit with clear messages
  4. Push to the branch
  5. Open a Pull Request

πŸ“„ License

(Add your license here)

πŸ†˜ Troubleshooting

Backend won't start

  • Ensure .NET 8.0+ is installed: dotnet --version
  • Check database connection string
  • Run dotnet restore to restore packages

Frontend build fails

  • Delete node_modules and package-lock.json, then run npm install
  • Clear npm cache: npm cache clean --force

CORS errors

  • Ensure backend CORS is properly configured in Program.cs
  • Verify frontend API URL matches backend address

For more information, refer to the individual README files in each folder.

About

DocPluseHealthCare Hospital Website with React , .net web api , sql server

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages