diff --git a/docs/specifications/modules.md b/docs/specifications/modules.md index 78079981268..474ed93ea75 100644 --- a/docs/specifications/modules.md +++ b/docs/specifications/modules.md @@ -12,20 +12,23 @@ Core modules contain the baseline logic and functionality to build and run the a ### Modules -- `account`: Manages the accounts of a profile -- `app`: Application configuration, setup, settings, etc. -- `error`: Generic code for building domain-specific errors -- `i18n`: Logic related to internationalization, languages, locales, etc. -- `network`: Client options and node configuration, protocol settings, etc. -- `nft`: Managing NFTs, e.g. claiming, burning, transferring -- `profile`: General application logic to support profiles -- `profile-manager`: Library-related logic for managing and interacting with profiles -- `router`: Manage application views and flows -- `token`: Deals with tokens, metadata, conversion rates, registry, etc. -- `utils`: Useful and generic functions, e.g. formatting strings, converting units +- `account` - Manages the accounts of a profile +- `app` - Application configuration, setup, settings, etc. +- `error` - Generic code for building domain-specific errors +- `i18n` - Logic related to internationalization, languages, locales, etc. +- `ledger` - Code related to Ledger Nano profiles and devices +- `network` - Client options and node configuration, protocol settings, etc. +- `nft` - Managing NFTs, e.g. claiming, burning, transferring +- `profile` - General application logic to support profiles +- `profile-manager` - Library-related logic for managing and interacting with profiles +- `router` - Manage application views and flows +- `stronghold` - Code for Stronghold operations, utils, constants, etc. for software profiles +- `token` - Deals with tokens, metadata, conversion rates, registry, etc. +- `utils` - Useful and generic functions, e.g. formatting strings, converting units ### Rules +- **MAY** import code from other core modules - **MAY NOT** import code from context or auxiliary modules ## Contexts @@ -35,15 +38,17 @@ Context modules contain the logic specific to an area of the application. ### Modules - `collectibles` - managing or viewing an account's NFTs +- `developer` - using developer tools to make lives easier - `onboarding` - creating or restoring a profile or initial app setup - `settings` - changing configuration of the app, profile, network, etc. - `staking` - staking tokens to receive more tokens -- `voting` - using tokens to cast votes for community proposals -- `wallet` - sending or receiving coins and tokens +- `governance` - using tokens to cast votes for community proposals +- `wallet` - sending or receiving coins and tokens, i.e. asset management ### Rules -_None_ +- **MAY** import code from core and auxiliary modules +- **SHOULD NOT** import code from other context modules ## Auxiliary @@ -59,3 +64,4 @@ Auxiliary modules are non-essential pieces of code that help support the applica ### Rules - **MAY NOT** import code from context modules +- **SHOULD NOT** import code from other auxiliary modules diff --git a/packages/desktop/App.svelte b/packages/desktop/App.svelte index 93ad0650854..913c022f047 100644 --- a/packages/desktop/App.svelte +++ b/packages/desktop/App.svelte @@ -16,7 +16,7 @@ import { Electron } from '@lib/electron' import { addError } from '@core/error' import { showAppNotification } from '@lib/notifications' - import { openPopup, popupState } from '@lib/popup' + import { openPopup, popupState } from '@auxiliary/popup' import { Dashboard, LoginRouter, OnboardingRouter, Settings, Splash } from 'shared/routes' import { onDestroy, onMount } from 'svelte' import { getLocalisedMenuItems } from './lib/helpers' diff --git a/packages/mobile/App.svelte b/packages/mobile/App.svelte index a840a275371..0826ca41c30 100644 --- a/packages/mobile/App.svelte +++ b/packages/mobile/App.svelte @@ -27,7 +27,7 @@ import { Electron } from 'shared/lib/electron' import { addError } from '@core/error' import { showAppNotification } from 'shared/lib/notifications' - import { openPopup } from 'shared/lib/popup' + import { openPopup } from '@auxiliary/popup' import { DashboardRouter, LoginRouter, OnboardingRouter } from './routes' import { onDestroy, onMount } from 'svelte' import { get } from 'svelte/store' diff --git a/packages/mobile/routes/login/views/EnterPinView.svelte b/packages/mobile/routes/login/views/EnterPinView.svelte index 22c009e4df6..6af9e5ee96a 100644 --- a/packages/mobile/routes/login/views/EnterPinView.svelte +++ b/packages/mobile/routes/login/views/EnterPinView.svelte @@ -5,7 +5,7 @@ import { activeProfile, login, resetActiveProfile } from '@core/profile' import { loginRouter } from '../../../lib/core/router' import { Platform } from '@lib/platform' - import { openPopup, popupState } from '@lib/popup' + import { openPopup, popupState } from '@auxiliary/popup' import { validatePinFormat } from '@lib/utils' import { Icon, PinInput, Profile, Text, TextType } from 'shared/components' import { onDestroy } from 'svelte' diff --git a/packages/mobile/routes/login/views/SelectProfileView.svelte b/packages/mobile/routes/login/views/SelectProfileView.svelte index d6c95f152a4..976f97715f6 100644 --- a/packages/mobile/routes/login/views/SelectProfileView.svelte +++ b/packages/mobile/routes/login/views/SelectProfileView.svelte @@ -11,7 +11,7 @@ shouldBeDeveloperProfile, updateOnboardingProfile, } from '@contexts/onboarding' - import { openPopup } from '@lib/popup' + import { openPopup } from '@auxiliary/popup' $: dark = $appSettings.darkMode @@ -59,7 +59,7 @@