Skip to content

Commit fe3a038

Browse files
authored
Merge pull request #625 from JoseAndresVargas/feature/osm-notes-design
Documentation: Upload notes to OSM feature design.
2 parents 89263c3 + b49404d commit fe3a038

6 files changed

Lines changed: 139 additions & 0 deletions

design/01_System_Context.puml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
@startuml OSMTracker-System-Context
2+
!pragma layout smetana
3+
!theme plain
4+
5+
' C4-PlantUML Context diagram
6+
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Context.puml
7+
8+
LAYOUT_TOP_DOWN()
9+
10+
title OSMTracker for Android – System Context
11+
caption Context diagram showing OSMTracker for Android in its environment
12+
13+
Person(user, "OSM Mapper / Outdoor User", "Records GPS tracks and adds POIs while surveying")
14+
15+
System(system, "OSMTracker for Android", "Mobile app to record GPX tracks, capture photos/voice notes, and mark POIs")
16+
17+
System_Ext(openStreetMap, "OpenStreetMap", "Uploads GPX traces, notes and provides map tiles for on-device maps")
18+
System_Ext(androidOS, "Android Operating System Services (GPS/Network/Media)", "Provides location updates and captures photos and voice notes via Android Camera/Media APIs")
19+
System_Ext(githubApi, "GitHub API", "Uploads GPX/trace files to a repository; lists repos; creates PRs")
20+
21+
Rel(user, system, "Records tracks, creates POIs, takes photos/notes")
22+
23+
Rel(system, androidOS, "Receives location updates and captures media", "Android APIs")
24+
25+
Rel(system, openStreetMap, "Uploads GPX traces/notes and fetches data", "HTTPS/REST")
26+
Rel(system, githubApi, "Lists repos, uploads files, opens PRs", "HTTPS/REST with token")
27+
28+
UpdateElementStyle(user, $fontColor="black", $bgColor="#CFE8FF", $borderColor="#3A8DFF")
29+
UpdateElementStyle(system, $fontColor="black", $bgColor="#C7F0D8", $borderColor="#1B8C3E")
30+
UpdateElementStyle(openStreetMap, $bgColor="#FFE4C4")
31+
UpdateElementStyle(githubApi, $bgColor="#FFE4C4")
32+
33+
SHOW_LEGEND()
34+
35+
footer Generated with C4-PlantUML.
36+
@enduml

design/01_System_Context.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
@startuml OSMTracker-Containers
2+
!pragma layout smetana
3+
!theme plain
4+
5+
' C4-PlantUML Container diagram
6+
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
7+
8+
LAYOUT_TOP_DOWN()
9+
10+
title OSMTracker for Android – Containers
11+
caption Containers inside OSMTracker for Android, and how they interact with external systems
12+
13+
Person(user, "OSM Mapper / Outdoor User", "Records GPS tracks and adds POIs while surveying")
14+
15+
System_Boundary(system, "OSMTracker for Android") {
16+
Container(mobileApp, "Android Mobile App", "Java", "UI and background logic to record tracks, manage POIs, capture media, and upload/export")
17+
ContainerDb(localDb, "Local Database", "SQLite", "Tracks, waypoints/POIs, settings, and related metadata")
18+
Container(fileStore, "Local File Storage", "Android filesystem", "GPX exports, photos, audio notes and temporary ZIPs")
19+
}
20+
21+
System_Ext(openStreetMap, "OpenStreetMap", "Uploads GPX traces; provides map tiles (HTTPS)")
22+
System_Ext(androidOS, "Android Operating System Services (GPS/Network/Media)", "Location updates; Camera/Microphone/Media APIs")
23+
System_Ext(githubApi, "GitHub API", "Upload trace files to a repository; list repos; open PRs")
24+
25+
' People -> App
26+
Rel(user, mobileApp, "Uses to start/stop tracking, add POIs, take photos/voice notes")
27+
28+
' Internal container relationships
29+
Rel(mobileApp, localDb, "Reads/Writes track and waypoint metadata")
30+
Rel(mobileApp, fileStore, "Reads/Writes GPX, photos, audio, ZIPs")
31+
32+
' External relationships
33+
Rel(mobileApp, androidOS, "Receives location updates; triggers media capture", "Android APIs")
34+
Rel(mobileApp, openStreetMap, "Uploads GPX traces and notes; fetches map tiles", "REST/HTTPS")
35+
Rel(mobileApp, githubApi, "Lists repos, uploads files, opens PRs", "HTTPS")
36+
37+
UpdateElementStyle(user, $fontColor="black", $bgColor="#CFE8FF", $borderColor="#3A8DFF")
38+
UpdateElementStyle(system, $fontColor="black", $bgColor="#C7F0D8", $borderColor="#1B8C3E")
39+
UpdateElementStyle(openStreetMap, $bgColor="#FFE4C4")
40+
UpdateElementStyle(androidOS, $bgColor="#FFE4C4")
41+
UpdateElementStyle(githubApi, $bgColor="#FFE4C4")
42+
UpdateElementStyle(localDb, $bgColor="#FFF9C4")
43+
UpdateElementStyle(fileStore, $bgColor="#FFF9C4")
44+
45+
SHOW_LEGEND()
46+
47+
footer Generated with C4-PlantUML.
48+
@enduml

design/02_Containers_Osmtracker.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
@startuml OSMTracker-Components-NotesUpload
2+
!pragma layout smetana
3+
!theme plain
4+
5+
' C4-PlantUML Components diagram
6+
' Focused on the "Upload OpenStreetMap Notes" flow
7+
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml
8+
9+
LAYOUT_TOP_DOWN()
10+
11+
title OSMTracker for Android – Components (Notes Upload)
12+
caption Zoom-in of the Mobile App showing components involved in uploading Notes to OpenStreetMap
13+
14+
Person(user, "OSM Mapper / Outdoor User", "Creates text notes and uploads them to OSM")
15+
16+
Container_Boundary(app, "Android Mobile App") {
17+
Component(waypointList, "WaypointList", "Activity", "Lists waypoints/notes; entry point to OSM Notes upload")
18+
Component(osmNotesUpload, "OpenStreetMapNotesUpload", "Activity", "Collects note text and location; prepares upload")
19+
Component(uploadNotesTask, "UploadToOpenStreetMapNotesTask", "AsyncTask", "Creates OSM Notes via OsmConnection + NotesApi")
20+
21+
Component(dataHelper, "DataHelper", "Helper", "Gateway to ContentProvider (SQLite) and per-track directories")
22+
Component(contentProvider, "TrackContentProvider", "ContentProvider", "CRUD for tracks/points/waypoints; app-wide data access")
23+
Component(dbHelper, "DatabaseHelper", "SQLiteOpenHelper", "Creates/upgrades schema; indices and columns for entities")
24+
}
25+
26+
' External system for the flow
27+
System_Ext(osmNotesApi, "OpenStreetMap API — Notes", "Uploads the notes to OpenStreetMap")
28+
29+
' User interaction with the UI
30+
Rel(user, waypointList, "Chooses notes to upload / opens upload screen")
31+
32+
' Internal collaborations for the Notes flow
33+
Rel(waypointList, osmNotesUpload, "Starts upload with selected waypoint(s)")
34+
Rel(osmNotesUpload, dataHelper, "Reads waypoint(s) and metadata (location, text)")
35+
Rel(osmNotesUpload, uploadNotesTask, "Initiates upload of notes")
36+
Rel(dataHelper, contentProvider, "Uses ContentResolver to query waypoints/track data")
37+
Rel(contentProvider, dbHelper, "Uses SQLite database")
38+
39+
' External connection
40+
Rel(uploadNotesTask, osmNotesApi, "Creates notes (HTTPS)")
41+
42+
' Styling consistent with other C4 views
43+
UpdateElementStyle(user, $fontColor="black", $bgColor="#CFE8FF", $borderColor="#3A8DFF")
44+
UpdateElementStyle(app, $fontColor="black", $bgColor="#C7F0D8", $borderColor="#1B8C3E")
45+
UpdateElementStyle(osmNotesApi, $bgColor="#FFE4C4")
46+
UpdateElementStyle(contentProvider, $bgColor="#FFF9C4")
47+
UpdateElementStyle(dbHelper, $bgColor="#FFF9C4")
48+
49+
SHOW_LEGEND()
50+
51+
footer Generated with C4-PlantUML.
52+
@enduml

design/03_Components_NotesUpload.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)