Skip to content

Project Structure

Robin Strand Prestmo edited this page Apr 20, 2026 · 2 revisions

Project structure

The project follows a standard Maven directory structure, where source code and test code are separated into src/main and src/test.

The main code is organized into packages based on responsibility, including controller for user interface logic, service for business logic, database for data access, models for domain objects, scraper for external data retrieval, and security for password hashing.

This layered structure improves readability, maintainability, and ensures low coupling between components. The test structure mirrors the main structure, making it easier to systematically test all parts of the system.

src/
├── main/
│   ├── java/
│   │   └── ntnu/systemutvikling/team6/
│   │       ├── controller/           # JavaFX controllers (UI logic & navigation)
│   │       ├── database/             # Database layer (DAO, connection, queries)
│   │       ├── models/               # Domain models and registries
│   │       ├── scraper/              # Fetches external charity data (API/web)
│   │       ├── security/             # Password hashing
│   │       ├── service/              # Business logic between UI and database
│   │       ├── HMHApplication.java   # JavaFX application setup & initialization
│   │       └── Main.java             # Entry point (launches application)
│   └── resources/
│       ├── fxml/                     # UI layout files (JavaFX views)
│       └── images/                   # Images and icons
│
└── test/
    └── java/
        └── ntnu/systemutvikling/team6/
            ├── database/             # Tests for database layer
            ├── models/               # Tests for domain models
            ├── scraper/              # Tests for scraping functionality
            └── security/             # Tests for security components
Clone this wiki locally