Skip to content

Project structure

Fredrik Jonathan Marjoni edited this page Apr 21, 2026 · 2 revisions
Help-Me-Help/
│
├── ROOT CONFIGURATION FILES
│   ├── pom.xml                              Maven build config (JUnit, JavaFX, Jackson, JSoup, H2, Spring Security)
│   ├── README.md                            Project documentation (Getting started, structure, references)
│   ├── .gitignore                           Git ignore rules
│   ├── google_checks.xml                    Checkstyle code quality rules
│   ├── dependency-reduced-pom.xml           Auto-generated Maven file
│   ├── help-me-help.mv.db                   H2 database (runtime created)
│   └── help-me-help.trace.db                H2 database trace logs
│
├── .github/                                 GitHub Configuration
│   ├── workflows/
│   │   └── main.yaml                        CI/CD Pipeline (Build, Test, Package jobs)
│   └── java-upgrade/                        Java upgrade tracking hooks
│       └── hooks/scripts/
│           ├── recordToolUse.ps1            PowerShell tracking script
│           └── recordToolUse.sh             Bash tracking script
│
├── .idea/                                   IntelliJ IDE Configuration
│   ├── checkstyle-idea.xml                  Checkstyle settings
│   ├── compiler.xml                         Compiler settings (Java 25)
│   ├── encodings.xml                        UTF-8 encoding config
│   ├── jarRepositories.xml                  Maven repositories
│   ├── misc.xml                             SDK configuration
│   ├── vcs.xml                              Version control settings
│   └── workspace.xml                        IDE workspace state
│
├── .vscode/                                 VSCode Configuration
│   └── settings.json                        Editor settings
│
├── target/                                  Build Artifacts (Generated, NOT in Git)
│   ├── classes/                             Compiled .class files & resources
│   ├── test-classes/                        Compiled test .class files
│   ├── surefire-reports/                    JUnit test result reports (XML)
│   ├── generated-sources/                   Generated source code
│   ├── generated-test-sources/              Generated test source code
│   └── maven-status/                        Maven compilation metadata
│
└── src/                                     SOURCE CODE
    │
    ├── main/
    │   ├── java/edu/group5/app/             APPLICATION SOURCE CODE (35 files, 4,186 LOC)
    │   │   │
    │   │   ├── App.java                     JavaFX Application entry point
    │   │   │                                  - Initializes all dependencies
    │   │   │                                  - Sets up database and API connections
    │   │   │                                  - Launches UI
    │   │   │
    │   │   ├── control/                     CONTROLLERS (4 files)
    │   │   │   ├── NavigationController.java Main navigation & page routing (8 page views)
    │   │   │   ├── AuthController.java      User login/signup/logout handling
    │   │   │   ├── DonationController.java  Donation processing & history
    │   │   │   └── OrganizationController.java Organization data retrieval & filtering
    │   │   │
    │   │   ├── model/                       BUSINESS LOGIC LAYER (15 files)
    │   │   │   ├── AppState.java            Global application state (current user, org, donation)
    │   │   │   ├── Repository.java          Generic base repository interface
    │   │   │   ├── DBRepository.java        Database repository base interface
    │   │   │   │
    │   │   │   ├── donation/                Donation domain (3 files)
    │   │   │   │   ├── Donation.java        Record entity (donationId, userId, orgId, amount, date, paymentMethod)
    │   │   │   │   ├── DonationRepository.java Data access layer (CRUD, filtering, sorting)
    │   │   │   │   └── DonationService.java Business logic layer (donation processing)
    │   │   │   │
    │   │   │   ├── organization/            Organization domain (4 files)
    │   │   │   │   ├── Organization.java    Record entity (orgNumber, name, trusted, url, description, logoUrl)
    │   │   │   │   ├── OrganizationRepository.java Data access layer (CRUD, filtering by status)
    │   │   │   │   ├── OrganizationService.java Business logic layer (org retrieval with logos)
    │   │   │   │   └── OrganizationScraper.java Web scraping layer (fetch descriptions & logos)
    │   │   │   │       - fetchDescription(url) → parseDescription(Document)
    │   │   │   │       - fetchLogoUrl(url) → parseLogoUrl(Document)
    │   │   │   │       - ConcurrentHashMap caching for performance
    │   │   │   │
    │   │   │   ├── user/                    User domain (4 files)
    │   │   │   │   ├── User.java            Abstract base class (userId, name, email, passwordHash)
    │   │   │   │   ├── Customer.java        Extends User (customer-specific preferences)
    │   │   │   │   ├── UserRepository.java  Data access layer (authentication, user lookup)
    │   │   │   │   └── UserService.java     Business logic (registration with BCrypt hashing)
    │   │   │   │
    │   │   │   └── wrapper/                 External API Integration (3 files)
    │   │   │       ├── Wrapper.java         Abstract base wrapper interface
    │   │   │       ├── DbWrapper.java       H2 database operations (JDBC connections)
    │   │   │       └── OrgApiWrapper.java   Innsamlingskontrollen API client (HTTP/JSON)
    │   │   │
    │   │   ├── view/                        JAVAFX UI LAYER (9 files)
    │   │   │   ├── Header.java              Common header component (logo, nav, profile)
    │   │   │   │
    │   │   │   ├── loginpage/               Authentication UI (3 files)
    │   │   │   │   ├── LoginPageView.java   Login form with email/password
    │   │   │   │   ├── LoginHeader.java     Login page specific header
    │   │   │   │   └── SignUpPageView.java  Registration form with validation
    │   │   │   │
    │   │   │   ├── homepage/                Dashboard (1 file)
    │   │   │   │   └── HomePageView.java    Main landing page after login
    │   │   │   │
    │   │   │   ├── causespage/              Organization Browsing (2 files)
    │   │   │   │   ├── CausesPageView.java  Organization list with search/filter
    │   │   │   │   └── OrganizationCard.java Reusable org card component
    │   │   │   │
    │   │   │   ├── organizationpage/        Organization Details (1 file)
    │   │   │   │   └── OrganizationPageView.java Full org info + logo + description
    │   │   │   │
    │   │   │   ├── donationpage/            Donation Flow (2 files)
    │   │   │   │   ├── DonationPageView.java Donation form (amount, payment method)
    │   │   │   │   └── PaymentCompletePageView.java Confirmation page
    │   │   │   │
    │   │   │   ├── aboutuspage/             About Page (1 file)
    │   │   │   │   └── AboutUsView.java     Project information & team
    │   │   │   │
    │   │   │   └── userpage/                User Profile (1 file)
    │   │   │       └── UserPageView.java    User info + donation history
    │   │   │
    │   │   └── utils/                       UTILITIES (1 file)
    │   │       └── ParameterValidator.java  Static validation methods
    │   │           - objectChecker() - null validation
    │   │           - stringChecker() - empty/null string validation
    │   │           - intChecker() - positive integer validation
    │   │
    │   └── resources/                       UI & DATA ASSETS (22 files)
    │       ├── init.sql                     Database schema initialization
    │       ├── test_init.sql                Test database setup
    │       │
    │       ├── header/                      Header component styling & assets
    │       │   ├── header.css               Navigation styling
    │       │   └── images/
    │       │       ├── hmh-logo.png         Application logo
    │       │       └── avatar.png           User avatar icon
    │       │
    │       ├── loginpage/                   Authentication UI styling
    │       │   ├── login.css                Login form styling
    │       │   ├── signup.css               Registration form styling
    │       │   ├── login-image.jpg          Login page background image
    │       │   └── signup-image.png         Signup page background image
    │       │
    │       ├── homepage/                    Home page styling
    │       │   ├── homepage.css             Landing page styling
    │       │   └── images/
    │       │       └── charityimage.jpg     Hero image
    │       │
    │       ├── causespage/                  Organization listing styling
    │       │   ├── browsepage.css           Browse page styling
    │       │   ├── browse_org.css           Organization card styling
    │       │   └── images/
    │       │       ├── children_of_shambala.png Sample org logo
    │       │       └── kfum_kfum_global.png Sample org logo
    │       │
    │       ├── organizationpage/            Organization details styling
    │       │   └── organizationpage.css     Org page styling
    │       │
    │       ├── donationpage/                Donation flow styling
    │       │   ├── donation.css             Donation form styling
    │       │   ├── paymentcomplete.css      Confirmation page styling
    │       │   └── Payment Complete.png    Confirmation icon
    │       │
    │       ├── userpage/                    User profile styling
    │       │   ├── userpage.css             Profile page styling
    │       │   └── account_circle.png       Account icon
    │       │
    │       └── verified_check.png           Verified organization icon
    │
    └── test/                                TEST SUITE (16 files, 2,050 LOC, 86%+ coverage)
        └── java/edu/group5/app/
            │
            ├── AppTest.java                 Application initialization tests
            │
            ├── model/                       DOMAIN LOGIC TESTS
            │   ├── donation/                Donation domain tests (3 files)
            │   │   ├── DonationTest.java    Entity tests
            │   │   ├── DonationRepositoryTest.java CRUD & filtering tests
            │   │   └── DonationServiceTest.java Business logic tests
            │   │
            │   ├── organization/            Organization domain tests (4 files)
            │   │   ├── OrganizationTest.java Entity tests
            │   │   ├── OrganizationRepositoryTest.java CRUD & filtering tests
            │   │   ├── OrganizationServiceTest.java Business logic tests
            │   │   └── OrganizationScraperTest.java Web scraping tests (86% coverage)
            │   │       - Null/blank URL tests
            │   │       - Invalid URL error handling
            │   │       - Cache verification
            │   │
            │   ├── user/                    User domain tests (3 files)
            │   │   ├── UserServiceTest.java Login/registration/validation tests
            │   │   ├── UserRepositoryTest.java CRUD & email lookup tests
            │   │   └── CustomerTest.java    Customer entity tests
            │   │
            │   └── wrapper/                 External integration tests (3 files)
            │       ├── DbWrapperDonationsTest.java Database operations (donations)
            │       ├── DbWrapperUserTest.java Database operations (users)
            │       └── OrgApiWrapperTest.java API client tests
            │
            ├── utils/                       UTILITY TESTS (1 file)
            │   └── ParameterValidatorTest.java Validation logic tests
            │
            └── view/                        UI TESTS (1 file)
                └── ViewTest.java            JavaFX component tests
***