Skip to content

ev0clu/patient-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

148 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Patient Manager App

A health care full stack CRUD app has built with React Native framework, Nativewind, Express.js, PostgreSQL, Docker and more. The app allows users to log in and book appointment to doctors or delete a previous one. There is an admin part of the application also, where doctors can accept or reject the appointment. Additionally, users can update or remove their appointments.

Login:

Demo video: Link

Features

  • Allow user to sign up and sing in to the platform
  • Only those appointments are visible to users which are created by themself
  • Booked appointment are filtered out from the list, thefore double booking not possible
  • Only authorized users can book new appointment or delete an already exist one
  • Authorized users can see their profile informations
  • Typescript is used on frontend and backend to ensure everyting are type safety
  • React Native is used for frontend
  • NativeWind is used to stlye components
  • Tanstack query is used to communicate with the backend and cache data
  • Express.js is used for backend
  • PostgreSQL is used to store data
  • Docker is used to run database locally
  • JWT is used to handle login and allow access to the platform

How to run from local repository

Docker

Install Docker and Docker compose. Docker desktop automatically installs Docker Compose, but you can install it separately also.

Backend

  1. Clone the repository

  2. Navigate to backend root folder

  3. Create .env file based on the .env.example

  4. Run npm install command in your terminal

  5. Run docker-compose.dev.yml file:

    docker compose --env-file .env -f docker-compose.dev.yml -p patient-manager-dev up -d
    
  6. Run npm run prisma:migrate-dev to migrate and push the schema to database

  7. Run npm run prisma:seed to add admin registration into the database. email: admin@patient.com, password: admin1234

  8. Run npm run dev

  9. Backend server running at http://localhost:5000/

  10. Run npm run prisma:studio if you would like to see the database content

If you want to reset the database run npx prisma db push --force-reset then seed the db again with npm run prisma:seed

How to run backend test

  1. Navigate to backend root folder
  2. Create .env.test file based on the .env.test.example
  3. Run docker-compose.test.yml file from backend root folder:
    docker compose --env-file .env.test -f docker-compose.test.yml -p patient-manager-test up -d
    
  4. Run npm run prisma:push-test to push schema to database
  5. Run npm run test to run unit test

Frontend

  1. Navigate to frontend root folder
  2. Create .env file based on the .env.example
  3. Run npm install command in your terminal
  4. Run npm run start
  5. Frontend server running at http://localhost:8081 or you can use Expo Go if you open the Expo app on your phone and scan the QR code from the terminal

Dependencies

Releases

No releases published

Packages

 
 
 

Contributors