Skip to content

Latest commit

 

History

History
108 lines (72 loc) · 2.56 KB

README.md

File metadata and controls

108 lines (72 loc) · 2.56 KB

GilmoreDevs PetClinic Frontend

Description

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

Personas of the application:

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
Admin
  • Can view/edit all users
  • Can view/edit all pets
  • Can view/edit Vet Clinics
Vet
  • Can edit Vet Clinic information
  • Can add notes to a pet's profile

Tech Stack:

Development

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

Deployment

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.

Variables and Secrets

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.

Tests

The frontend uses Vitest for testing. To run the tests, you can run the following

npm run test

Quality Assurance/Code Style

The frontend uses biome for linting and formatting purposes.

We have a 70% coverage threshold for the tests, which is enforced by the CI.