The project follows a structured layout to ensure scalability and maintainability. Below is an overview of the folder structure:
/__mocks__: Used for mocking third-party dependencies in unit tests, more info here./app: Reserved for Next.js routing. No logic should be implemented here; only imports the layout and pages from the modules, more info here./assets: Contains the application assets such as locales, images, and fonts./modules: Used to implement the application business logic, split into separate modules. More info in the modules section below./plugins: Contains the plugin-specific logic, with each plugin having its own folder. More info in the plugins section below./shared: Contains components, hooks, and utilities shared across the application, used by both modules and plugins./test: Used to set up the Jest environment for unit tests.
The application logic is organized under the src/modules folder. Each module follows the same folder structure for
consistency:
- The
Applicationmodule contains global application logic such as global layouts, application wrappers, and providers.
- The
CreateDaomodule is used for the logic and pages for creating a DAO.
- The
Dashboardmodule has the code and utilities for displaying the DAO dashboard, providing an overview of the latest DAO activities and members.
- The
Exploremodule is used for the explore section of the Aragon App, allowing navigation and exploration of different DAOs.
- The
Financemodule handles everything related to DAO finance, including balances, transactions, and deposit/withdraw actions.
- The
Governancemodule has the logic for governing and managing a DAO, including the proposal creation process, DAO members, and proposals pages.
- The
Settingsmodule contains the logic and pages for managing DAO settings.
Each module within the src/modules folder follows a consistent structure:
/api: Contains logic for interacting with any third-party service. Each service has its folder with service logic, a/domainfolder for TypeScript interfaces, and React Query queries and mutations./components: Contains reusable module-specific components./constants: Contains constants reused across the module./pages: Contains module-specific pages./utils: Contains utilities shared within the module./testUtils: Contains testing utilities needed for unit tests.
This folder structure ensures clarity and maintainability, making it easier to extend the application with additional modules or plugins in the future.
The plugins folder contains plugin-specific logic, with each plugin having its own folder. Currently maintained
plugins include:
multisig: Manage a DAO through a list of wallets with the same voting power.token: Manage a DAO through a governance token where an individual's voting power is directly proportional to the number of tokens they hold.admin: Grants execution permission on the DAO to a single address, typically used for setting up the DAO's governance process.spp: The Staged Proposal Processor plugin is a multi-stage proposal processor where proposals progress through defined stages.
Each plugin withing the src/plugins folder follows a consistent structure:
/components: Contains a single directory for each registered slot component. Any additional components or hooks scoped to this slot will be in their respective folders inside the slot component folder. There is one exception to this right now, reserved for plugin actions, which will be stored in a single directory for exampletokenActions/hooks: Contains a single directory for each registered slotFunction that is a hook./constants: Contains constants reused across the plugin./utils: Contains utilities shared within the plugin components and hooks./testUtils: Contains testing utilities needed for unit tests./types: Contains all of the types and enums relating to the plugin./dialogs: Contains all dialogs for the plugin.