Refactor DMS
the way libp2p is used, the db calls and generally the entire method used to share global data is not very clean and because of that the unit tests fail easily when new functionality is added.
The code needs heavy refactoring but for now, libp2p and db will be the focus.
## Detail
The dependency between packages needs to be reduced to none and each package should have a single responsibility. An additional module will be used for DMS specific implementation.
Each module will be abstracted by its own and each one will be done on its own ticket.
Details will be updated here as each ticket makes progress. This ticket will be a meta ticket that tracks the tickets dealing with more specific issues:
- Container/Service: device-management-service#204
- Libp2p/Networking: device-management-service#205
- Database: device-management-service#206
epic