# ivoffade/find-the-d architecture

> Architecture diagram of the GitHub repository ivoffade/find-the-d, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ivoffade/find-the-d
- Repository: https://github.com/ivoffade/find-the-d

## Overview

Find The D is a Java Swing dorm-finding and management application for tenants and landlords. The tenant workflow is sign in, discover and compare listings, mark interest, apply, then manage an accepted residence; landlords create and maintain listings, review applications, publish announcements, and read complaints. The graph separates desktop UI, service workflows, domain models, and persistence/integrations. Some service and screen details are unsampled, so links rely on the README or SOURCE INDEX where available; uncertain relationships are omitted.

Main entry points: [`src/service/DormService.java`](https://github.com/ivoffade/find-the-d/blob/main/src/service/DormService.java) (Dorm operations), [`src/util/DatabaseConnection.java`](https://github.com/ivoffade/find-the-d/blob/main/src/util/DatabaseConnection.java) (Database connection), [`src/service/ListingService.java`](https://github.com/ivoffade/find-the-d/blob/main/src/service/ListingService.java) (Listing management), [`src/service/NearbyEstablishmentService.java`](https://github.com/ivoffade/find-the-d/blob/main/src/service/NearbyEstablishmentService.java) (Nearby places)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop interface"]
  node_entry["Application entry<br/>[FindTheDUI.java]"]
  node_authui["Welcome and login<br/>[LoginWindow.java]"]
  node_tenantui["Tenant dashboard"]
  node_landlordui["Landlord dashboard"]
  node_listingcard["Listing cards<br/>[DormPostCard.java]"]
  node_dialog["Shared dialogs<br/>[RoundedDialog.java]"]
  node_background["Shared backgrounds"]
end

subgraph group_workflows["Business workflows"]
  node_auth["Authentication<br/>[AuthService.java]"]
  node_dormflow["Dorm operations<br/>[DormService.java]"]
  node_listing["Listing management"]
  node_review["Application review"]
  node_announcements["Announcements"]
  node_complaints["Complaints"]
  node_nearby["Nearby places"]
  node_validation["Input validation<br/>[Validator.java]"]
end

subgraph group_domain["Domain model"]
  node_dormmodel["Dorm and details<br/>[Dorm.java]"]
  node_tenantmodel["Tenant<br/>[Tenant.java]"]
  node_landlordmodel["Landlord<br/>[Landlord.java]"]
  node_applicationmodel["Application<br/>[Application.java]"]
  node_announcementmodel["Announcement<br/>[Announcement.java]"]
  node_establishment["Nearby establishment<br/>[Establishment.java]"]
end

subgraph group_persistence["Persistence and integrations"]
  node_dormrepo["Dorm persistence"]
  node_tenantrepo["Tenant persistence"]
  node_apprepo["Application persistence"]
  node_announcementrepo["Announcement persistence"]
  node_complaintrepo["Complaint persistence"]
  node_databaseconn["Database connection"]
end

node_user(("Tenant or landlord"))
node_postgres[("PostgreSQL")]
node_geo["Geoapify service"]

node_user -->|"starts app"| node_entry
node_entry -->|"opens screens"| node_authui
node_authui -->|"signs in"| node_auth
node_tenantui -->|"requests dorm actions"| node_dormflow
node_landlordui -->|"requests management"| node_dormflow
node_listingcard -->|"loads listing data"| node_dormflow
node_dormflow -->|"delegates listings"| node_listing
node_dormflow -.->|"handles applications"| node_review
node_dormflow -.->|"handles announcements"| node_announcements
node_dormflow -->|"handles complaints"| node_complaints
node_listing -->|"finds nearby places"| node_nearby
node_nearby -.->|"queries places"| node_geo
node_dormflow -->|"persists dorms"| node_dormrepo
node_dormflow -.->|"loads tenant data"| node_tenantrepo
node_review -->|"stores applications"| node_apprepo
node_announcements -->|"stores announcements"| node_announcementrepo
node_complaints -->|"stores complaints"| node_complaintrepo
node_dormrepo -->|"opens connection"| node_databaseconn
node_tenantrepo -->|"opens connection"| node_databaseconn
node_apprepo -->|"opens connection"| node_databaseconn
node_announcementrepo -->|"opens connection"| node_databaseconn
node_complaintrepo -->|"opens connection"| node_databaseconn
node_databaseconn -->|"connects to"| node_postgres
node_dormflow -->|"validates input"| node_validation
node_dormrepo -->|"loads listings"| node_dormmodel
node_tenantrepo -->|"loads tenants"| node_tenantmodel
node_apprepo -->|"stores applications"| node_applicationmodel
node_announcementrepo -->|"stores announcements"| node_announcementmodel
node_listing -->|"builds listings"| node_dormmodel
node_nearby -->|"creates place records"| node_establishment
node_listingcard -->|"uses background"| node_background
node_tenantui -->|"uses dialogs"| node_dialog
node_landlordui -->|"uses dialogs"| node_dialog

click node_entry "https://github.com/ivoffade/find-the-d/blob/main/src/ui/FindTheDUI.java"
click node_authui "https://github.com/ivoffade/find-the-d/blob/main/src/ui/screens/LoginWindow.java"
click node_tenantui "https://github.com/ivoffade/find-the-d/blob/main/src/ui/tenant/TenantDashboard.java"
click node_landlordui "https://github.com/ivoffade/find-the-d/blob/main/src/ui/landlord/LandlordDashboard.java"
click node_listingcard "https://github.com/ivoffade/find-the-d/blob/main/src/ui/components/DormPostCard.java"
click node_dialog "https://github.com/ivoffade/find-the-d/blob/main/src/ui/components/RoundedDialog.java"
click node_background "https://github.com/ivoffade/find-the-d/blob/main/src/ui/components/GradientBackground.java"
click node_auth "https://github.com/ivoffade/find-the-d/blob/main/src/service/AuthService.java"
click node_dormflow "https://github.com/ivoffade/find-the-d/blob/main/src/service/DormService.java"
click node_listing "https://github.com/ivoffade/find-the-d/blob/main/src/service/ListingService.java"
click node_review "https://github.com/ivoffade/find-the-d/blob/main/src/service/ApplicationReviewService.java"
click node_announcements "https://github.com/ivoffade/find-the-d/blob/main/src/service/AnnouncementService.java"
click node_complaints "https://github.com/ivoffade/find-the-d/blob/main/src/service/ComplaintService.java"
click node_nearby "https://github.com/ivoffade/find-the-d/blob/main/src/service/NearbyEstablishmentService.java"
click node_validation "https://github.com/ivoffade/find-the-d/blob/main/src/util/Validator.java"
click node_dormmodel "https://github.com/ivoffade/find-the-d/blob/main/src/model/Dorm.java"
click node_tenantmodel "https://github.com/ivoffade/find-the-d/blob/main/src/model/Tenant.java"
click node_landlordmodel "https://github.com/ivoffade/find-the-d/blob/main/src/model/Landlord.java"
click node_applicationmodel "https://github.com/ivoffade/find-the-d/blob/main/src/model/Application.java"
click node_announcementmodel "https://github.com/ivoffade/find-the-d/blob/main/src/model/Announcement.java"
click node_establishment "https://github.com/ivoffade/find-the-d/blob/main/src/model/Establishment.java"
click node_dormrepo "https://github.com/ivoffade/find-the-d/blob/main/src/repository/DormRepository.java"
click node_tenantrepo "https://github.com/ivoffade/find-the-d/blob/main/src/repository/TenantRepository.java"
click node_apprepo "https://github.com/ivoffade/find-the-d/blob/main/src/repository/ApplicationRepository.java"
click node_announcementrepo "https://github.com/ivoffade/find-the-d/blob/main/src/repository/AnnouncementRepository.java"
click node_complaintrepo "https://github.com/ivoffade/find-the-d/blob/main/src/repository/ComplaintRepository.java"
click node_databaseconn "https://github.com/ivoffade/find-the-d/blob/main/src/util/DatabaseConnection.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_authui,node_tenantui,node_landlordui,node_listingcard,node_dialog,node_background toneBlue
class node_auth,node_dormflow,node_listing,node_review,node_announcements,node_complaints,node_nearby,node_validation,node_postgres toneAmber
class node_dormmodel,node_tenantmodel,node_landlordmodel,node_applicationmodel,node_announcementmodel,node_establishment,node_geo toneMint
class node_dormrepo,node_tenantrepo,node_apprepo,node_announcementrepo,node_complaintrepo,node_databaseconn toneRose
class node_user toneIndigo
```

## Components

### Desktop interface

- [Application entry](https://github.com/ivoffade/find-the-d/blob/main/src/ui/FindTheDUI.java): `src/ui/FindTheDUI.java`
- [Welcome and login](https://github.com/ivoffade/find-the-d/blob/main/src/ui/screens/LoginWindow.java): `src/ui/screens/LoginWindow.java`
- [Tenant dashboard](https://github.com/ivoffade/find-the-d/blob/main/src/ui/tenant/TenantDashboard.java): `src/ui/tenant/TenantDashboard.java`
- [Landlord dashboard](https://github.com/ivoffade/find-the-d/blob/main/src/ui/landlord/LandlordDashboard.java): `src/ui/landlord/LandlordDashboard.java`
- [Listing cards](https://github.com/ivoffade/find-the-d/blob/main/src/ui/components/DormPostCard.java): `src/ui/components/DormPostCard.java`
- [Shared dialogs](https://github.com/ivoffade/find-the-d/blob/main/src/ui/components/RoundedDialog.java): `src/ui/components/RoundedDialog.java`
- [Shared backgrounds](https://github.com/ivoffade/find-the-d/blob/main/src/ui/components/GradientBackground.java): `src/ui/components/GradientBackground.java`

### Business workflows

- [Authentication](https://github.com/ivoffade/find-the-d/blob/main/src/service/AuthService.java): `src/service/AuthService.java`
- [Dorm operations](https://github.com/ivoffade/find-the-d/blob/main/src/service/DormService.java): `src/service/DormService.java`
- [Listing management](https://github.com/ivoffade/find-the-d/blob/main/src/service/ListingService.java): `src/service/ListingService.java`
- [Application review](https://github.com/ivoffade/find-the-d/blob/main/src/service/ApplicationReviewService.java): `src/service/ApplicationReviewService.java`
- [Announcements](https://github.com/ivoffade/find-the-d/blob/main/src/service/AnnouncementService.java): `src/service/AnnouncementService.java`
- [Complaints](https://github.com/ivoffade/find-the-d/blob/main/src/service/ComplaintService.java): `src/service/ComplaintService.java`
- [Nearby places](https://github.com/ivoffade/find-the-d/blob/main/src/service/NearbyEstablishmentService.java): `src/service/NearbyEstablishmentService.java`
- [Input validation](https://github.com/ivoffade/find-the-d/blob/main/src/util/Validator.java): `src/util/Validator.java`

### Domain model

- [Dorm and details](https://github.com/ivoffade/find-the-d/blob/main/src/model/Dorm.java): `src/model/Dorm.java`
- [Tenant](https://github.com/ivoffade/find-the-d/blob/main/src/model/Tenant.java): `src/model/Tenant.java`
- [Landlord](https://github.com/ivoffade/find-the-d/blob/main/src/model/Landlord.java): `src/model/Landlord.java`
- [Application](https://github.com/ivoffade/find-the-d/blob/main/src/model/Application.java): `src/model/Application.java`
- [Announcement](https://github.com/ivoffade/find-the-d/blob/main/src/model/Announcement.java): `src/model/Announcement.java`
- [Nearby establishment](https://github.com/ivoffade/find-the-d/blob/main/src/model/Establishment.java): `src/model/Establishment.java`

### Persistence and integrations

- [Dorm persistence](https://github.com/ivoffade/find-the-d/blob/main/src/repository/DormRepository.java): `src/repository/DormRepository.java`
- [Tenant persistence](https://github.com/ivoffade/find-the-d/blob/main/src/repository/TenantRepository.java): `src/repository/TenantRepository.java`
- [Application persistence](https://github.com/ivoffade/find-the-d/blob/main/src/repository/ApplicationRepository.java): `src/repository/ApplicationRepository.java`
- [Announcement persistence](https://github.com/ivoffade/find-the-d/blob/main/src/repository/AnnouncementRepository.java): `src/repository/AnnouncementRepository.java`
- [Complaint persistence](https://github.com/ivoffade/find-the-d/blob/main/src/repository/ComplaintRepository.java): `src/repository/ComplaintRepository.java`
- [Database connection](https://github.com/ivoffade/find-the-d/blob/main/src/util/DatabaseConnection.java): `src/util/DatabaseConnection.java`

### Other components

- **Tenant or landlord**
- **PostgreSQL**
- **Geoapify service**

## Connections

- Tenant or landlord → Application entry: starts app (evidence: `README.md`)
- Application entry → Welcome and login: opens screens (evidence: `README.md`)
- Welcome and login → Authentication: signs in (evidence: `README.md`)
- Tenant dashboard → Dorm operations: requests dorm actions (evidence: `src/ui/tenant/TenantDashboard.java`)
- Landlord dashboard → Dorm operations: requests management (evidence: `src/ui/landlord/LandlordDashboard.java`)
- Listing cards → Dorm operations: loads listing data (evidence: `src/ui/components/DormPostCard.java`)
- Dorm operations → Listing management: delegates listings (evidence: `src/service/DormService.java`)
- Dorm operations → Application review: handles applications (evidence: `src/service/DormService.java`)
- Dorm operations → Announcements: handles announcements (evidence: `src/service/DormService.java`)
- Dorm operations → Complaints: handles complaints (evidence: `src/service/DormService.java`)
- Listing management → Nearby places: finds nearby places (evidence: `src/service/ListingService.java`)
- Nearby places → Geoapify service: queries places
- Dorm operations → Dorm persistence: persists dorms (evidence: `src/service/DormService.java`)
- Dorm operations → Tenant persistence: loads tenant data (evidence: `src/service/DormService.java`)
- Application review → Application persistence: stores applications (evidence: `src/service/ApplicationReviewService.java`)
- Announcements → Announcement persistence: stores announcements (evidence: `src/service/AnnouncementService.java`)
- Complaints → Complaint persistence: stores complaints (evidence: `src/service/ComplaintService.java`)
- Dorm persistence → Database connection: opens connection (evidence: `src/repository/DormRepository.java`)
- Tenant persistence → Database connection: opens connection (evidence: `src/repository/TenantRepository.java`)
- Application persistence → Database connection: opens connection (evidence: `src/repository/ApplicationRepository.java`)
- Announcement persistence → Database connection: opens connection (evidence: `src/repository/AnnouncementRepository.java`)
- Complaint persistence → Database connection: opens connection (evidence: `src/repository/ComplaintRepository.java`)
- Database connection → PostgreSQL: connects to (evidence: `src/util/DatabaseConnection.java`)
- Dorm operations → Input validation: validates input (evidence: `src/service/DormService.java`)
- Dorm persistence → Dorm and details: loads listings (evidence: `src/repository/DormRepository.java`)
- Tenant persistence → Tenant: loads tenants (evidence: `src/repository/TenantRepository.java`)
- Application persistence → Application: stores applications (evidence: `src/repository/ApplicationRepository.java`)
- Announcement persistence → Announcement: stores announcements (evidence: `src/repository/AnnouncementRepository.java`)
- Listing management → Dorm and details: builds listings (evidence: `src/service/ListingService.java`)
- Nearby places → Nearby establishment: creates place records (evidence: `src/service/NearbyEstablishmentService.java`)
- Listing cards → Shared backgrounds: uses background (evidence: `src/ui/components/DormPostCard.java`)
- Tenant dashboard → Shared dialogs: uses dialogs (evidence: `src/ui/tenant/TenantDashboard.java`)
- Landlord dashboard → Shared dialogs: uses dialogs (evidence: `src/ui/landlord/LandlordDashboard.java`)
