This is the frontend of the GilmoreDevs PetClinic project. It is a client for our backend, which is a RESTful API.
The main features of the frontend are:
- Handling user profiles
- Handling pet profiles related to the user
- Handling appointments related to the user
- Can create an account
- Can log in
- Can log out
- Can view their profile
- Can edit their profile
- Can delete their profile
- Can add a pet to their profile
- Can view/edit all users
- Can view/edit all pets
- Can view/edit Vet Clinics
- Can edit Vet Clinic information
- Can add notes to a pet's profile
- React as the main library
- TypeScript for static typing
- Nodejs as the runtime
- Docker for containerization
- Railway for deployment
To run the frontend locally, you need to have Nodejs installed. You can install it from here.
To install the dependencies, you can run the following command:
npm install
To run the frontend locally, you can run the following commands:
npm run dev
This will start the frontend on http://localhost:5713 (if it not running already, otherwise on another port).
Running locally with docker:
docker build -t frontend .
docker run -p 5713:5713 frontend
or with docker-compose in the main project directory:
docker-compose up frontend # or docker-compose up -d for the whole project
The frontend is deployed on Railway to a project called gilmoredevs
, but you
can recreate the deployment anywhere else you want too.
The deployment process is hooked into the main branch, so any changes pushed to the main branch will be automatically deployed.
The frontend uses the following environment variables:
VITE_BACKEND_URL
: The URL of the backend API :warn: Warning: This variable is required for the frontend to work properly. If it is not set, the frontend will not work as expected.
The frontend uses Vitest for testing. To run the tests, you can run the following
npm run test
The frontend uses biome for linting and formatting purposes.
We have a 70% coverage threshold for the tests, which is enforced by the CI.