# florencefilippi/study-spot-finder architecture

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

- Interactive diagram: https://gitdiagram.com/florencefilippi/study-spot-finder
- Repository: https://github.com/florencefilippi/study-spot-finder

## Overview

Study Spot Finder is a student-facing web app for finding study locations around SFU and Vancouver. Its main workflow is exploring locations on an interactive map and using study-specific details to choose a spot; users can also contribute suggestions and reviews. Separate capabilities include profiles, accessibility and location attributes, campus/city filtering, and administration of locations and reviews. The supplied excerpts support review, account, geocoding, and admin relationships; several map and location links are documented only at product level, so those edges are marked unverified.

Main entry points: [`src/main/java/com/studyspotfinder/studyspot/model/ReviewService.java`](https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/model/ReviewService.java) (Reviews and ratings), [`src/main/java/com/studyspotfinder/studyspot/controller/AdminController.java`](https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/controller/AdminController.java) (Admin operations), [`src/main/java/com/studyspotfinder/studyspot/repository/UserRepository.java`](https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/repository/UserRepository.java) (User records), [`src/main/java/com/studyspotfinder/studyspot/controller/LocationController.java`](https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/controller/LocationController.java) (Location details)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_discovery["Spot discovery"]
  node_map["Interactive map<br/>[map.js]"]
  node_spot_api["Spot API"]
  node_location["Location details"]
  node_location_lookup["Location lookup"]
  node_spot_data["Spot data<br/>[Spot.java]"]
  node_geocoding["Address geocoding"]
end

subgraph group_accounts["Accounts and reviews"]
  node_profile["Profiles"]
  node_signup["Signup"]
  node_auth["Authentication"]
  node_users[("User records")]
  node_reviews["Reviews and ratings<br/>[ReviewService.java]"]
  node_review_store[("Review records")]
end

subgraph group_community["Contributions and administration"]
  node_suggestions["Spot suggestions"]
  node_suggestion_store[("Suggestion records")]
  node_contributor["Contributor spots"]
  node_admin_operations["Admin operations"]
  node_review_admin["Review moderation"]
  node_business_requests[("Business requests")]
end

subgraph group_platform["Application services"]
  node_application["Spring application"]
end

node_student(("Student"))
node_admin(("Administrator"))
node_geo_service{{"Geoapify"}}

node_student -->|"explores"| node_map
node_map -.->|"requests spots"| node_spot_api
node_student -.->|"views details"| node_location
node_location -->|"loads reviews"| node_reviews
node_location -->|"looks up location"| node_location_lookup
node_spot_api -.->|"serves locations"| node_spot_data
node_contributor -->|"geocodes address"| node_geocoding
node_geocoding -->|"queries"| node_geo_service
node_student -.->|"creates account"| node_signup
node_signup -->|"reads and writes"| node_users
node_signup -->|"stores request"| node_business_requests
node_auth -->|"loads account"| node_users
node_student -.->|"manages profile"| node_profile
node_student -.->|"writes review"| node_reviews
node_reviews -->|"validates location"| node_location_lookup
node_reviews -->|"loads author"| node_users
node_reviews -->|"reads and writes"| node_review_store
node_student -.->|"suggests spot"| node_suggestions
node_suggestions -->|"stores suggestion"| node_suggestion_store
node_contributor -->|"manages spots"| node_spot_data
node_admin_operations -->|"reviews queue"| node_suggestion_store
node_admin_operations -->|"reviews requests"| node_business_requests
node_admin_operations -->|"manages accounts"| node_users
node_admin_operations -->|"manages reviews"| node_review_store
node_admin_operations -->|"manages locations"| node_spot_data
node_review_admin -->|"moderates reviews"| node_reviews

click node_map "https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/resources/static/map.js"
click node_spot_api "https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/controller/SpotApiController.java"
click node_location "https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/controller/LocationController.java"
click node_location_lookup "https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/service/LocationLookup.java"
click node_spot_data "https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/model/Spot.java"
click node_geocoding "https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/service/GeocodingService.java"
click node_profile "https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/controller/ProfileController.java"
click node_signup "https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/controller/SignupController.java"
click node_auth "https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/service/CustomUserDetailService.java"
click node_users "https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/repository/UserRepository.java"
click node_reviews "https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/model/ReviewService.java"
click node_review_store "https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/repository/ReviewRepository.java"
click node_suggestions "https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/controller/SuggestionController.java"
click node_suggestion_store "https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/repository/SuggestionRepository.java"
click node_contributor "https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/controller/ContributorSpotController.java"
click node_admin_operations "https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/controller/AdminController.java"
click node_review_admin "https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/controller/AdminReviewController.java"
click node_business_requests "https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/repository/BusinessRequestRepository.java"
click node_application "https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/StudyspotApplication.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_map,node_spot_api,node_location,node_location_lookup,node_spot_data,node_geocoding toneBlue
class node_profile,node_signup,node_auth,node_users,node_reviews,node_review_store toneAmber
class node_suggestions,node_suggestion_store,node_contributor,node_admin_operations,node_review_admin,node_business_requests,node_geo_service toneMint
class node_application toneRose
class node_student,node_admin toneIndigo
```

## Components

### Spot discovery

- [Interactive map](https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/resources/static/map.js): `src/main/resources/static/map.js`
- [Spot API](https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/controller/SpotApiController.java): `src/main/java/com/studyspotfinder/studyspot/controller/SpotApiController.java`
- [Location details](https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/controller/LocationController.java): `src/main/java/com/studyspotfinder/studyspot/controller/LocationController.java`
- [Location lookup](https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/service/LocationLookup.java): `src/main/java/com/studyspotfinder/studyspot/service/LocationLookup.java`
- [Spot data](https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/model/Spot.java): `src/main/java/com/studyspotfinder/studyspot/model/Spot.java`
- [Address geocoding](https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/service/GeocodingService.java): `src/main/java/com/studyspotfinder/studyspot/service/GeocodingService.java`

### Accounts and reviews

- [Profiles](https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/controller/ProfileController.java): `src/main/java/com/studyspotfinder/studyspot/controller/ProfileController.java`
- [Signup](https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/controller/SignupController.java): `src/main/java/com/studyspotfinder/studyspot/controller/SignupController.java`
- [Authentication](https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/service/CustomUserDetailService.java): `src/main/java/com/studyspotfinder/studyspot/service/CustomUserDetailService.java`
- [User records](https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/repository/UserRepository.java): `src/main/java/com/studyspotfinder/studyspot/repository/UserRepository.java`
- [Reviews and ratings](https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/model/ReviewService.java): `src/main/java/com/studyspotfinder/studyspot/model/ReviewService.java`
- [Review records](https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/repository/ReviewRepository.java): `src/main/java/com/studyspotfinder/studyspot/repository/ReviewRepository.java`

### Contributions and administration

- [Spot suggestions](https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/controller/SuggestionController.java): `src/main/java/com/studyspotfinder/studyspot/controller/SuggestionController.java`
- [Suggestion records](https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/repository/SuggestionRepository.java): `src/main/java/com/studyspotfinder/studyspot/repository/SuggestionRepository.java`
- [Contributor spots](https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/controller/ContributorSpotController.java): `src/main/java/com/studyspotfinder/studyspot/controller/ContributorSpotController.java`
- [Admin operations](https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/controller/AdminController.java): `src/main/java/com/studyspotfinder/studyspot/controller/AdminController.java`
- [Review moderation](https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/controller/AdminReviewController.java): `src/main/java/com/studyspotfinder/studyspot/controller/AdminReviewController.java`
- [Business requests](https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/repository/BusinessRequestRepository.java): `src/main/java/com/studyspotfinder/studyspot/repository/BusinessRequestRepository.java`

### Application services

- [Spring application](https://github.com/florencefilippi/study-spot-finder/blob/main/src/main/java/com/studyspotfinder/studyspot/StudyspotApplication.java): `src/main/java/com/studyspotfinder/studyspot/StudyspotApplication.java`

### Other components

- **Student**
- **Administrator**
- **Geoapify**

## Connections

- Student → Interactive map: explores (evidence: `README.md`)
- Interactive map → Spot API: requests spots
- Student → Location details: views details
- Location details → Reviews and ratings: loads reviews (evidence: `src/main/java/com/studyspotfinder/studyspot/controller/LocationController.java`)
- Location details → Location lookup: looks up location (evidence: `src/main/java/com/studyspotfinder/studyspot/controller/LocationController.java`)
- Spot API → Spot data: serves locations
- Contributor spots → Address geocoding: geocodes address (evidence: `src/main/java/com/studyspotfinder/studyspot/controller/ContributorSpotController.java`)
- Address geocoding → Geoapify: queries (evidence: `src/main/java/com/studyspotfinder/studyspot/service/GeocodingService.java`)
- Student → Signup: creates account
- Signup → User records: reads and writes (evidence: `src/main/java/com/studyspotfinder/studyspot/controller/SignupController.java`)
- Signup → Business requests: stores request (evidence: `src/main/java/com/studyspotfinder/studyspot/controller/SignupController.java`)
- Authentication → User records: loads account (evidence: `src/main/java/com/studyspotfinder/studyspot/service/CustomUserDetailService.java`)
- Student → Profiles: manages profile
- Student → Reviews and ratings: writes review
- Reviews and ratings → Location lookup: validates location (evidence: `src/main/java/com/studyspotfinder/studyspot/model/ReviewService.java`)
- Reviews and ratings → User records: loads author (evidence: `src/main/java/com/studyspotfinder/studyspot/model/ReviewService.java`)
- Reviews and ratings → Review records: reads and writes (evidence: `src/main/java/com/studyspotfinder/studyspot/model/ReviewService.java`)
- Student → Spot suggestions: suggests spot
- Spot suggestions → Suggestion records: stores suggestion (evidence: `src/main/java/com/studyspotfinder/studyspot/controller/SuggestionController.java`)
- Contributor spots → Spot data: manages spots (evidence: `src/main/java/com/studyspotfinder/studyspot/controller/ContributorSpotController.java`)
- Admin operations → Suggestion records: reviews queue (evidence: `src/main/java/com/studyspotfinder/studyspot/controller/AdminController.java`)
- Admin operations → Business requests: reviews requests (evidence: `src/main/java/com/studyspotfinder/studyspot/controller/AdminController.java`)
- Admin operations → User records: manages accounts (evidence: `src/main/java/com/studyspotfinder/studyspot/controller/AdminController.java`)
- Admin operations → Review records: manages reviews (evidence: `src/main/java/com/studyspotfinder/studyspot/controller/AdminController.java`)
- Admin operations → Spot data: manages locations (evidence: `src/main/java/com/studyspotfinder/studyspot/controller/AdminController.java`)
- Review moderation → Reviews and ratings: moderates reviews (evidence: `src/main/java/com/studyspotfinder/studyspot/controller/AdminReviewController.java`)
