A full-stack web application for hospital management, built with .NET Core backend and React + Vite frontend.
- Project Structure
- Prerequisites
- Getting Started
- Backend Setup
- Frontend Setup
- Running the Application
- API Documentation
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
- .NET 8.0 or later
- Visual Studio 2022 (recommended) or Visual Studio Code with C# extension
- Node.js 16.0 or later
- npm (comes with Node.js) or yarn
git clone <repository-url>
cd DocPluseHealthCarecd HospitalApi/HospitalApidotnet restoreUpdate appsettings.json with your database connection string:
{
"ConnectionStrings": {
"DefaultConnection": "Server=your-server;Database=HospitalDb;User Id=your-user;Password=your-password;"
}
}dotnet ef database updatedotnet buildcd HospitalUi/Hospital_Uinpm install
# or
yarn installUpdate your API base URL in the environment configuration file:
# Create .env.local file
echo VITE_API_URL=http://localhost:5000 > .env.localFrom HospitalApi/HospitalApi directory:
dotnet runThe API will be available at: https://localhost:5001 or http://localhost:5000
From HospitalUi/Hospital_Ui directory:
npm run dev
# or
yarn devThe application will be available at: http://localhost:5173
npm run build
# or
yarn buildThe production build will be in the dist/ folder.
Visit HospitalApi/HospitalApi.http for API endpoint examples, or use Swagger if enabled:
http://localhost:5000/swagger
- appsettings.json - Production settings
- appsettings.Development.json - Development settings (ignored in git)
- .env - Default environment variables
- .env.local - Local overrides (ignored in git)
- Create a feature branch
- Make your changes
- Commit with clear messages
- Push to the branch
- Open a Pull Request
(Add your license here)
- Ensure .NET 8.0+ is installed:
dotnet --version - Check database connection string
- Run
dotnet restoreto restore packages
- Delete
node_modulesandpackage-lock.json, then runnpm install - Clear npm cache:
npm cache clean --force
- 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.