Mercury Architecture
The Mercury-IM repository contains multiple modules that contain different functionality.
The idea behind this is to separate out different functionalities and concerns into modules that can be resused easily.

The database scheme currently looks roughly like this:

app
The app
submodule contains the main Android app.
It depends on core and persistence-room.
Basically this submodule embeds the logic of the core module in an Android environment.
Contents
- Activities, Fragments
- Layouts
- Android-specific services
- in general Android related stuff
core
The core
module is a plain Java library which contains most of the XMPP logic which is unrelated to Android.
It depends on persistence.
The idea behind the core module is to have the XMPP related logic tightly packed so that at some point it will be easy to create a Mercury IM desktop app by simply embedding the core module in a UI framework like JavaFX.
Contains
- Smack stuff
- MercuryConnection
- XmppEventHandler (Roster, Message...)
persistence
The persistence
module is a plain Java library which defines a set of interfaces that represent persistence related classes like models and repositories.
Contains
- Entities (Interfaces)
- Repositories
persistence-room
persistence-room
is an Android Library which extends persistence
classes specifically for the use with Android Jetpacks Room Database.
Contains
- RoomDAOs
- RoomEntities
- RoomRepositories