University Project for Drug Delivery
- Java 21
- Download .jar from MedExpress Releases
- Run the jar with the command
java -jar <file>.jar
Below are the test users you can use to access the application:
-
Patient:
- Email:
patient@gmail.com - Password:
Qwertyuiop123.
- Email:
-
Driver:
- Email:
driver@gmail.com - Password:
Qwertyuiop123.
- Email:
-
Doctor:
- Email:
doctor@gmail.com - Password:
Qwertyuiop123.
- Email:
-
Pharmacy 1:
- Email:
pharmacy1@gmail.com - Password:
Qwertyuiop123.
- Email:
-
Pharmacy 2:
- Email:
pharmacy2@gmail.com - Password:
Qwertyuiop123.
- Email:
For a complete overview of the project, you can refer to the detailed documentation available in PDF format:
Detailed Documentation
The Swagger UI is available at the following URL: http://localhost:8080/swagger-ui/index.html
For further reference, please consider the following sections:
- Official Apache Maven documentation
- Spring Boot Maven Plugin Reference Guide
- Create an OCI image
- Spring Web
- Spring Data MongoDB
- WebSocket
- Spring Boot DevTools
The following guides illustrate how to use some features concretely:
- Building a RESTful Web Service
- Serving Web Content with Spring MVC
- Building REST services with Spring
- Accessing Data with MongoDB
- Using WebSocket to build an interactive web application
Due to Maven's design, elements are inherited from the parent POM to the project POM.
While most of the inheritance is fine, it also inherits unwanted elements like <license> and <developers> from the parent.
To prevent this, the project POM contains empty overrides for these elements.
If you manually switch to a different parent and actually want the inheritance, you need to remove those overrides.
- OrderController: Handles requests related to orders. OrderController.java
- AuthController: Manages authentication and authorization requests. AuthController.java
- AIFAController: Handles requests related to drugs. AIFAController.java
- DoctorController: Handles requests related to doctors. DoctorController.java
- DriverController: Handles requests related to drivers. DriverController.java
- PharmacyController: Handles requests related to pharmacies. PharmacyController.java
- SocketIOController: Manages WebSocket connections. SocketIOController.java
- FrontendController: Redirects requests to the frontend. FrontendController.java
- UserService: Provides user-related information. UserService.java
- AIFAService: Retrieves drug information from the AIFA API. AIFAService.java
- IconService: Manages icons. IconService.java
- PharmacyService: Manages pharmacy-related logic. PharmacyService.java
- EncryptionService: Handles password encryption. EncryptionService.java
- OrderService: Responsible for creating
Orderobjects. OrderService.java - IconService: Creates
Iconobjects. IconService.java
- JwtUtil: Focuses exclusively on JWT token management. JwtUtil.java
- JwtFilter: Handles security related to JWT tokens. JwtFilter.java
- UserRepository: Uses the
MongoRepositoryinterface to reduce coupling between the persistence layer and the rest of the application. UserRepository.java - IconRepository: Uses the
MongoRepositoryinterface to manage icons. IconRepository.java
- CustomUserDetails: Implements the
UserDetailsinterface to handle different types of users. CustomUserDetails.java
- JwtFilter: Acts as an intermediary between HTTP requests and authentication logic, delegating token validation to
JwtUtil. JwtFilter.java - SocketIOController: Uses
SocketIOServerto mediate between WebSocket clients and application logic. SocketIOController.java
- MongoRepository: Protects the application from changes in persistence logic by abstracting database operations. UserRepository.java
- JwtUtil: Shields the application from the implementation details of JWT token management. JwtUtil.java
- JwtUtil: A utility class created to handle JWT token logic, not representing a domain concept. JwtUtil.java
- ModelMapperConfig: Provides a singleton configuration for object mapping, unrelated to domain concepts. ModelMapperConfig.java
- Singleton:
- The
ModelMapperConfigclass uses the@Beanannotation to create a singleton instance ofModelMapper. This ensures that only one instance ofModelMapperis created and shared across the application. ModelMapperConfig.java
- The
- Facade:
- The
JwtUtilclass acts as a facade for JWT operations, providing a simplified interface for generating and validating tokens. JwtUtil.java
- The
-
Observer:
- The
SocketIOServerinSocketIOControlleruses event listeners (addConnectListener,addDisconnectListener,addEventListener) which are typical of the Observer pattern, where changes in state are communicated to interested parties. SocketIOController.java
- The
-
Strategy:
- The
Orderclass uses enums likeStatusDoctor,StatusPharmacy, andStatusDriverto define different strategies for handling order statuses. Order.java
- The
- UC1: User Registration - @giovannimirulla
- UC2: Pharmacy Registration - @agatarosselli
- UC3: Search for a drug - @giovannimirulla
- UC4: Order drug - @agatarosselli
- UC5: Request a prescription - @agatarosselli
- UC6: Autorize a prescription - @agatarosselli & @giovannimirulla
- UC7: Communicate authorization status - @agatarosselli & @giovannimirulla
- UC8: Manage evasion and status order registration - @giovannimirulla
- UC9: Take charge of the order - @giovannimirulla
- UC10: Track delivery status - @giovannimirulla
- UC11: Track priority orders - @giovannimirulla
- Home - Search drugs page - @giovannimirulla
- Swagger - @giovannimirulla
- Search drug - @giovannimirulla
- Drug details - @giovannimirulla
- Login - @giovannimirulla
- Sign up pharmacy - @giovannimirulla
- Sign up user - @giovannimirulla
- Order drug - @giovannimirulla
- Dashboard pharmacy - @giovannimirulla
- Dashboard patient - @giovannimirulla
- Dashboard doctor - @giovannimirulla
- Dashboard driver - @giovannimirulla
- Dashboard drugs - @agatarosselli
- Priority - @agatarosselli
- UC1 Test - @mariachiara98
- UC2 Test - @mariachiara98
- UC3 Test - @mariachiara98
- UC4 Test - @mariachiara98
- UC5 Test - @mariachiara98
- UC6 Test - @mariachiara98
- UC7 Test - @mariachiara98
- UC8 Test - @mariachiara98
- UC9 Test - @mariachiara98
- UC10 Test - @mariachiara98
- UC11 Test - @mariachiara98



