Basic Hospital app to manage patient records. Built with ASP.NET Core (backend) and React.js (frontend). Objective: efficient management of patient records for doctors and easy access to personal records for patients.
The database uses MySQL and to have access to it, just add the properly string connection on the Backend's appsettings file.
- Default Connection String:
"AppDbConnectionString": "server=localhost;database=LifeCare;User=root;Password=root;"
This repository contains usefull components, such as a responsive and customizable table (using pagination), login card, authentication/authorization system role based using .NET and C#
The program creates a default user to have access to it. You can just use "admin"/"admin" to login.
- To run the backend of the aplication, simply run the commands below in the "backend" file. We are using Entity Framework, so first you need to update the database using the command:
dotnet ef update database
Than you can execute:
dotnet build
dotnet run
The backend was built using .NET Core version 7
For unit testing, we used Xunit. You can find the basic controller tests in the "backendTests" folder. To run them, simply open the terminal in the specified folder and execute:
dotnet test
- While running the backend, you can now consume all the API data through the frontend of the application. Go to frontend/lifecare-front folter and just run the following commands:
npm install
npm run dev
Use docker to run the database.
- Go to https://www.docker.com/ and get the latest version of docker
- In the command line you can get the Image of MySQL by just using the command
docker pull mysql
- The next step is to run a container in Docker with the MySQL image. To do this, use the next command (don't forget to change the password for a more safety one):
docker run --name=mysql1 -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root -d mysq
To verify if the container was created and if it's running, you can execute a docker ps (process status) command, just like it follows:
docker ps