Skip to content

Develop to Main. Sprint 2 #54

Merged
merged 135 commits into from
Mar 19, 2026
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
f64ebc4
Delete Classes.
roaraf Feb 24, 2026
ebab1f2
Updated pom.xml
roaraf Feb 24, 2026
4d145ae
Added IKOrganizationScraper class
roaraf Feb 24, 2026
bf7327e
Added Organization class
roaraf Feb 24, 2026
7e7696a
Updated IKOrganizationScraper
roaraf Feb 24, 2026
d6ed083
Updated pom.xml
roaraf Feb 26, 2026
07d0180
Updated IKOrganizationScraper
roaraf Feb 26, 2026
9121be5
Updated IKOrganizationScraper
roaraf Feb 26, 2026
13c07ea
Updated Organization
roaraf Feb 26, 2026
8b7adc2
Added OrganizationTest test class.
roaraf Feb 26, 2026
675612f
Updated pom.xml
roaraf Feb 27, 2026
f26ab51
Added APICharityScraper & APICharityData class.
roaraf Feb 27, 2026
ebe1524
Added APICharityScraperTest test class.
roaraf Feb 27, 2026
f6cfff8
Updated pom.xml.
roaraf Mar 3, 2026
9ebb476
Updated APICharityScraper.
roaraf Mar 3, 2026
61520b0
Updated APICharityScraperTest.
roaraf Mar 3, 2026
0192970
Added APICharityDataTest
roaraf Mar 3, 2026
8b170cf
Updated pom.xml.
roaraf Mar 4, 2026
c0efba4
Updated APICharityScraper.
roaraf Mar 4, 2026
5c8c8a6
Added DatabaseManager class.
roaraf Mar 4, 2026
9cb3206
Updated APICharityData
roaraf Mar 4, 2026
a723ced
Updated APICharityDataTest
roaraf Mar 4, 2026
636351e
Updated APICharityScraper
roaraf Mar 4, 2026
e99d6c7
Updated APICharityScraperTest
roaraf Mar 4, 2026
c6ee1c9
Updated DatabaseManager
roaraf Mar 4, 2026
273d9a5
Updated DatabaseManager
roaraf Mar 4, 2026
3a453b3
Updated pom.xml
roaraf Mar 5, 2026
dce997e
Updated DatabaseManager
roaraf Mar 5, 2026
cf33cfa
Added DatabaseManagerTest
roaraf Mar 5, 2026
cf0dde8
Updated DatabaseManager
roaraf Mar 5, 2026
04558b2
Feat: Gitignore target directory
Mar 5, 2026
1b3bf7e
Merge Conflict Solved?
Mar 5, 2026
22f5f24
Feat: Dedicated Directory
Mar 5, 2026
0d9ba9a
Added donationPage, and frontPage fxml files
robinsp Mar 10, 2026
a97a0a5
Added config to Main to run JavaFX.forntPage, and to pom.xml
robinsp Mar 10, 2026
69dbc74
Merge pull request #43 from cathrkri/feature/javafx-frontpage
robinsp Mar 10, 2026
b24af6c
Added config to pom.xml and main. Also added fxml files for JavaFX
robinsp Mar 10, 2026
b42e3ed
Merge pull request #44 from cathrkri/feature/javafx-frontpage
robinsp Mar 10, 2026
c8f7157
feat: charityPage
Mar 10, 2026
d5c7fd5
Continued working with frontPage
robinsp Mar 10, 2026
e495041
Feat: Moved API-folder seperatly from models folder
Mar 11, 2026
d9173e6
Fix: Updated MySQL createTable Manager to match and implement minaima…
Mar 11, 2026
417567c
Merge branch 'main' of git.ntnu.no:cathrkri/systemutviklingTeam6 into…
Mar 11, 2026
119137c
Fix: Changed package locations for better structure
Mar 11, 2026
0801337
feat: charityPage scene builder
Mar 11, 2026
0e9df82
Feat: APICharityData helps with GETTING data
Mar 11, 2026
6c509f0
Feat: APIScraper can will update the database
Mar 11, 2026
8bce5de
Feat: Seperate File for Database Connection
Mar 11, 2026
609ca49
Feat: Manager can only create tables if needed (for now)
Mar 11, 2026
3f55f66
Feat: DAO data acsess object(s) will help SETTING new data to database
Mar 11, 2026
f4fc2ba
Fix/Feat: Charity class looks very similar to APICharityData, will ke…
Mar 11, 2026
7430108
Fix: Unused Variable in Constructor
Mar 11, 2026
2816849
feat: scene builder update
Mar 11, 2026
55f1423
Fix: Fix search method since is by org_number instead of uuid
Mar 11, 2026
7f022b0
Fix: Fix search method since is by org_number instead of uuid
Mar 11, 2026
2a37af8
Feat: Added a connection check in DatabaseManager
Mar 11, 2026
743573a
Feat: Renamed Main method and added a simple test to getting API info…
Mar 11, 2026
1fdcfec
Feat: Enviroment variables file for developement. Add this file to yo…
Mar 11, 2026
40148b4
update: charityPage
Mar 11, 2026
57879bf
update summary in charityPage
Mar 11, 2026
6a11481
update: charityPage
Mar 11, 2026
bad4e34
Added organizationCard.fxml
robinsp Mar 11, 2026
e641b67
Added FrontpageController, and test data
robinsp Mar 11, 2026
334a7e6
added 3 organisations for testing connections between frontPage and o…
robinsp Mar 11, 2026
579f917
Merge pull request #45 from cathrkri/feature/javafx-frontpage
robinsp Mar 12, 2026
71a57a9
Merge branch 'main' of git.ntnu.no:cathrkri/systemutviklingTeam6 into…
Mar 12, 2026
2fc2a70
Delete: Webscrabing not needed for now.
Mar 12, 2026
9a760f7
Fix: Database Connection works and is connected
Mar 12, 2026
6bd2d64
Feat: Database now contain minimum information (only information prov…
Mar 12, 2026
7aca6b1
Delete: Deleted .env as it's now a static connection.
Mar 12, 2026
0fe1de1
Feat: DatabaseManager is able to Add non-duplicate rows of data from …
Mar 12, 2026
975d8d0
Feat: Api Scraper return CharityRegistry instead of a list of APIobject
Mar 12, 2026
802fa5c
Feat: Charity also includes link, but it's in the description variabl…
Mar 12, 2026
a2438e2
Fix: Apparently org_number isn't unique, added back UUID.
Mar 12, 2026
7cd3fc9
Merge: Commited changed files
Mar 12, 2026
c724664
Fix: Added UUID in table creation
Mar 12, 2026
7a1f261
Test: Fixed some tests.
Mar 12, 2026
a7be88e
Merge branch 'feature/40-mvp-funksjonality-across-sites' into develop
Mar 12, 2026
c16ae20
Fix: Errors after plain merge
Mar 12, 2026
b5bc458
Major Test: Had to edit and/or delete sucesseful unittests. Coverage …
Mar 12, 2026
bfb76dc
Major Test: Actually have to comment out test so i can finally git me…
Mar 12, 2026
cef3db0
update controller and fxml
Mar 12, 2026
00140ae
Merge branch 'feature/charityPage' into develop
Mar 12, 2026
a839f04
Refresh.
Mar 12, 2026
488cae8
Feat: EER-Diagram files added, not in cloud
Mar 12, 2026
38a0e59
Feat: Added a Main and HmHApplication for cleaner launch
Mar 12, 2026
c756c1c
Feat: Added back Roar verify function
Mar 12, 2026
fc85476
Fix: Maven Clean.
Mar 12, 2026
c964292
Feat: DatabaseManager can spew out database data about charities
Mar 12, 2026
5dcffed
Feat: Donation class new contructor for getting info from Database
Mar 12, 2026
8916a37
Feat: DatabaseManager can spew out donation data
Mar 12, 2026
6fc5243
Fix: Maven clean
Mar 12, 2026
dd1e3fa
Fix: Order of Constructor for charity fixed
Mar 12, 2026
6b64e7f
Feat: Added fx:id with variables in the controller and pimped it the …
Mar 12, 2026
aa8363c
Feat: aboutPage.fxml
Mar 13, 2026
6afdd4e
Feat: Frontpage is now 100% navigiaontal on has some working buttons
Mar 13, 2026
5adb369
Feat: Own class for loading scene for better code
Mar 13, 2026
77e5287
Fix: Tweaks on fxmls so that the logo can work as a button
Mar 13, 2026
ab5bacd
Fix: Dynamic-ish loader
Mar 13, 2026
255e786
Feat: Featured charity has working button
Mar 13, 2026
bf10829
Feat: LoaderScene class has better ish dynamic
Mar 13, 2026
b655620
Fix: Replace loaders with new loadscene function
Mar 13, 2026
dcded4b
Feat: CharityPage is working, text black is not working for some reason
Mar 13, 2026
27a25f6
Feat: DonationPageController
Mar 13, 2026
c0679ce
Feat: Replace with new loadscene method
Mar 13, 2026
f43ab2a
Feat: DonationPageController added and developed
Mar 13, 2026
bc65993
Convertet Donate LABEL to Donate BUTTON
Mar 13, 2026
2f4abb0
Fix: Deleted unneeded files (for now)
Mar 13, 2026
44206c0
Feat: Donation Data Acsess Object created
Mar 13, 2026
55644ad
Feat: Added our icon as icon on taskbar and others?
Mar 13, 2026
0c87bda
Fix: Fixed it not being able to be white, now it's black.
Mar 13, 2026
f194033
Feat: JavaDoc for Controllers
Mar 15, 2026
d2f3e7c
Feat: JavaDoc for DonationDAO
Mar 15, 2026
7daf841
Feat: JavaDoc for Database files
Mar 15, 2026
facf2fc
Feat: Updated and added JavaDoc for API object and scraper
Mar 15, 2026
ac74eff
Fix: Small fixes and deleted organizationTest
Mar 15, 2026
3c3035e
Feat: DatabaseConnectionTest implemented
Mar 15, 2026
2318570
Feat> DatbaseManagerTest and DonationTest is refurbisehed
Mar 15, 2026
1e5de29
Fix: No filter in ApiScraperTest
Mar 15, 2026
f5912d9
Fix: ApiScraper Test works
Mar 15, 2026
25b8580
Fix: reinlisted tests and now should be working. Coverage will be don…
Mar 15, 2026
7b84f18
Fix: Duplicate entry fix
Mar 15, 2026
33247b1
Merge branch 'develop' of git.ntnu.no:cathrkri/systemutviklingTeam6 i…
Mar 15, 2026
e0db729
Fix: Package Decloration fix and corrected params
Mar 16, 2026
ccf109b
Feat: Message Class test
Mar 16, 2026
44b90d3
Feat: Inbox Test
Mar 16, 2026
462baf8
Fix: Scraper test
Mar 16, 2026
a180e03
All noteworthy classes have tests.
Mar 16, 2026
033b242
Fix: Donate button works, container was secretly covering it
Mar 16, 2026
b67c102
Fix: Abort button works
Mar 16, 2026
52fb5df
Maven clean.
Mar 16, 2026
0515999
feat: sequenze diagrams added and updatet
Mar 18, 2026
7f0383c
Merge branch 'feature/sequenze' into develop
Mar 18, 2026
cab1907
Merge branch 'main' of git.ntnu.no:cathrkri/systemutviklingTeam6 into…
Mar 19, 2026
6d40316
Merge branch 'develop' of git.ntnu.no:cathrkri/systemutviklingTeam6 i…
Mar 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Adrian
.vscode/
.idea/
helpmehelpapplication/target
.target/
.helpmehelpapplication\target/
.helpmehelpapplication\.idea/
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"java.configuration.updateBuildConfiguration": "interactive"
"java.configuration.updateBuildConfiguration": "interactive",
"java.compile.nullAnalysis.mode": "disabled"
}
Binary file added docs/ER-Diagram v1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/ER-Diagram v2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/ER-DiagramFile.mwb
Binary file not shown.
Binary file added docs/ER-DiagramFile.mwb.bak
Binary file not shown.
31 changes: 31 additions & 0 deletions helpmehelpapplication/Organization_message.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

'https://plantuml.com/sequence-diagram

@startuml
title Messaging between Organisation and User

actor Organisation as Org
actor User
participant "Organization Portal (UI)" as OrgUI
participant "User App (UI)" as UserUI
participant "Messaging Service" as MsgSvc
database "Messages DB" as MsgDB
participant "Notification Service" as Notify

Org -> OrgUI: Write message to user
OrgUI -> MsgSvc: sendMessage(orgId, userId, content)
MsgSvc -> MsgDB: store message
MsgDB --> MsgSvc: stored
MsgSvc -> Notify: notifyUser(userId, "New message")
Notify --> MsgSvc: queued
MsgSvc --> OrgUI: sent OK
OrgUI --> Org: Message sent

User -> UserUI: Open Inbox
UserUI -> MsgSvc: getInbox(userId)
MsgSvc -> MsgDB: fetch messages for userId
MsgDB --> MsgSvc: messages
MsgSvc --> UserUI: messages
UserUI --> User: Display inbox

@enduml
46 changes: 46 additions & 0 deletions helpmehelpapplication/Organization_onboard.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

'https://plantuml.com/sequence-diagram

@startuml
title Organisation onboarding

actor Organisation as Org
participant "Organization Portal (UI)" as UI
participant "Authentication Service" as Auth
participant "Email Service" as Mail
participant "Organisation Service" as OrgSvc
database "Organisation DB" as OrgDB
participant "Payment Provider" as Pay

Org -> UI: Open Organisation Portal Dashboard
UI --> Org: Show portal dashboard

Org -> UI: Register organisation account
UI -> Auth: register(orgEmail, password)
Auth --> UI: accountCreated + verificationToken

Auth -> Mail: sendVerificationEmail(orgEmail, token)
Mail --> Auth: sent

Org -> UI: Click verification link (token)
UI -> Auth: verifyEmail(token)
Auth --> UI: verified OK

Org -> UI: Create organisation profile (name, desc, category, media)
UI -> OrgSvc: createProfile(profileData)
OrgSvc -> OrgDB: insert profile
OrgDB --> OrgSvc: created
OrgSvc --> UI: profileCreated
UI --> Org: Profile created

Org -> UI: Set up payout account
UI -> Pay: createConnectedAccount(orgData)
Pay --> UI: connectedAccountId + status

UI -> OrgSvc: savePayoutAccount(orgId, connectedAccountId)
OrgSvc -> OrgDB: update payout info
OrgDB --> OrgSvc: saved
OrgSvc --> UI: payoutSetupSaved
UI --> Org: Payout setup complete

@enduml
26 changes: 26 additions & 0 deletions helpmehelpapplication/Organization_update_profile.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

'https://plantuml.com/sequence-diagram

@startuml
title Organisation updates profile

actor Organisation as Org
participant "Organization Portal (UI)" as UI
participant "Organisation Service" as OrgSvc
database "Organisation DB" as OrgDB

Org -> UI: Open My Organisation Profile
UI -> OrgSvc: getProfile
OrgSvc -> OrgDB: load profile
OrgDB --> OrgSvc: profile data
OrgSvc --> UI: profile data
UI --> Org: Show profile

Org -> UI: Edit profile fields + upload media
UI -> OrgSvc: updateProfile
OrgSvc -> OrgDB: update profile
OrgDB --> OrgSvc: updated
OrgSvc --> UI: update OK
UI --> Org: Show updated profile

@enduml
36 changes: 36 additions & 0 deletions helpmehelpapplication/User_authenticator.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

'https://plantuml.com/sequence-diagram

@startuml
title User authentication for for signin and Login

actor User
participant "Desktop App (UI)" as UI
participant "Authenticator Service" as Auth
database "User DB" as UDB

User -> UI: Open Dashboard
UI --> User: Show dashboard

User -> UI: Click Login
UI --> User: Show Welcome/Login page

User -> UI: Go to Sign In
UI --> User: Show Sign In form

User -> UI: Submit credentials
UI -> Auth: signIn(email, password)
Auth -> UDB: validate credentials
UDB --> Auth: valid
Auth --> UI: session/token
UI --> User: Logged in (Dashboard updated)

User -> UI: Click "My Profile" (from Dashboard)
UI --> User: Show Profile

User -> UI: Click Logout
UI -> Auth: logout(session)
Auth --> UI: session terminated
UI --> User: Redirect to Dashboard

@enduml
56 changes: 56 additions & 0 deletions helpmehelpapplication/User_browser.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@

'https://plantuml.com/sequence-diagram

@startuml
title User explores organisations

actor User
participant "Desktop App (UI)" as UI
participant "Organisation Service" as OrgSvc
database "Organisation DB" as OrgDB

User -> UI: Open Dashboard
UI --> User: Show dashboard

User -> UI: Click "Browse Organisations"
UI -> OrgSvc: getFeaturedOrgs()
OrgSvc -> OrgDB: query featured orgs
OrgDB --> OrgSvc: org list
OrgSvc --> UI: org list
UI --> User: Show organisations list

alt User chooses Category
User -> UI: Select category
UI -> OrgSvc: getOrgsByCategory(category)
OrgSvc -> OrgDB: query orgs by category
OrgDB --> OrgSvc: results
OrgSvc --> UI: results
UI --> User: Show filtered list
end

alt User uses Filter/Sort
User -> UI: Set filters/sort
UI -> OrgSvc: getOrgsFiltered(filters, sort)
OrgSvc -> OrgDB: query with filters/sort
OrgDB --> OrgSvc: results
OrgSvc --> UI: results
UI --> User: Show filtered list
end

alt User searches from Dashboard or list
User -> UI: Search organisations (query)
UI -> OrgSvc: searchOrgs(query)
OrgSvc -> OrgDB: fulltext/search query
OrgDB --> OrgSvc: results
OrgSvc --> UI: results
UI --> User: Show search results
end

User -> UI: Open organisation page
UI -> OrgSvc: getOrganisationDetails(orgId)
OrgSvc -> OrgDB: load org details
OrgDB --> OrgSvc: org details
OrgSvc --> UI: org details
UI --> User: Show organisation page

@enduml
41 changes: 41 additions & 0 deletions helpmehelpapplication/User_donate.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

'https://plantuml.com/sequence-diagram

@startuml
title User donation

actor User
participant "Desktop App (UI)" as UI
participant "Donation Service" as DonSvc
participant "Payment Provider" as Pay
database "Donation DB" as DonDB
participant "Organisation Service" as OrgSvc

User -> UI: Click "Donate"
UI --> User: Show donation form

User -> UI: Enter amount + confirm
UI -> DonSvc: createDonationIntent(userId, orgId, amount)

DonSvc -> OrgSvc: validateOrganisation(orgId)
OrgSvc --> DonSvc: OK

DonSvc -> Pay: createPaymentIntent(amount)
Pay --> DonSvc: paymentIntentId + clientSecret

DonSvc --> UI: clientSecret
UI -> Pay: Complete payment (clientSecret)
Pay --> UI: Payment success

UI -> DonSvc: confirmDonation(paymentIntentId)
DonSvc -> Pay: verifyPayment(paymentIntentId)
Pay --> DonSvc: verified OK

DonSvc -> DonDB: store donation record
DonDB --> DonSvc: stored

DonSvc --> UI: Donation confirmation
UI --> User: Show "Thank you" + receipt

@enduml

39 changes: 38 additions & 1 deletion helpmehelpapplication/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,43 @@
<artifactId>javafx-controls</artifactId>
<version>25.0.1</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>21</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.41.0</version>
</dependency>
<dependency>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>5.12.0</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.13.2</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.21.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>9.6.0</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>2.4.240</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand All @@ -49,7 +86,7 @@
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.8</version>
<configuration>
<mainClass>ntnu.gruppe21.Main</mainClass>
<mainClass>ntnu.systemutvikling.team6.Main</mainClass>
</configuration>
</plugin>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package ntnu.systemutvikling.team6.DAO;

import java.sql.*;
import java.util.UUID;
import ntnu.systemutvikling.team6.database.DatabaseConnection;
import ntnu.systemutvikling.team6.models.Charity;

/**
* This class is responsible for sending concurrent information about the donation to the Donation
* Database. Usally called from the DonationPageController, where the user confirms their donation.
*/
public class DonationDAO {
private static final DatabaseConnection connection = new DatabaseConnection();

/**
* Gets the total ammount of donations for a given charity, and sends it to the database throught
* MySQL.
*
* @param charity
* @param amount
*/
public static void addDonation(Charity charity, double amount) {
String sql_query =
"""
INSERT INTO Donations (UUID_Donations, amount, date, Charities_UUID_charities)
VALUES (?, ?, ?, ?)
""";
try (Connection conn = connection.getMySqlConnection();
PreparedStatement ps = conn.prepareStatement(sql_query)) {
conn.setAutoCommit(false);

ps.setString(1, UUID.randomUUID().toString());
ps.setDouble(2, amount);
ps.setDate(3, new Date(System.currentTimeMillis()));
ps.setString(4, charity.getUUID().toString());

ps.executeUpdate();
conn.commit();
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
}
Loading