Adam (Ditto cofounder) - Ditto can be used either as the primary datastore in the client app (we call these "Small Peers"), or alongside others local DBs (existing apps adopting Ditto tend to pick off key P2P features and run Ditto with others like Couchbase, SQLite, or Core Data - and we have built connectors to help with this). With regards to the backend, our server product, or "Big Peer" provides webhooks or a Kafka topic of all changes to pipe them into other systems, so it similarly can be a primary datastore or middleware.
All-in-all, the design of Ditto is to be flexible so users can add Ditto to their architecture as easy as possible.