diff --git a/design/01_System_Context.puml b/design/01_System_Context.puml new file mode 100644 index 00000000..c6245dc6 --- /dev/null +++ b/design/01_System_Context.puml @@ -0,0 +1,36 @@ +@startuml OSMTracker-System-Context +!pragma layout smetana +!theme plain + +' C4-PlantUML Context diagram +!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Context.puml + +LAYOUT_TOP_DOWN() + +title OSMTracker for Android – System Context +caption Context diagram showing OSMTracker for Android in its environment + +Person(user, "OSM Mapper / Outdoor User", "Records GPS tracks and adds POIs while surveying") + +System(system, "OSMTracker for Android", "Mobile app to record GPX tracks, capture photos/voice notes, and mark POIs") + +System_Ext(openStreetMap, "OpenStreetMap", "Uploads GPX traces, notes and provides map tiles for on-device maps") +System_Ext(androidOS, "Android Operating System Services (GPS/Network/Media)", "Provides location updates and captures photos and voice notes via Android Camera/Media APIs") +System_Ext(githubApi, "GitHub API", "Uploads GPX/trace files to a repository; lists repos; creates PRs") + +Rel(user, system, "Records tracks, creates POIs, takes photos/notes") + +Rel(system, androidOS, "Receives location updates and captures media", "Android APIs") + +Rel(system, openStreetMap, "Uploads GPX traces/notes and fetches data", "HTTPS/REST") +Rel(system, githubApi, "Lists repos, uploads files, opens PRs", "HTTPS/REST with token") + +UpdateElementStyle(user, $fontColor="black", $bgColor="#CFE8FF", $borderColor="#3A8DFF") +UpdateElementStyle(system, $fontColor="black", $bgColor="#C7F0D8", $borderColor="#1B8C3E") +UpdateElementStyle(openStreetMap, $bgColor="#FFE4C4") +UpdateElementStyle(githubApi, $bgColor="#FFE4C4") + +SHOW_LEGEND() + +footer Generated with C4-PlantUML. +@enduml diff --git a/design/01_System_Context.svg b/design/01_System_Context.svg new file mode 100644 index 00000000..1f21e7fb --- /dev/null +++ b/design/01_System_Context.svg @@ -0,0 +1 @@ +OSMTracker for Android - System ContextOSMTracker for Android - System ContextOSM Mapper /Outdoor User Records GPS tracks andadds POIs while surveyingOSMTracker forAndroid Mobile app to record GPXtracks, capturephotos/voice notes, andmark POIsOpenStreetMap Uploads GPX traces, notesand provides map tiles foron-device mapsAndroid OperatingSystem Services(GPS/Network/Media) Provides location updatesand captures photos andvoice notes via AndroidCamera/Media APIsGitHub API Uploads GPX/trace files to arepository; lists repos;creates PRsRecords tracks,creates POIs, takesphotos/notesReceives locationupdates and capturesmedia[Android APIs]Uploads GPXtraces/notes andfetches data[HTTPS/REST]Lists repos, uploadsfiles, opens PRs[HTTPS/REST withtoken]Legend  person  system  external system Context diagram showing OSMTracker for Android in its environmentGenerated with C4-PlantUML. \ No newline at end of file diff --git a/design/02_Containers_Osmtracker.puml b/design/02_Containers_Osmtracker.puml new file mode 100644 index 00000000..dd732b13 --- /dev/null +++ b/design/02_Containers_Osmtracker.puml @@ -0,0 +1,48 @@ +@startuml OSMTracker-Containers +!pragma layout smetana +!theme plain + +' C4-PlantUML Container diagram +!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml + +LAYOUT_TOP_DOWN() + +title OSMTracker for Android – Containers +caption Containers inside OSMTracker for Android, and how they interact with external systems + +Person(user, "OSM Mapper / Outdoor User", "Records GPS tracks and adds POIs while surveying") + +System_Boundary(system, "OSMTracker for Android") { + Container(mobileApp, "Android Mobile App", "Java", "UI and background logic to record tracks, manage POIs, capture media, and upload/export") + ContainerDb(localDb, "Local Database", "SQLite", "Tracks, waypoints/POIs, settings, and related metadata") + Container(fileStore, "Local File Storage", "Android filesystem", "GPX exports, photos, audio notes and temporary ZIPs") +} + +System_Ext(openStreetMap, "OpenStreetMap", "Uploads GPX traces; provides map tiles (HTTPS)") +System_Ext(androidOS, "Android Operating System Services (GPS/Network/Media)", "Location updates; Camera/Microphone/Media APIs") +System_Ext(githubApi, "GitHub API", "Upload trace files to a repository; list repos; open PRs") + +' People -> App +Rel(user, mobileApp, "Uses to start/stop tracking, add POIs, take photos/voice notes") + +' Internal container relationships +Rel(mobileApp, localDb, "Reads/Writes track and waypoint metadata") +Rel(mobileApp, fileStore, "Reads/Writes GPX, photos, audio, ZIPs") + +' External relationships +Rel(mobileApp, androidOS, "Receives location updates; triggers media capture", "Android APIs") +Rel(mobileApp, openStreetMap, "Uploads GPX traces and notes; fetches map tiles", "REST/HTTPS") +Rel(mobileApp, githubApi, "Lists repos, uploads files, opens PRs", "HTTPS") + +UpdateElementStyle(user, $fontColor="black", $bgColor="#CFE8FF", $borderColor="#3A8DFF") +UpdateElementStyle(system, $fontColor="black", $bgColor="#C7F0D8", $borderColor="#1B8C3E") +UpdateElementStyle(openStreetMap, $bgColor="#FFE4C4") +UpdateElementStyle(androidOS, $bgColor="#FFE4C4") +UpdateElementStyle(githubApi, $bgColor="#FFE4C4") +UpdateElementStyle(localDb, $bgColor="#FFF9C4") +UpdateElementStyle(fileStore, $bgColor="#FFF9C4") + +SHOW_LEGEND() + +footer Generated with C4-PlantUML. +@enduml diff --git a/design/02_Containers_Osmtracker.svg b/design/02_Containers_Osmtracker.svg new file mode 100644 index 00000000..283d970b --- /dev/null +++ b/design/02_Containers_Osmtracker.svg @@ -0,0 +1 @@ +OSMTracker for Android - ContainersOSMTracker for Android - ContainersOSMTracker for Android[system]OSM Mapper /Outdoor User Records GPS tracks andadds POIs while surveyingOpenStreetMap Uploads GPX traces;provides map tiles (HTTPS)Android OperatingSystem Services(GPS/Network/Media) Location updates;Camera/Microphone/MediaAPIsGitHub API Upload trace files to arepository; list repos; openPRsAndroid Mobile App[Java] UI and background logic torecord tracks, managePOIs, capture media, andupload/exportLocal Database[SQLite] Tracks, waypoints/POIs,settings, and relatedmetadataLocal File Storage[Android filesystem] GPX exports, photos, audionotes and temporary ZIPsUses to start/stoptracking, add POIs,take photos/voicenotesReads/Writes trackand waypointmetadataReads/Writes GPX,photos, audio, ZIPsReceives locationupdates; triggersmedia capture[Android APIs]Uploads GPX tracesand notes; fetchesmap tiles[REST/HTTPS]Lists repos, uploadsfiles, opens PRs[HTTPS]Legend  person  container  external system  system boundary Containers inside OSMTracker for Android, and how they interact with external systemsGenerated with C4-PlantUML. \ No newline at end of file diff --git a/design/03_Components_NotesUpload.puml b/design/03_Components_NotesUpload.puml new file mode 100644 index 00000000..dca6621f --- /dev/null +++ b/design/03_Components_NotesUpload.puml @@ -0,0 +1,52 @@ +@startuml OSMTracker-Components-NotesUpload +!pragma layout smetana +!theme plain + +' C4-PlantUML Components diagram +' Focused on the "Upload OpenStreetMap Notes" flow +!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml + +LAYOUT_TOP_DOWN() + +title OSMTracker for Android – Components (Notes Upload) +caption Zoom-in of the Mobile App showing components involved in uploading Notes to OpenStreetMap + +Person(user, "OSM Mapper / Outdoor User", "Creates text notes and uploads them to OSM") + +Container_Boundary(app, "Android Mobile App") { + Component(waypointList, "WaypointList", "Activity", "Lists waypoints/notes; entry point to OSM Notes upload") + Component(osmNotesUpload, "OpenStreetMapNotesUpload", "Activity", "Collects note text and location; prepares upload") + Component(uploadNotesTask, "UploadToOpenStreetMapNotesTask", "AsyncTask", "Creates OSM Notes via OsmConnection + NotesApi") + + Component(dataHelper, "DataHelper", "Helper", "Gateway to ContentProvider (SQLite) and per-track directories") + Component(contentProvider, "TrackContentProvider", "ContentProvider", "CRUD for tracks/points/waypoints; app-wide data access") + Component(dbHelper, "DatabaseHelper", "SQLiteOpenHelper", "Creates/upgrades schema; indices and columns for entities") +} + +' External system for the flow +System_Ext(osmNotesApi, "OpenStreetMap API — Notes", "Uploads the notes to OpenStreetMap") + +' User interaction with the UI +Rel(user, waypointList, "Chooses notes to upload / opens upload screen") + +' Internal collaborations for the Notes flow +Rel(waypointList, osmNotesUpload, "Starts upload with selected waypoint(s)") +Rel(osmNotesUpload, dataHelper, "Reads waypoint(s) and metadata (location, text)") +Rel(osmNotesUpload, uploadNotesTask, "Initiates upload of notes") +Rel(dataHelper, contentProvider, "Uses ContentResolver to query waypoints/track data") +Rel(contentProvider, dbHelper, "Uses SQLite database") + +' External connection +Rel(uploadNotesTask, osmNotesApi, "Creates notes (HTTPS)") + +' Styling consistent with other C4 views +UpdateElementStyle(user, $fontColor="black", $bgColor="#CFE8FF", $borderColor="#3A8DFF") +UpdateElementStyle(app, $fontColor="black", $bgColor="#C7F0D8", $borderColor="#1B8C3E") +UpdateElementStyle(osmNotesApi, $bgColor="#FFE4C4") +UpdateElementStyle(contentProvider, $bgColor="#FFF9C4") +UpdateElementStyle(dbHelper, $bgColor="#FFF9C4") + +SHOW_LEGEND() + +footer Generated with C4-PlantUML. +@enduml diff --git a/design/03_Components_NotesUpload.svg b/design/03_Components_NotesUpload.svg new file mode 100644 index 00000000..4a359be4 --- /dev/null +++ b/design/03_Components_NotesUpload.svg @@ -0,0 +1 @@ +OSMTracker for Android - Components (Notes Upload)OSMTracker for Android - Components (Notes Upload)Android Mobile App[container]OSM Mapper /Outdoor User Creates text notes anduploads them to OSMOpenStreetMap API Notes Uploads the notes toOpenStreetMapWaypointList[Activity] Lists waypoints/notes;entry point to OSM NotesuploadOpenStreetMapNotesUpload[Activity] Collects note text andlocation; prepares uploadUploadToOpenStreetMapNotesTask[AsyncTask] Creates OSM Notes viaOsmConnection + NotesApiDataHelper[Helper] Gateway to ContentProvider(SQLite) and per-trackdirectoriesTrackContentProvider[ContentProvider] CRUD fortracks/points/waypoints;app-wide data accessDatabaseHelper[SQLiteOpenHelper] Creates/upgrades schema;indices and columns forentitiesChooses notes toupload / opensupload screenStarts upload withselected waypoint(s)Reads waypoint(s)and metadata(location, text)Initiates upload ofnotesUses ContentResolverto querywaypoints/track dataUses SQLite databaseCreates notes(HTTPS)Legend  person  component  external system  container boundary Zoom-in of the Mobile App showing components involved in uploading Notes to OpenStreetMapGenerated with C4-PlantUML. \ No newline at end of file