DUFT Apps and Navigation#

DUFT Config structures dashboards, UI elements, data tasks, and other configurations into Apps, creating a modular and scalable architecture. Each App is simply a directory inside the apps/ folder, representing a distinct functional unit within DUFT. This design allows for a logical separation of concerns, making it easier to manage configurations for different workflows while ensuring flexibility in deployment.

Key Engineering Decisions: Apps and Navigation

Several key engineering choices guided the design of Apps and Navigation, ensuring scalability, flexibility, and maintainability:

  • Modular App Structure – Apps serve as logical containers, grouping related dashboards, queries, and tasks into self-contained units. This keeps configurations organised and ensures clean separation of functionalities.

  • Single vs Multi-App Flexibility – DUFT Config supports:

  • Multi-App Mode (apps/) – Allows multiple functional areas, each with its own dashboards and queries.

  • Single-App Mode (system/) – Suitable for simpler deployments with a single logical application.

  • Customisable Navigation – Each app defines its own menu in navigation.json, enabling tailored UI structures per application. This ensures that the frontend dynamically adapts to different configurations.

  • Separation of Core & User Settings – Global settings (e.g., data tasks, data connections) are shared across all apps, preventing duplication, while User-specific settings (e.g., passwords, environment variables) are isolated in the user section of DUFT Config, keeping installations customisable and secure.

App Structure#

Each app directory follows a standard structure:

app_1/                   # Example App

 ├── settings.json       # App metadata (name, description, preferences)
 ├── navigation.json     # Defines the menu structure for the app
 └── dashboards/         # Contains 3DL dashboard definitions
     └── sql/            # Optional: SQL queries for the dashboards
  • settings.json – Defines metadata about the app, including its name, description, and configuration preferences.

  • navigation.json – Specifies the menu structure for the app, determining how dashboards and features are arranged.

  • dashboards/ – Contains 3DL files defining dashboards available within the app, as well as queries

  • dashboards/sql/ – (Optional) Contains stored SQL queries that power dashboards

Shared Configurations Across Apps#

Certain system-wide configurations do not belong to any single App and are instead centrally managed in the system/ directory:

system/
 ├── navigation.json        # Defines the global navigation structure
 ├── theme.json             # Defines UI colours and branding
 ├── data_connections.json  # Stores database connection details
 ├── data_tasks.json        # Defines scheduled and on-demand data tasks
 ├── assets/                # Stores images and static resources
 ├── data_tasks/            # Contains Python/Jupyter scripts for ETL tasks
 └── dashboards/            # Contains global dashboards (if no apps are used)
     └── sql/               # Stored SQL queries for global dashboards
  • Data Connections (data_connections.json) – Defines database credentials and sources, allowing queries to dynamically fetch credentials without hardcoding them.

  • Data Tasks (data_tasks.json) – Manages ETL processes, ensuring they are centrally available to all Apps.

  • Assets (assets/) – Stores images, logos, and other static files.

Single-App Mode#

While DUFT Config supports multiple Apps, it can also function in a Single-App Mode by using the system/ directory instead of apps/. This is ideal for simpler deployments, where a single logical application is sufficient, such as s health facility dashboard with a unified UI or a standalone reporting tool without the need for multiple functional areas.

In this setup, all dashboards, queries, and tasks reside in system/ rather than in separate  App folders.

User-Specific Configurations#

DUFT also includes a user/ directory, which holds installation-specific settings independent of Apps.

user/
 └── config.json     # Stores passwords, API keys, and sensitive values

This file contains environment-specific settings, including API credentials, custom feature flags and system-wide parameters. This ensures that sensitive information is not hardcoded into DUFT Config, making deployments secure and easily customisable per installation.