Skip to content

Commit bc326a7

Browse files
committed
component-init - also wft
1 parent bace8ea commit bc326a7

1 file changed

Lines changed: 121 additions & 0 deletions

File tree

docs/architecture/component.puml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
@startuml component
2+
!pragma layout smetana
3+
4+
skinparam {
5+
BackgroundColor #1a1a2e
6+
ArrowColor #7EC8E3
7+
ArrowFontColor #CCCCCC
8+
ArrowFontSize 10
9+
DefaultFontName Arial
10+
DefaultFontColor #E0E0E0
11+
DefaultFontSize 11
12+
ComponentBorderColor #4A90D9
13+
ComponentBorderThickness 2
14+
ComponentBackgroundColor #0f3460
15+
ComponentFontColor #FFFFFF
16+
ComponentFontSize 12
17+
PackageBorderColor #FF6B35
18+
PackageBorderThickness 2
19+
PackageBackgroundColor #1a1a2e
20+
PackageFontColor #FF6B35
21+
PackageFontSize 13
22+
DatabaseBorderColor #9B59B6
23+
DatabaseBackgroundColor #2C0E3F
24+
DatabaseFontColor #FFFFFF
25+
InterfaceBorderColor #7EC8E3
26+
InterfaceBackgroundColor #0f3460
27+
NoteBorderColor #27AE60
28+
NoteBackgroundColor #0D2818
29+
NoteFontColor #AAAAAA
30+
NoteFontSize 10
31+
}
32+
33+
title <size:18><color:#7EC8E3><b>L.I.M.A. — Component Diagram</b></color></size>\n<size:12><color:#888888>Node + Gateway Internals</color></size>
34+
35+
package "LIMA Node\n[nRF52840 / Zephyr RTOS]" as node_pkg {
36+
37+
package "Sensor Layer" as sensors {
38+
[MPU6050\nIMU] as imu #0f3460
39+
[BMP280\nBarometric] as baro #0f3460
40+
}
41+
42+
package "Zephyr Subsystems" as zephyr {
43+
[Motion\nDiscriminator] as motion #1a3060
44+
[Pressure\nMonitor] as pressure #1a3060
45+
[Event\nAggregator] as aggregator #1a3060
46+
[CryptoCell-310\nSigner] as crypto #2a1a4a
47+
}
48+
49+
package "Connectivity" as connectivity {
50+
[BLE 5.0 Stack\nCoded PHY] as ble #0f3460
51+
}
52+
53+
imu --> motion : <color:#AAAAAA>raw accel/gyro\n[I2C]</color>
54+
baro --> pressure : <color:#AAAAAA>pressure delta\n[I2C]</color>
55+
motion --> aggregator : <color:#AAAAAA>motion event</color>
56+
pressure --> aggregator : <color:#AAAAAA>pressure event</color>
57+
aggregator --> crypto : <color:#AAAAAA>integrity event</color>
58+
crypto --> ble : <color:#7EC8E3>signed payload</color>
59+
}
60+
61+
package "LIMA Gateway\n[Raspberry Pi Zero]" as gateway_pkg {
62+
63+
package "Ingestion" as ingestion {
64+
[BLE Scanner\nblueZ / hci] as scanner #0f3460
65+
[MQTT Publisher\npaho] as publisher #0f3460
66+
}
67+
68+
package "Broker" as broker_pkg {
69+
[Mosquitto\nMQTT Broker] as mosquitto #1a3060
70+
}
71+
72+
package "Event Processing" as processing {
73+
[Event Router\nsubscriber] as router #1a3060
74+
[Signature\nVerifier] as verifier #2a1a4a
75+
}
76+
77+
package "Persistence" as persistence {
78+
database "SQLite\nAudit Log" as sqlite #2C0E3F
79+
[Queue Manager\nflush-on-connect] as queue #1a3060
80+
}
81+
82+
package "Egress" as egress {
83+
[Push\nNotifier] as push_h #0f3460
84+
[SIEM\nForwarder] as siem_h #0f3460
85+
[Cloud\nUploader] as cloud_h #0f3460
86+
}
87+
88+
scanner --> publisher : <color:#AAAAAA>BLE advertisement\nraw payload</color>
89+
publisher --> mosquitto : <color:#AAAAAA>MQTT publish\nlima/events</color>
90+
mosquitto --> router : <color:#AAAAAA>subscribe\nlima/#</color>
91+
router --> verifier : <color:#AAAAAA>verify signature</color>
92+
verifier --> sqlite : <color:#9B59B6>write event\n[always]</color>
93+
verifier --> queue : <color:#AAAAAA>queue for egress</color>
94+
queue --> push_h : <color:#7EC8E3>flush when online</color>
95+
queue --> siem_h : <color:#7EC8E3>flush when online</color>
96+
queue --> cloud_h : <color:#7EC8E3>flush when online</color>
97+
}
98+
99+
ble --> scanner : <color:#FF6B35>BLE 5.0 Coded PHY\n[Encrypted + Signed]</color>
100+
101+
note right of crypto
102+
<color:#27AE60>CryptoCell-310
103+
hardware accelerated
104+
ECDSA-P256 signing
105+
per-event nonce</color>
106+
end note
107+
108+
note right of sqlite
109+
<color:#27AE60>Always written first
110+
Queue-and-flush pattern
111+
Survives internet outage
112+
Local audit trail intact</color>
113+
end note
114+
115+
note bottom of verifier
116+
<color:#27AE60>Rejects unsigned
117+
or tampered events
118+
before any egress</color>
119+
end note
120+
121+
@enduml

0 commit comments

Comments
 (0)