An assignment on extending the vet management system with animal request management.
The workflow is such that the instructor submits a request for an animal, then the admin and technician may approve or reject the request respectively. After approval from both the admin and the technician, the animal is ready to be delivered.
You can assume that there are only 3 types of animals: dogs, cats, and horses, and there are only 8 animals available for each type.
The application has three users as follows:
-
Instructor
- Can request an animal
- Can cancel a request
- Can view available animals
-
Admin
- Can view new requests
- Can Approve a request
- Can reject a request
-
Technician
- Can view new requests
- Can Approve a request
- Can reject a request
-
Instructors can only cancel requests when their request is in "new" or "accepted_by_admin" states.
-
The application must have a backend and frontend, and the API must connect the two.
-
The application must be consistent when two users concurrently change a request state.
-
Every team must commit partially every few hours.
-
Each team must be based on final-project teams.
-
Different roles login with these credentials:
- Instructor_1 with password:
pt@123
- Admin_1 with password:
pa
- Technician with password:
pe
- Instructor_1 with password:
-
Clone the repository to your local machine.
-
Start the MySQL server on your local machine. If you are accessing the MySQL server over a network, edit the property
spring.datasource.url
in the file application.properties and replacelocalhost
with the server IP address. -
Connect to your MySQL server using an admin user like
root
. -
Run the below scripts on the MySQL server in the given order using
root
. These scripts will create a schemavetdb
, a uservetapp
with passwordvetpassword
, create all necessary tables and load them with some dummy data. -
On your machine, navigate to the directory backend. Running the below command will get the backend server running.
$ mvn clean spring-boot:run
-
Navigate to the directory frontend. Running the below commands will get the frontend server running and will launch the browser where you can see the Vet Application home page.
$ npm install $ npm start
-
Once the testing and verification is done, you may remove all the data from your MySQL server using 10_purge.sql.