meshtastic / Meshtastic-Android

Android application for Meshtastic
https://meshtastic.org
GNU General Public License v3.0
737 stars 212 forks source link

refactor: introduce `NodeEntity` protobuf-based database entity #1250

Closed andrekir closed 2 months ago

andrekir commented 2 months ago

This PR aims to decouple the NodeInfo API layer from the database by introducing a new protobuf-based entity.

By separating the internal database model from the API representation, this reduces tight coupling and makes it easier to update or modify the internal database without impacting the API. Using protobuf ensures changes to the project's protobuf definitions are available in the database without migrations or schema changes, improving database flexibility and reducing maintenance overhead.

Key changes:

Note:

jamesarich commented 2 months ago

Nice. It'll be good to get this better aligned.

andrekir commented 2 months ago

yeah. next big lift will be refactoring /mesh/ui/NodeInfo.kt with the new NodeEntity.