GEPS 008: File Organization
Gramps was originally written as a GTK application intended to only be used in a graphical environment. Over time, support has been added for other user interfaces (CLI and web). In order to reduce unnecessary dependencies between the various interfaces, the software architecture is being organized into 5 main categories of code - each in their own directory.
The descriptions below provide the general purpose and scope of each category. Not all code in the source tree conforms to this architecture yet.
However, new code should attempt to move the source in a direction that conforms to this organization. Moving to this architecture is an ongoing process and a work in progress.
- 1 gramps/gen/
- 1.1 gramps/gen/db/
- 1.2 gramps/gen/display/
- 1.3 gramps/gen/lib/
- 1.4 gramps/gen/plug/
- 1.5 gramps/gen/plug/report/
- 1.6 gramps/gen/filters/
- 1.6.1 gramps/gen/filters/rules
- 1.6.2 gramps/gen/filters/rules/citation
- 1.6.3 gramps/gen/filters/rules/event
- 1.6.4 gramps/gen/filters/rules/family
- 1.6.5 gramps/gen/filters/rules/media
- 1.6.6 gramps/gen/filters/rules/note
- 1.6.7 gramps/gen/filters/rules/person
- 1.6.8 gramps/gen/filters/rules/place
- 1.6.9 gramps/gen/filters/rules/repository
- 1.6.10 gramps/gen/filters/rules/source
- 1.7 gramps/gen/mime/
- 2 gramps/gui/
- 3 gramps/cli/
- 4 gramps/web/
- 5 gramps/plugins/
- 6 Related Gramps Bugs
This directory contains the core components of Gramps. The gramps/gen/ directory shall not have any dependencies on the other top level source directories (gramps/gui/, gramps/cli/, gramps/web/, etc). The gramps/gen/ directory also shall not have any dependencies on the gtk library.
The word "gen" was chosen because it is short for "general" and "generic" which is a good way to describe code in this directory because it doesn't depend on or require a specific user interface. "gen" is also short for "genealogy" which is also an appropriate term for the code in this directory because it implements the "business logic" that makes Gramps a genealogy application.
The db directory contains the code for manipulating the Gramps database.
The display directory contains business logic for displaying database objects in textual form. For example, localized date display and name display code.
The lib directory contains the classes for the database objects.
The plug directory contains the core logic for registering and running plugins. It also contains any utility classes used by plugins.
This directory contains the base class for reports, constants, and basic utilities.
The filters directory contains the code for filtering objects.
The rules directory contains the code for rules used by the filters.
The mime directory contains the code for handling mime types in Gramps.
This directory contains the code for the desktop graphical user interface. Any file that imports GTK or glade should live in this directory or a subdirectory of this directory.
The gui.plug directory contains windows, dialogs, and tools that the plugins will use.
This directory has the dialogs for running reports, such as selection criteria, file pickers, and paper sizes.
This directory contains the code for the various graphical "views" in the GUI.
This directory contains the code for the models used in the GUI.
This directory contains the code for the object selection dialogs in the GUI.
This directory contains the code for the object editors used in the GUI.
This directory contains the code for the tabs used in the GUI editors.
This directory contains the code for merging objects in the GUI.
This directory contains widgets used by the GUI
This directory contains the code for the command line interface.
This directory contains the code for the gramps-connect web interface.
This directory contains all the plugins for Gramps.
This directory contains all the document generator plugins.
This directory contains all the gramplet plugins.
This directory contains all the tool plugins.
This directory contains all the report plugins.