diff --git a/README.md b/README.md index af2a3dd..4313ac2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Help-Me-Help - IDATT1005 Team 5 Portofolio Project Spring 2026 :octocat: +# Help-Me-Help - IDATT1005 Team 5 Portofolio Project Spring 2026 :octocat: [//]: # (TODO: Fill inn your name and student ID) [//]: # (TODO: Mappe-2025-Marjoni-fj) @@ -14,7 +14,16 @@ ## Project descriptionπ» [//]: # (TODO: Write a short description of your project/product here.) -This Java-based application, developed using Maven... +Help-Me-Help (HmH) is a Java desktop application, developed using Maven, designed to help users donate money to legitimate charitable organizations and emergency relief initiatives. The application fetches verified organization data from Innsamlingskontrollen (IK), a non-profit foundation that verifies fundraising activities. Users can create profiles, track their donation history, and browse organizations by status (approved/pending). The application prioritizes security, data persistence, and an intuitive user experience following Don Norman's interaction design principles. + +## Key Features + +- User authentication and profile management +- Browse verified and pending organizations with descriptions and logos +- Make donations to organizations +- View donation history +- Data persistence using H2 database +- Web scraping of organization information (descriptions, logos) from external sources ## Project structure π @@ -25,19 +34,106 @@ All source files are stored under the `src` directory. ### Main Package Structure (`src/main`)
- +src/main/java/edu/group5/app/ +βββ App.java (JavaFX Application entry point) +| +βββ control/ (Controllers - business logic) +β βββ AuthController.java (User login/signup handling) +β βββ DonationController.java (Donation processing) +β βββ NavigationController.java (Page navigation) +β βββ OrganizationController.java (Organization data access) +| +βββ model/ (Business entities & repositories) +β βββ organization/ +β β βββ Organization.java (Organization entity) +β β βββ OrganizationRepository.java (Data access for organizations) +β β βββ OrganizationService.java (Business logic) +β β βββ OrganizationScraper.java (Web scraping - descriptions & logos) +β βββ user/ +β β βββ User.java (User base class) +β β βββ Customer.java (Customer implementation) +β β βββ UserRepository.java (Data access for users) +β β βββ UserService.java (User authentication & registration) +β βββ donation/ +β β βββ Donation.java (Donation entity) +β β βββ DonationRepository.java (Data access for donations) +β β βββ DonationService.java (Donation processing) +β βββ wrapper/ +β β βββ DbWrapper.java (H2 database connection & operations) +β β βββ OrgApiWrapper.java (Innsamlingskontrollen API client) +β βββ AppState.java (Global application state) +β βββ Repository.java (Base repository interface) +β βββ DBRepository.java (Database repository interface) +| +βββ view/ (JavaFX UI components) +β βββ loginpage/ +β β βββ LoginPageView.java +β β βββ SignUpPageView.java +β β βββ LoginHeader.java +β β βββ loginpage.css +β βββ homepage/ +β β βββ HomePageView.java +β βββ causespage/ +β β βββ CausesPageView.java +β β βββ OrganizationCard.java +β β βββ causespage.css +β βββ organizationpage/ +β β βββ OrganizationPageView.java +β β βββ organizationpage.css +β βββ donationpage/ +β β βββ DonationPageView.java +β β βββ PaymentCompletePageView.java +β β βββ donationpage.css +β βββ userpage/ +β β βββ UserPageView.java +β βββ aboutuspage/ +β β βββ AboutUsView.java +β βββ Header.java +| +βββ utils/ +βββ ParameterValidator.java (Input validation utilities) + +src/main/resources/ +βββ header/ +β βββ images/ +β βββ hmh-logo.png +βββ loginpage/ +β βββ loginpage.css +βββ homepage/ +β βββ homepage.css +βββ causespage/ +β βββ causespage.css +βββ organizationpage/+ [//]: # (TODO: Describe the structure of your project here. How have you used packages in your structure. Where are all sourcefiles stored. Where are all JUnit-test classes stored. etc.) ### π¦ Package Responsibilities -#### Models +#### Models: Business logic and data entities + +- `Organization`: Represents a charity/relief organization with status, logo, description +- `User` & `Customer`: User profiles with authentication +- `Donation`: Records of user donations +- Services and Repositories implement the business logic and data access layers -#### Controller +#### Controller: Bridge between UI and business logic -#### View +- `AuthController`: Handles user login/registration with password hashing (BCrypt) +- `OrganizationController`: Manages organization data retrieval and caching +- `DonationController`: Processes donations and updates user history +- `NavigationController`: Coordinates page navigation -#### Utils +#### View: JavaFX UI components + +- Login/signup pages with form validation +- Organization browsing with filtering (approved/pending) +- Donation flow with payment confirmation +- User profile and donation history + +#### Utils: Helper functions + +- `ParameterValidator`: Validates null, empty, and positive values ### JUnit Tests (`src/test`) @@ -49,9 +145,9 @@ The JUnit tests are stored under `src/test` and mirror the main package structur The project uses the standard Maven directory structure, which ensures: -* clean separation of source and test files -* compatibility with IDEs such as IntelliJ, VS Code, and Eclipse -* maintainability and easy future extensions (e.g., persistence or additional views) +- clean separation of source and test files +- compatibility with IDEs such as IntelliJ, VS Code, and Eclipse +- maintainability and easy future extensions (e.g., persistence or additional views) --- @@ -69,9 +165,10 @@ What is the input and output of the program? What is the expected behaviour of t **Requirements:** -* Java JDK 25 -* Maven -* IDE (Ideally IntelliJ or VSCode with Java Extension Pack) +- Java JDK 25 +- Maven +- IDE (Ideally IntelliJ or VSCode with Java Extension Pack) + **Steps:** 1. **Clone repository** @@ -94,12 +191,18 @@ What is the input and output of the program? What is the expected behaviour of t 5. **Input and Output** -* Input: -* Output: +- Input: User interactions (login, organization selection, donation amount) +- Output: JavaFX UI displaying organizations, user profiles, donation confirmations 1. **Excpected behavior:** The program allows the user to: +