@mdk/foundation
Domain-specific components, hooks, and constants for mining applications
The foundation package provides domain-specific components, hooks, and constants
built on top of @mdk/core. These are higher-level building blocks designed for common Bitcoin mining
application use cases.
Prerequisites
- Complete the installation
Show steps
# Clone the repository
git clone https://github.com/tetherto/miningos-ui-kit.git
cd miningos-ui-kit
# Install dependencies
pnpm install
# Build all packages
pnpm build- Add the dependency to your app's
package.json
{
"dependencies": {
"@mdk/foundation": "workspace:*"
}
}What's included
| Feature | Description |
|---|---|
| Operations centre | Bitcoin mining operations monitoring and management components |
| Settings | Administrative settings UI |
| Hooks | Reusable React hooks |
| Constants | Shared constants and configurations |
Operations centre
Domain-specific components for Bitcoin mining operations monitoring and management, including device explorers, vendor container UIs, dashboard widgets, charts, pool management, and data export.
See the Operations centre reference for the full component list with demo links.
Settings
Pre-built settings UI for common administrative tasks:
SettingsDashboard: main settings container with accordion sectionsFeatureFlagsSettings: toggle feature flags on/offHeaderControlsSettings: configure header display optionsImportExportSettings: import/export configuration dataRBACControlSettings: role-based access control settings- User management modals: add, manage, and confirm user changes
Hooks
Reusable React hooks for monitoring and UI patterns:
- Monitoring hooks:
useBeepSound,useChartDataCheck - UI hooks:
useNotification,useHasPerms,useHeaderControls,useLocalStorage,usePagination
Constants
Shared constants for consistency across your application: permission definitions, role configurations, settings defaults, and error codes.
Import examples
// Import components
import { SettingsDashboard, FeatureFlagsSettings } from '@mdk/foundation'
// Import from specific subpath
import { SettingsDashboard } from '@mdk/foundation/domain'
