# sonihet50/posewithme architecture

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

- Interactive diagram: https://gitdiagram.com/sonihet50/posewithme
- Repository: https://github.com/sonihet50/posewithme

## Overview

PoseWithMe is an on-device Android photography assistant: users choose or receive a pose suggestion, match it in the live camera, capture a photo, and review or keep it in their gallery. Nearby recommendations combine location, curated places or an OpenStreetMap lookup, and scene-based pose ranking. The graph follows documented camera and recommendation flows; some implementation details are represented at subsystem level because their source was not excerpted.

Main entry points: [`app/src/main/java/com/s23cp5054/posewithme/ui/camera/CameraActivity.java`](https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/ui/camera/CameraActivity.java) (Camera workflow), [`app/src/main/java/com/s23cp5054/posewithme/MainActivity.java`](https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/MainActivity.java) (Home screen), [`app/src/main/java/com/s23cp5054/posewithme/ui/nearby/NearbyActivity.java`](https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/ui/nearby/NearbyActivity.java) (Nearby screen), [`app/src/main/java/com/s23cp5054/posewithme/ui/poses/PoseLibraryActivity.java`](https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/ui/poses/PoseLibraryActivity.java) (Pose library)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_home["Home screen<br/>[MainActivity.java]"]
end

subgraph group_poses["Pose catalog"]
  node_library["Pose library"]
  node_pose_cards["Pose cards"]
  node_pose_detail["Pose details"]
  node_pose_data["Pose templates<br/>[PoseTemplate.java]"]
  node_pose_repo["Pose repository"]
end

subgraph group_guidance["Live pose guidance"]
  node_camera["Camera workflow"]
  node_detector["Pose detection<br/>[PoseDetector.java]"]
  node_matcher["Pose matching<br/>[PoseMatcher.java]"]
  node_recorder["Pose recording<br/>[PoseRecorder.java]"]
  node_overlay["Camera guidance overlay"]
end

subgraph group_recommend["Nearby recommendations"]
  node_nearby["Nearby screen"]
  node_location["Location helper"]
  node_place_finder["Place lookup<br/>[PlaceFinder.java]"]
  node_places["Curated places"]
  node_recommender["Pose recommender"]
end

subgraph group_photos["Photo and preferences"]
  node_storage["Photo storage<br/>[PhotoStorage.java]"]
  node_gallery["Gallery"]
  node_photo_detail["Photo review<br/>[PhotoActivity.java]"]
  node_photo_repo["Photo repository"]
  node_database[("SQLite metadata<br/>[AppDatabase.java]")]
  node_settings["App settings<br/>[AppSettings.java]"]
  node_settings_ui["Settings screen"]
end

node_user(("Photographer"))
node_overpass{{"OpenStreetMap Overpass"}}
node_media[("Android media storage")]

node_user -->|"opens app"| node_home
node_home -->|"opens camera"| node_camera
node_home -->|"opens library"| node_library
node_home -->|"opens nearby"| node_nearby
node_home -->|"loads poses"| node_pose_repo
node_home -->|"ranks poses"| node_recommender
node_library -->|"loads poses"| node_pose_repo
node_library -->|"displays poses"| node_pose_cards
node_library -->|"shows details"| node_pose_detail
node_pose_repo -->|"loads templates"| node_pose_data
node_nearby -->|"gets location"| node_location
node_nearby -->|"checks curated places"| node_places
node_nearby -->|"looks up nearby"| node_place_finder
node_place_finder -->|"queries places"| node_overpass
node_nearby -->|"ranks poses"| node_recommender
node_nearby -->|"loads poses"| node_pose_repo
node_camera -->|"detects landmarks"| node_detector
node_camera -->|"scores pose"| node_matcher
node_camera -->|"records pose"| node_recorder
node_camera -->|"updates guidance"| node_overlay
node_camera -->|"captures photo"| node_storage
node_storage -->|"writes image"| node_media
node_camera -->|"saves metadata"| node_photo_repo
node_photo_repo -->|"reads and writes"| node_database
node_gallery -->|"loads photos"| node_photo_repo
node_gallery -->|"opens photo"| node_photo_detail
node_photo_detail -->|"loads or deletes"| node_photo_repo
node_user -->|"changes preferences"| node_settings_ui
node_settings_ui -->|"updates settings"| node_settings
node_camera -->|"reads preferences"| node_settings

click node_home "https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/MainActivity.java"
click node_library "https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/ui/poses/PoseLibraryActivity.java"
click node_pose_cards "https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/ui/poses/PoseCardAdapter.java"
click node_pose_detail "https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/ui/poses/PoseDetailSheet.java"
click node_pose_data "https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/pose/model/PoseTemplate.java"
click node_pose_repo "https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/data/repository/PoseRepository.java"
click node_nearby "https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/ui/nearby/NearbyActivity.java"
click node_location "https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/location/LocationHelper.java"
click node_place_finder "https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/location/PlaceFinder.java"
click node_places "https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/data/repository/PlacesRepository.java"
click node_recommender "https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/pose/recommendation/PoseRecommender.java"
click node_camera "https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/ui/camera/CameraActivity.java"
click node_detector "https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/pose/detection/PoseDetector.java"
click node_matcher "https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/pose/matching/PoseMatcher.java"
click node_recorder "https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/pose/recording/PoseRecorder.java"
click node_overlay "https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/ui/camera/PoseOverlayView.java"
click node_storage "https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/storage/PhotoStorage.java"
click node_gallery "https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/ui/gallery/GalleryActivity.java"
click node_photo_detail "https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/ui/gallery/PhotoActivity.java"
click node_photo_repo "https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/data/repository/PhotoRepository.java"
click node_database "https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/data/database/AppDatabase.java"
click node_settings "https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/data/settings/AppSettings.java"
click node_settings_ui "https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/ui/settings/SettingsActivity.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_home toneBlue
class node_library,node_pose_cards,node_pose_detail,node_pose_data,node_pose_repo,node_media toneAmber
class node_camera,node_detector,node_matcher,node_recorder,node_overlay toneMint
class node_nearby,node_location,node_place_finder,node_places,node_recommender toneRose
class node_storage,node_gallery,node_photo_detail,node_photo_repo,node_database,node_settings,node_settings_ui,node_user,node_overpass toneIndigo
```

## Components

### App entry

- [Home screen](https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/MainActivity.java): `app/src/main/java/com/s23cp5054/posewithme/MainActivity.java`

### Pose catalog

- [Pose library](https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/ui/poses/PoseLibraryActivity.java): `app/src/main/java/com/s23cp5054/posewithme/ui/poses/PoseLibraryActivity.java`
- [Pose cards](https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/ui/poses/PoseCardAdapter.java): `app/src/main/java/com/s23cp5054/posewithme/ui/poses/PoseCardAdapter.java`
- [Pose details](https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/ui/poses/PoseDetailSheet.java): `app/src/main/java/com/s23cp5054/posewithme/ui/poses/PoseDetailSheet.java`
- [Pose templates](https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/pose/model/PoseTemplate.java): `app/src/main/java/com/s23cp5054/posewithme/pose/model/PoseTemplate.java`
- [Pose repository](https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/data/repository/PoseRepository.java): `app/src/main/java/com/s23cp5054/posewithme/data/repository/PoseRepository.java`

### Live pose guidance

- [Camera workflow](https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/ui/camera/CameraActivity.java): `app/src/main/java/com/s23cp5054/posewithme/ui/camera/CameraActivity.java`
- [Pose detection](https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/pose/detection/PoseDetector.java): `app/src/main/java/com/s23cp5054/posewithme/pose/detection/PoseDetector.java`
- [Pose matching](https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/pose/matching/PoseMatcher.java): `app/src/main/java/com/s23cp5054/posewithme/pose/matching/PoseMatcher.java`
- [Pose recording](https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/pose/recording/PoseRecorder.java): `app/src/main/java/com/s23cp5054/posewithme/pose/recording/PoseRecorder.java`
- [Camera guidance overlay](https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/ui/camera/PoseOverlayView.java): `app/src/main/java/com/s23cp5054/posewithme/ui/camera/PoseOverlayView.java`

### Nearby recommendations

- [Nearby screen](https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/ui/nearby/NearbyActivity.java): `app/src/main/java/com/s23cp5054/posewithme/ui/nearby/NearbyActivity.java`
- [Location helper](https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/location/LocationHelper.java): `app/src/main/java/com/s23cp5054/posewithme/location/LocationHelper.java`
- [Place lookup](https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/location/PlaceFinder.java): `app/src/main/java/com/s23cp5054/posewithme/location/PlaceFinder.java`
- [Curated places](https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/data/repository/PlacesRepository.java): `app/src/main/java/com/s23cp5054/posewithme/data/repository/PlacesRepository.java`
- [Pose recommender](https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/pose/recommendation/PoseRecommender.java): `app/src/main/java/com/s23cp5054/posewithme/pose/recommendation/PoseRecommender.java`

### Photo and preferences

- [Photo storage](https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/storage/PhotoStorage.java): `app/src/main/java/com/s23cp5054/posewithme/storage/PhotoStorage.java`
- [Gallery](https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/ui/gallery/GalleryActivity.java): `app/src/main/java/com/s23cp5054/posewithme/ui/gallery/GalleryActivity.java`
- [Photo review](https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/ui/gallery/PhotoActivity.java): `app/src/main/java/com/s23cp5054/posewithme/ui/gallery/PhotoActivity.java`
- [Photo repository](https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/data/repository/PhotoRepository.java): `app/src/main/java/com/s23cp5054/posewithme/data/repository/PhotoRepository.java`
- [SQLite metadata](https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/data/database/AppDatabase.java): `app/src/main/java/com/s23cp5054/posewithme/data/database/AppDatabase.java`
- [App settings](https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/data/settings/AppSettings.java): `app/src/main/java/com/s23cp5054/posewithme/data/settings/AppSettings.java`
- [Settings screen](https://github.com/sonihet50/posewithme/blob/master/app/src/main/java/com/s23cp5054/posewithme/ui/settings/SettingsActivity.java): `app/src/main/java/com/s23cp5054/posewithme/ui/settings/SettingsActivity.java`

### Other components

- **Photographer**
- **OpenStreetMap Overpass**
- **Android media storage**

## Connections

- Photographer → Home screen: opens app (evidence: `README.md`)
- Home screen → Camera workflow: opens camera (evidence: `app/src/main/java/com/s23cp5054/posewithme/MainActivity.java`)
- Home screen → Pose library: opens library (evidence: `app/src/main/java/com/s23cp5054/posewithme/MainActivity.java`)
- Home screen → Nearby screen: opens nearby (evidence: `app/src/main/java/com/s23cp5054/posewithme/MainActivity.java`)
- Home screen → Pose repository: loads poses (evidence: `app/src/main/java/com/s23cp5054/posewithme/MainActivity.java`)
- Home screen → Pose recommender: ranks poses (evidence: `app/src/main/java/com/s23cp5054/posewithme/MainActivity.java`)
- Pose library → Pose repository: loads poses (evidence: `app/src/main/java/com/s23cp5054/posewithme/ui/poses/PoseLibraryActivity.java`)
- Pose library → Pose cards: displays poses (evidence: `app/src/main/java/com/s23cp5054/posewithme/ui/poses/PoseLibraryActivity.java`)
- Pose library → Pose details: shows details (evidence: `app/src/main/java/com/s23cp5054/posewithme/ui/poses/PoseLibraryActivity.java`)
- Pose repository → Pose templates: loads templates (evidence: `app/src/main/java/com/s23cp5054/posewithme/data/repository/PoseRepository.java`)
- Nearby screen → Location helper: gets location (evidence: `app/src/main/java/com/s23cp5054/posewithme/ui/nearby/NearbyActivity.java`)
- Nearby screen → Curated places: checks curated places (evidence: `app/src/main/java/com/s23cp5054/posewithme/ui/nearby/NearbyActivity.java`)
- Nearby screen → Place lookup: looks up nearby (evidence: `app/src/main/java/com/s23cp5054/posewithme/ui/nearby/NearbyActivity.java`)
- Place lookup → OpenStreetMap Overpass: queries places (evidence: `README.md`)
- Nearby screen → Pose recommender: ranks poses (evidence: `README.md`)
- Nearby screen → Pose repository: loads poses (evidence: `app/src/main/java/com/s23cp5054/posewithme/ui/nearby/NearbyActivity.java`)
- Camera workflow → Pose detection: detects landmarks (evidence: `README.md`)
- Camera workflow → Pose matching: scores pose (evidence: `README.md`)
- Camera workflow → Pose recording: records pose (evidence: `app/src/main/java/com/s23cp5054/posewithme/ui/camera/CameraActivity.java`)
- Camera workflow → Camera guidance overlay: updates guidance (evidence: `README.md`)
- Camera workflow → Photo storage: captures photo (evidence: `app/src/main/java/com/s23cp5054/posewithme/ui/camera/CameraActivity.java`)
- Photo storage → Android media storage: writes image (evidence: `app/src/main/java/com/s23cp5054/posewithme/storage/PhotoStorage.java`)
- Camera workflow → Photo repository: saves metadata (evidence: `app/src/main/java/com/s23cp5054/posewithme/ui/camera/CameraActivity.java`)
- Photo repository → SQLite metadata: reads and writes (evidence: `app/src/main/java/com/s23cp5054/posewithme/data/repository/PhotoRepository.java`)
- Gallery → Photo repository: loads photos (evidence: `app/src/main/java/com/s23cp5054/posewithme/ui/gallery/GalleryActivity.java`)
- Gallery → Photo review: opens photo (evidence: `app/src/main/java/com/s23cp5054/posewithme/ui/gallery/GalleryActivity.java`)
- Photo review → Photo repository: loads or deletes (evidence: `app/src/main/java/com/s23cp5054/posewithme/ui/gallery/PhotoActivity.java`)
- Photographer → Settings screen: changes preferences (evidence: `README.md`)
- Settings screen → App settings: updates settings (evidence: `app/src/main/java/com/s23cp5054/posewithme/ui/settings/SettingsActivity.java`)
- Camera workflow → App settings: reads preferences (evidence: `app/src/main/java/com/s23cp5054/posewithme/ui/camera/CameraActivity.java`)
