Modularization
FloorPlan's source code is distributed across multiple modules, each responsible for one aspect of domain modeling or one stage of the processing pipeline.
floorplan-cli
Home for the command line argument parsing logic, and general aspects of application bootstrapping.
The cli
module is one possible interaction point between users and FloorPlan, but can be replaced by other user interfaces, like a Gradle plug-in or potentially a fully-fledged GUI application.
DBML models
Barebones Kotlin models of the DBML object concepts.
This module has no logic in it other than housing the domain representations of Tables, References, Indexes, etc.
Processing pipeline
Consumer
This stage of the processing pipeline is responsible for translating the user input files into DBML models, representing each of the entities and relationships.
So far, FloorPlan processes:
- Room schemas, by deserializing their JSON representations (see sample) on the
:room-consumer
module. - SQLite
db
files, by connecting to them via a JDBC driver and query metadata of entities and relationships. - DBML schema files.
Visualization
Depending on the output file format, FloorPlan uses different mechanisms to translate the input.
The DBML models are rendered as text by a module of its own, while FloorPlan relies on GraphViz visualization library to render image representations.