diff --git a/_ressources/UML diagrams/README.md b/_ressources/conception_ressources/README.md similarity index 100% rename from _ressources/UML diagrams/README.md rename to _ressources/conception_ressources/README.md diff --git a/_ressources/conception_ressources/SequenceDiagrams.md b/_ressources/conception_ressources/SequenceDiagrams.md new file mode 100644 index 0000000..bdb732d --- /dev/null +++ b/_ressources/conception_ressources/SequenceDiagrams.md @@ -0,0 +1,81 @@ +# Sequence Diagrams + +## Table of Contents + +### Authentification + +1. [Registration Sequence](#registration-sequence) +2. [Login Sequence](#login-sequence) +3. [Logout Sequence](#logout-sequence) + +### Visitor functions + +1. [Find Trainer Sequence](#find-trainer-sequence) + +### Appointment booking + +1. [Create Appointment Sequence](#create-appointment-sequence) +2. [Read Appointment Sequence](#read-appointment-sequence) +3. [Update Appointment Sequence](#update-appointment-sequence) +4. [Delete Appointment Sequence](#delete-appointment-sequence) + +--- + +## Registration Sequence + +[Back to Top](#table-of-contents) + +![UML Diagram Use Case of PawPlanner](./assets/sequences/register.svg) + + +## Login Sequence + +[Back to Top](#table-of-contents) + +![UML Diagram Use Case of PawPlanner](./assets/sequences/login.svg) + +## Logout Sequence + +[Back to Top](#table-of-contents) + +![UML Diagram Use Case of PawPlanner](./assets/sequences/logout.svg) + +--- +--- + +## Find Trainer Sequence + +[Back to Top](#table-of-contents) + +![UML Diagram Use Case of PawPlanner](./assets/sequences/findTrainer.svg) + + +--- +--- + + +## Create Appointment Sequence + +[Back to Top](#table-of-contents) + +![UML Diagram Use Case of PawPlanner](./assets/sequences/createEvent.svg) + +## Read Appointment Sequence + +[Back to Top](#table-of-contents) + +![UML Diagram Use Case of PawPlanner](./assets/sequences/readEventsByTrainerId.svg) + +## Update Appointment Sequence + +[Back to Top](#table-of-contents) + +![UML Diagram Use Case of PawPlanner](./assets/sequences/updateEvent.svg) + +## Delete Appointment Sequence + +[Back to Top](#table-of-contents) + +![UML Diagram Use Case of PawPlanner](./assets/sequences/deleteEvent.svg) + + diff --git a/_ressources/conception_ressources/assets/sequences/createEvent.svg b/_ressources/conception_ressources/assets/sequences/createEvent.svg new file mode 100644 index 0000000..d24eb55 --- /dev/null +++ b/_ressources/conception_ressources/assets/sequences/createEvent.svg @@ -0,0 +1,3 @@ + + +
alt
alt
Trainer
Tra...
Web site
Web site
Select date , time and service
Select date , time and service
Web server
Web server
Send confirmation
Send confirmation
Create Event
Create Event
Database
Database
formData(event)
formData(event)
checkAvailability({date,time)}
checkAvailability({date,time)}
[ Slot available ]
[ Slot available ]
Event confirmed
Event confirmed
Slot is available
Slot is available
create({event})
create({event})
[ Slot unavailable ]
[ Slot unavailable ]
Slot is taken
Slot is taken
Error: Slot unavailable
Error: Slot unavailable
\ No newline at end of file diff --git a/_ressources/conception_ressources/assets/sequences/deleteEvent.svg b/_ressources/conception_ressources/assets/sequences/deleteEvent.svg new file mode 100644 index 0000000..f2c9587 --- /dev/null +++ b/_ressources/conception_ressources/assets/sequences/deleteEvent.svg @@ -0,0 +1,3 @@ + + +
alt
alt
Trainer
Tra...
Web site
Web site
Confirm deletion
Confirm deletion
Select an event to delete
Select an event to delete
Web server
Web server
Delete event
Delete event
Database
Database
deleteEvent({event.id})
deleteEvent({event.id})
deleteEvent({event.id})
deleteEvent({event.id})
 [ Confirmation ]
 [ Confirmation ]
Event deleted
Event deleted
 [ Cancellation ]
 [ Cancellation ]
Display succes message
Display succes message
Deletion canceled
Deletion canceled
Send confirmation
Send confirmation
\ No newline at end of file diff --git a/_ressources/conception_ressources/assets/sequences/findTrainer.svg b/_ressources/conception_ressources/assets/sequences/findTrainer.svg new file mode 100644 index 0000000..2814f4b --- /dev/null +++ b/_ressources/conception_ressources/assets/sequences/findTrainer.svg @@ -0,0 +1,3 @@ + + +
alt
alt
User / Owner
Use...
Web site
Web site
Return filtered trainer list
Return filtered trainer list
Search dog trainer request
Search dog trainer request
Web server
Web server
Find Trainer
Find Trainer
Database
Database
search({query})
search({query})
findTrainerByQuery({query})
findTrainerByQuery({query})
[ Trainers found ]
[ Trainers found ]
Empty array
Empty array
Message : No trainers found
Message : No trainers found
[ Trainers not found ]
[ Trainers not found ]
List of trainers ([trainers])
List of trainers ([trainers])
\ No newline at end of file diff --git a/_ressources/conception_ressources/assets/sequences/login.svg b/_ressources/conception_ressources/assets/sequences/login.svg new file mode 100644 index 0000000..85290c1 --- /dev/null +++ b/_ressources/conception_ressources/assets/sequences/login.svg @@ -0,0 +1,3 @@ + + +
alt
alt
User
User
Web site
Web site
Login Form
Login Form
Web server
Web server
True
True
Login
Login
Database
Database
formData({credentials})
formData({credentials})
check if User already exist
check if User already exist
[ User already exist]
[ User already exist]
[ User does not exist ]
[ User does not exist ]
False
False
Account not found ( Error )
Account not found ( Error )
login({credentials})
login({credentials})
Credentials match
Credentials match
Login completed
Login completed
Send JWT token
Send JWT token
\ No newline at end of file diff --git a/_ressources/conception_ressources/assets/sequences/logout.svg b/_ressources/conception_ressources/assets/sequences/logout.svg new file mode 100644 index 0000000..dd499ec --- /dev/null +++ b/_ressources/conception_ressources/assets/sequences/logout.svg @@ -0,0 +1,3 @@ + + +
Trainer/Owner
Tra...
Web site
Web site
Clear JWT token
Clear JWT token
Logout Request
Logout Request
Web server
Web server
Logout completed
Logout completed
Logout
Logout
Logout()
Logout()
\ No newline at end of file diff --git a/_ressources/conception_ressources/assets/sequences/readEventsByTrainerId.svg b/_ressources/conception_ressources/assets/sequences/readEventsByTrainerId.svg new file mode 100644 index 0000000..5f3038a --- /dev/null +++ b/_ressources/conception_ressources/assets/sequences/readEventsByTrainerId.svg @@ -0,0 +1,3 @@ + + +
alt
alt
Owner
Own...
Web site
Web site
Request to view events
Request to view events
Web server
Web server
Read all events from trainer.id
Read all events fro...
Database
Database
getEvents(Trainer.id)
getEvents(Trainer.id)
read(Trainer.id)
read(Trainer.id)
[ Event found ]
[ Event found ]
List of events ([events])
List of events ([events])
[ No event found ]
[ No event found ]
Empty array
Empty array
Message: no events available
Message: no events available
Return events list
Return events list
\ No newline at end of file diff --git a/_ressources/conception_ressources/assets/sequences/register.svg b/_ressources/conception_ressources/assets/sequences/register.svg new file mode 100644 index 0000000..8fd73bb --- /dev/null +++ b/_ressources/conception_ressources/assets/sequences/register.svg @@ -0,0 +1,3 @@ + + +
alt
alt
User
User
Web site
Web site
Register Form
Register Form
Web server
Web server
Register
Register
Database
Database
formData({credentials})
formData({credentials})
check if User already exist
check if User already exist
[ User already exist]
[ User already exist]
True
True
User already registered ( Error )
User already registered ( Error )
[ User does not exist ]
[ User does not exist ]
False
False
register({credentials})
register({credentials})
Confirm registration
Confirm registration
Registration completed
Registration completed
\ No newline at end of file diff --git a/_ressources/conception_ressources/assets/sequences/updateEvent.svg b/_ressources/conception_ressources/assets/sequences/updateEvent.svg new file mode 100644 index 0000000..1a6b9b8 --- /dev/null +++ b/_ressources/conception_ressources/assets/sequences/updateEvent.svg @@ -0,0 +1,3 @@ + + +
Modify event information
Modify event information
alt
alt
Trainer
Tra...
Web site
Web site
Display current event details
Display current event details
Select date , time and service
Select date , time and service
Web server
Web server
Send confirmation
Send confirmation
Update event
Update event
Database
Database
putEvent(event)
putEvent(event)
checkAvailability({id})
checkAvailability({id})
[ Event found ]
[ Event found ]
Event updated
Event updated
Found event
Found event
update({event})
update({event})
[ Event not found ]
[ Event not found ]
Event not found
Event not found
Error: Event does not exist
Error: Event does not exist
\ No newline at end of file diff --git a/_ressources/UML diagrams/class.drawio.png b/_ressources/conception_ressources/class.drawio.png similarity index 100% rename from _ressources/UML diagrams/class.drawio.png rename to _ressources/conception_ressources/class.drawio.png diff --git a/_ressources/UML diagrams/diagramUseCase.md b/_ressources/conception_ressources/diagramUseCase.md similarity index 79% rename from _ressources/UML diagrams/diagramUseCase.md rename to _ressources/conception_ressources/diagramUseCase.md index ae6772c..a414e03 100644 --- a/_ressources/UML diagrams/diagramUseCase.md +++ b/_ressources/conception_ressources/diagramUseCase.md @@ -2,4 +2,4 @@ ##### The UML Use Case diagram for PawPlanner illustrates the interactions between trainer(s) and the app to schedule services, manage timetables, and allow owner to sign up for activities. -![UML Diagram Use Case of PawPlanner](image.png) \ No newline at end of file +![UML Diagram Use Case of PawPlanner](./useCase.png) \ No newline at end of file diff --git a/_ressources/UML diagrams/image.png b/_ressources/conception_ressources/useCase.png similarity index 100% rename from _ressources/UML diagrams/image.png rename to _ressources/conception_ressources/useCase.png diff --git a/server/package.json b/server/package.json index 554451b..010e550 100644 --- a/server/package.json +++ b/server/package.json @@ -5,7 +5,9 @@ "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "start": "ts-node-dev --respawn ./src/index.ts" + "start": "ts-node-dev --respawn ./src/index.ts", + "lint": "../node_modules/@biomejs/biome/bin/biome lint --write ./src", + "format": "../node_modules/@biomejs/biome/bin/biome format --write ./src" }, "keywords": [], "author": "",