This project aims to implement a web application for a pharmacy that can be used by both logged-in and non-logged-in users. Logged-in users include pharmacists, customers, and administrators. The basic model is provided below, followed by a description of functionalities, which may include requests for new attributes of certain classes or completely new classes not described in the basic classes at the beginning of the specification.
- Username
- Password
- Email address
- First name
- Last name
- Date of birth
- Address
- Phone number
- Registration date and time (generated by the application)
- Role (pharmacist, customer, or administrator)
- Name (unique identifier)
- Purpose (the purpose of a particular category, e.g., Pain reliever)
- Description
- Company code (unique identifier)
- Company name
- Country of headquarters (three-letter country code, e.g., SRB)
- Name (e.g., Brufen 400mg)
- Code (unique identifier of 14 characters)
- Description
- Contraindications
- Form (syrup, injection, film tablet, capsule)
- Average rating
- Image
- Available quantity in stock
- Price
- Manufacturer (each manufacturer produces one or more medicines, while each medicine has exactly one manufacturer)
- Category (each medicine can have exactly one medicine category, and each category belongs to one or more medicines)
- Discount
- Point count
- Comment text
- Rating (from 1 to 5)
- Date posted
- Comment author (registered user)
- Medicine the comment refers to
- Anonymous (a user can mark the comment as anonymous, and in that case, the comment author is not specified)
A shopping cart object where all selected medicines for purchase are stored. The behavior related to the shopping cart is described below in the specification.
- Registration: Users can register with the system. Non-registered users can access a link on the main page to register.
- Login/Logout: Logged-in users can access their profile page from any page and log out from the system.
- Role Management: Administrators can manage user roles. They can view all users in a table format with their basic information and roles, search users by username and role, and sort users by username and role in ascending or descending order.
- Blocking Users: Administrators can block and unblock users. Blocked users cannot log in to the system.
- View Medicines: The main page displays all available medicines in stock for customers. If a logged-in user is an administrator or pharmacist, they can see all medicines, including those with zero quantity.
- Search and Filter: Users can search for medicines by name, category, price range, and manufacturer. The search does not have to be combined and can work for each parameter separately.
- Sorting: Users can sort medicines by name, category, price, average rating, and other parameters in ascending or descending order.
- View Individual Medicine: Users can view detailed information about a specific medicine, including comments and average rating. If the logged-in user is a pharmacist, they can see purchase requests for that particular medicine if any exist.
- Adding Medicines to Cart: Customers can add medicines to their shopping cart by specifying the desired quantity.
- Wishlist: Customers can add medicines to their wishlist for future purchases.
- Shopping Cart: Users can access a page to view the contents of their shopping cart, modify quantities, remove items, and proceed to checkout.
- Checkout: Customers can complete the purchase by selecting the action to buy the chosen products. The system automatically saves the date and time of the purchase.
- Loyalty Points: Customers earn loyalty points for each purchase, which can be used to obtain discounts. Points are calculated based on the amount spent. Users can use a maximum of 10 points per purchase to receive a discount.
- Commenting: Customers can leave comments and ratings for medicines they have purchased. Both fields (comment and rating) are mandatory. The comment and rating are immediately visible on the medicine's page.
- Average Rating: The average rating of a medicine is updated immediately after receiving a new rating and comment.
- Request Loyalty Card: Users can request the creation of a loyalty card if they do not already possess one. Administrators can approve or reject these requests.
- Loyalty Card Usage: Loyalty cards can be used by customers to accumulate points and receive discounts on purchases.
- Purchase Reports: Administrators can access a special reporting page to view all medicines purchased within a specified date range. The report includes details such as medicine name, manufacturer, quantity purchased, unit price, and total price. The table can be sorted by any column in ascending or descending order. The total number of medicines purchased and the total purchase amount are also displayed.
- Special Discounts: Administrators can define discounts on medicines for special dates. They can specify the start and end dates of the discount period, the discount percentage, and the category of medicines eligible for the discount. Customers cannot use their loyalty points to receive additional discounts during special discount periods.
- Backend: Spring Boot
- Frontend Templating: Thymeleaf
- Database: MySQL
- Additional Concepts: AJAX, jQuery, Fetch for asynchronous operations
- For date and time input, appropriate HTML elements should be used, and the backend should handle them accordingly.
- The project should implement internationalization to support bilingual functionality.
- The backend must follow the MVC pattern, and Thymeleaf must be used for frontend templating.
- The project will be graded based on specified criteria, including additional functionalities and adherence to technology choices and implementation guidelines.