Skip to content

Commit b49404d

Browse files
C4 design: components diagram related to uploading notes to OSM
1 parent 0b9c38f commit b49404d

2 files changed

Lines changed: 53 additions & 0 deletions

File tree

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

0 commit comments

Comments
 (0)