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.
- Admin:
- email: admin@patient.com
- password: admin1234
- User:
- email: test@example.com
- password: 1234
Demo video: Link
- 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
Install Docker and Docker compose. Docker desktop automatically installs Docker Compose, but you can install it separately also.
-
Clone the repository
-
Navigate to backend root folder
-
Create .env file based on the .env.example
-
Run
npm installcommand in your terminal -
Run docker-compose.dev.yml file:
docker compose --env-file .env -f docker-compose.dev.yml -p patient-manager-dev up -d -
Run
npm run prisma:migrate-devto migrate and push the schema to database -
Run
npm run prisma:seedto add admin registration into the database. email:admin@patient.com, password:admin1234 -
Run
npm run dev -
Backend server running at
http://localhost:5000/ -
Run
npm run prisma:studioif 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
- Navigate to backend root folder
- Create .env.test file based on the .env.test.example
- 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 - Run
npm run prisma:push-testto push schema to database - Run
npm run testto run unit test
- Navigate to frontend root folder
- Create .env file based on the .env.example
- Run
npm installcommand in your terminal - Run
npm run start - Frontend server running at
http://localhost:8081or you can use Expo Go if you open the Expo app on your phone and scan the QR code from the terminal