Electron + TypeScript desktop app for Dynamics 365 Business Central Docker containers with Claude AI troubleshooting, one-click deployment, and PowerShell integration.
Desktop app for:
- π³ Business Central container lifecycle management
- π Real-time log viewing and diagnostics
- πΎ Automated backup operations
- π€ AI-powered troubleshooting (Claude API)
- β‘ One-click deployment via Install-BC-Helper.ps1
| Component | Requirement |
|---|---|
| OS | Windows 10/11 |
| Docker | Docker Desktop for Windows |
| Node.js | 18+ (for development) |
| PowerShell | 7.0+ (bundled scripts) |
| Optional | Anthropic API key (AI features) |
Option 1: Run Installer (Recommended)
# Download from GitHub Releases
# Run: BC Container Manager-Setup-1.0.0.exe
# Follow installation wizardOption 2: Portable Executable
# Download: BC Container Manager-Portable-1.0.0.exe
# Run directly without installation# Clone repository
git clone https://github.com/azullus/bc-docker-manager.git
cd bc-docker-manager
# Install dependencies
npm install
# Run Electron app in development mode
npm run electron:dev
# Or run as web app only
npm run devThe main dashboard displays all Business Central containers with real-time status monitoring. View total containers, running/stopped counts, and backup statistics at a glance. Quick actions for Stop, Restart, Open BC, and container Details.
Prerequisites checker validates your environment before container deployment. Monitors Docker Engine status, BcContainerHelper module, Hyper-V, WSL 2, and system memory requirements. Quick links to documentation resources.
One-click container deployment with version selection. Configure container name, authentication mode, and options like Test Toolkit and scheduled backups. Real-time deployment output panel shows progress.
Choose from the latest stable release, preview versions, or specific BC versions (BC 13 through BC 27).
Centralized backup management interface. Track total backups, storage usage, and view the most recent backup date. Create new backups with one click, restore from any backup, and delete old backups. Backups grouped by container.
Claude-powered troubleshooting assistant for Business Central container issues. Quick action buttons for common problems: startup failures, performance issues, license problems, and extension errors. Context-aware suggestions based on your container configuration.
Configure your BC Container Manager preferences. Set your Anthropic API key for AI features, specify backup directory location, and adjust dashboard refresh intervals. Includes Docker diagnostics tools and app version info.
βββββββββββββββββββββββββββββββββββββββββββ
β Electron Main Process β
β βββββββββββββββββββββββββββββββββββ β
β β electron/main.js β β
β β - Window management β β
β β - IPC handlers β β
β β - PowerShell execution β β
β βββββββββββββββββββββββββββββββββββ β
β β IPC β
β βββββββββββββββββββββββββββββββββββ β
β β Renderer Process (Next.js) β β
β β - React components β β
β β - UI/UX β β
β β - Client-side logic β β
β βββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββ
β β
Docker API PowerShell Scripts
Key Files:
electron/main.js- Electron entry point, window creationelectron/preload.js- Secure IPC bridgeelectron/ipc-handlers.js- Backend operations (Docker, backups, AI)lib/electron-api.ts- Unified API for renderer process
The app works in two modes:
- Electron Mode (Desktop) - Uses IPC for Docker/PowerShell operations
- Web Mode (Fallback) - Uses Next.js API routes via fetch
- Dashboard View - All BC containers at a glance
- Status Monitoring - Real-time container state
- Quick Actions - Start, stop, restart, remove with one click
- Port Mappings - View exposed ports and services
- Resource Stats - CPU, memory, network usage
- Real-time Streaming - Live container logs
- Search & Filter - Find specific log entries
- Export - Save logs to file for analysis
- Color-coded - Error/warning/info highlighting
- Automated Backups - Schedule container backups
- Backup Browser - View all existing backups
- Restore Operations - Restore from backup
- Retention Policy - Auto-delete old backups
- Size Tracking - Monitor backup disk usage
Powered by Claude API:
- Diagnose container startup failures
- Suggest fixes for common BC issues
- License troubleshooting assistance
- Extension deployment guidance
- Performance optimization tips
Context-aware: AI has knowledge of Business Central Docker architecture and common issues.
Integrated PowerShell deployment:
# Bundled script: scripts/Install-BC-Helper.ps1
# Deploys BC containers with:
- Automatic version selection
- License import
- Port configuration
- Database initializationbc-docker-manager/
βββ electron/
β βββ main.js # Electron main process
β βββ preload.js # IPC bridge (secure)
β βββ ipc-handlers.js # Backend operations
β βββ rag-helper.js # RAG integration for offline AI
β
βββ app/ # Next.js App Router
β βββ dashboard/page.tsx # Container list view
β βββ setup/page.tsx # Docker prerequisites checker
β βββ create/page.tsx # Container creation wizard
β βββ container/page.tsx # Container details view
β βββ backups/page.tsx # Backup management
β βββ troubleshoot/page.tsx # AI chat interface
β βββ settings/page.tsx # App configuration
β βββ layout.tsx # Main layout with sidebar
β
βββ components/
β βββ ContainerCard.tsx # Container display component
β βββ LogViewer.tsx # Real-time log viewer
β βββ AIChat.tsx # AI chat interface
β βββ DeploymentModal.tsx # Container creation dialog
β βββ HNSErrorRecovery.tsx # HNS error recovery UI
β βββ NetworkDiagnostics.tsx # Network health diagnostics
β βββ ErrorBoundary.tsx # React error boundary
β βββ Sidebar.tsx # Navigation menu
β βββ Providers.tsx # React context providers
β
βββ lib/
β βββ electron-api.ts # Unified API layer
β βββ docker-api.ts # Docker Engine API (web mode)
β βββ ai-client.ts # Claude API integration
β βββ hns-error-detector.ts # HNS error pattern detection
β βββ types.ts # TypeScript interfaces
β βββ deployment-context.tsx # Deployment state management
β
βββ scripts/
β βββ Deploy-BC-Container.ps1 # Direct Docker deployment (primary)
β βββ Install-BC-Helper.ps1 # BcContainerHelper deployment (legacy)
β βββ Fix-HNS-State.ps1 # HNS cleanup script
β βββ Diagnose-HNS-Ports.ps1 # Network diagnostics
β βββ Backup-BC-Container.ps1 # Backup operations
β βββ Restore-BC-Container.ps1 # Restore operations
β
βββ screenshots/ # Application screenshots
β βββ dashboard.png
β βββ docker-setup.png
β βββ create-container.png
β βββ create-container-versions.png
β βββ backups.png
β βββ troubleshoot.png
β βββ settings.png
β
βββ electron-builder.yml # Electron build configuration
βββ package.json # Dependencies and scripts
βββ README.md # This file
Settings stored in: %APPDATA%/bc-container-manager/settings.json
{
"anthropicApiKey": "sk-ant-...",
"backupRoot": "C:\\BCBackups",
"autoRefreshInterval": 5000,
"defaultContainerPrefix": "bcserver"
}Create .env.local for development:
# Anthropic API key (optional, for AI features)
ANTHROPIC_API_KEY=sk-ant-your-key-here
# Backup directory
BACKUP_ROOT=C:\BCBackups
# Docker socket (default for Windows)
DOCKER_HOST=//./pipe/docker_engine- Click "New Container" button
- Select BC version (Latest, LTS, Specific)
- Configure:
- Container name
- License file (optional)
- Ports (Web Client, SOAP, OData, DEV)
- Authentication mode
- Click "Deploy" to run Install-BC-Helper.ps1
- Monitor deployment progress in real-time
Start/Stop:
- Click power icon on container card
- Or use bulk actions from dashboard
View Logs:
- Click container name β Logs tab
- Search for errors or specific text
- Export to file for analysis
Create Backup:
- Container Details β Backups
- Click "Create Backup"
- Specify backup name and location
- Navigate to Troubleshoot page
- Describe your issue in chat
- AI provides context-aware suggestions
- Follow recommended fixes
- Run suggested PowerShell commands if needed
Example queries:
- "Container won't start after restart"
- "Getting license error on login"
- "Web client shows 404 error"
- "How do I import a BC extension?"
# Development (web only)
npm run dev # Start Next.js dev server
# Development (Electron)
npm run electron:dev # Start Electron + Next.js
# Building
npm run build # Build Next.js static export
npm run electron:build:win # Build Windows installer
npm run electron:build:portable # Build portable .exe
# Testing
npm test # Run Jest tests
npm run test:coverage # With coverage report
npm run lint # ESLint validationAfter running npm run electron:build:win:
dist/
βββ BC Container Manager-Setup-1.0.0.exe # Installer (147 MB)
βββ BC Container Manager-Portable-1.0.0.exe # Portable (145 MB)
βββ win-unpacked/ # Unpacked app files
The app filters for containers with names containing bc (case-insensitive).
Compatible naming:
mybc-testbcserver-devbc-productionsandbox-bc25
Create with BcContainerHelper:
New-BcContainer -containerName "mybc-dev" `
-artifactUrl (Get-BcArtifactUrl -type Sandbox -version "25.0") `
-accept_eula# Run all tests
npm test
# Watch mode
npm test -- --watch
# Coverage report
npm run test:coverageTest suites:
__tests__/components/- React component tests__tests__/lib/- Utility function tests
| Channel | Description | Parameters |
|---|---|---|
docker:list |
List containers | - |
docker:start |
Start container | containerId |
docker:stop |
Stop container | containerId |
docker:logs |
Get logs | containerId, tail |
powershell:run |
Execute script | scriptPath, args |
backup:create |
Create backup | containerId, path |
ai:chat |
Send AI message | message, history |
Fallback API routes for non-Electron usage:
| Endpoint | Method | Description |
|---|---|---|
/api/containers |
GET | List all containers |
/api/containers |
POST | Container action |
/api/logs |
GET | Container logs |
/api/backups |
GET | List backups |
/api/backups |
POST | Create backup |
/api/ai |
POST | AI chat |
- IPC Isolation: Context isolation enabled in Electron
- No eval(): Secure script execution via spawn
- API Keys: Stored encrypted in %APPDATA%
- Docker Socket: Local access only (no remote exposure)
Issue: Double-clicking the executable shows error or nothing happens
Solutions:
-
Missing Dependencies
# Check Node.js version node --version # Should be 18.0.0 or higher # Check if Docker Desktop is running docker info
- Fix: Install Node.js 20+ or start Docker Desktop
-
Electron Build Issues
# Clear build cache rm -rf node_modules .next dist npm install npm run build -
Port Conflict (Dev Mode)
- Default port 3000 may be in use
- Fix: Kill process or change port in
package.json
# Find process using port 3000 netstat -ano | findstr :3000 # Kill process (replace PID) taskkill /PID <process_id> /F
Issue: "Cannot connect to Docker daemon" error
Solutions:
-
Docker Desktop Not Running
# Check Docker status docker ps # If error, start Docker Desktop # Windows: Start menu β Docker Desktop
-
Docker Pipe Permissions
# Test pipe access [System.IO.Directory]::GetFiles("\\.\pipe\") | Select-String docker # Should show: docker_engine
- Fix: Restart Docker Desktop
- Fix: Add user to docker-users group (Windows)
-
WSL2 Backend Issues
- If using WSL2 backend
- Fix:
wsl --updateand restart Docker
Issue: Containers not appearing in dashboard
Solutions:
-
Filter Pattern Mismatch
- App filters for containers with names containing
bc - Fix: Rename containers to include "bc" in the name:
docker rename old-name mybc-container
- App filters for containers with names containing
-
Container Status Polling Failed
- Check Docker API accessibility
docker ps --format "{{.Names}}"- If works in CLI but not app, check IPC handlers
-
Refresh Dashboard
- Click refresh icon or restart app
- Keyboard shortcut: F5 (if implemented)
Issue: AI chat returns errors or no response
Solutions:
-
Missing API Key
- Go to Settings β Enter Anthropic API key
- Get key from Anthropic Console
-
API Key Invalid
# Test API key manually curl https://api.anthropic.com/v1/messages \ -H "x-api-key: YOUR_KEY" \ -H "anthropic-version: 2023-06-01"
- Fix: Regenerate key in Anthropic Console
-
Rate Limiting
- Anthropic free tier: Limited requests/minute
- Fix: Wait 60 seconds or upgrade plan
-
Network Issues
- Corporate firewall may block api.anthropic.com
- Fix: Use VPN or whitelist domain
Issue: Install-BC-Helper.ps1 fails or doesn't run
Solutions:
-
Execution Policy
# Check current policy Get-ExecutionPolicy # Allow script execution (as Admin) Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
-
Missing BcContainerHelper Module
# Install module Install-Module BcContainerHelper -Force # Verify installation Get-Module BcContainerHelper -ListAvailable
-
Script Path Issues
- Scripts bundled in
scripts/folder - Fix: Use absolute paths in IPC calls
- Scripts bundled in
-
Admin Privileges Required
- Some Docker operations need admin
- Fix: Run app as administrator (right-click β Run as administrator)
Issue: Backup creation fails or restore doesn't work
Solutions:
-
Backup Path Not Writable
# Test backup directory permissions Test-Path "C:\BC-Backups" -PathType Container New-Item -Path "C:\BC-Backups\test.txt" -ItemType File
- Fix: Choose different backup location in Settings
-
Container Not Running
- Cannot backup stopped container
- Fix: Start container first, then backup
-
Insufficient Disk Space
# Check free space Get-PSDrive C | Select-Object Used,Free
- Fix: Free up space or choose different drive
-
Restore Overwrites Warning
- App should warn before overwriting
- Workaround: Manually rename container before restore
Issue: npm run build or npm run electron:build fails
Solutions:
-
Dependency Issues
# Clear npm cache npm cache clean --force rm -rf node_modules package-lock.json npm install -
TypeScript Errors
# Run type check npx tsc --noEmit # Common fix: Update types npm install --save-dev @types/node@latest @types/react@latest
-
Next.js Build Fails
# Check for syntax errors npm run lint # Build with verbose output npm run build -- --debug
-
Electron Builder Fails
- Windows: Requires
electron-builderdependencies
# Install Windows build tools npm install --global windows-build-tools - Windows: Requires
Check Application Logs:
# Electron dev console
# Press F12 in app to open DevTools
# Check Next.js logs
npm run dev # Shows server-side errors
# Check Electron main process logs
# Look in terminal where app was launchedEnable Verbose Logging:
# Set environment variable before launching
$env:DEBUG="*"
npm run electron:devCommon Log Locations:
- Electron logs:
%APPDATA%/bc-container-manager/logs/ - Backup logs: Check backup directory for
.logfiles
| Layer | Technology |
|---|---|
| Desktop | Electron Latest |
| Framework | Next.js 14 (App Router) |
| Language | TypeScript 5 |
| Styling | Tailwind CSS 3 |
| Docker API | Native IPC to PowerShell/Docker |
| AI | Anthropic Claude API |
| Build | electron-builder |
| Testing | Jest + React Testing Library |
- cosmicbytez-ops-toolkit - PowerShell automation suite with Install-BC-Helper.ps1 and Docker management scripts
- CosmicPing - .NET 8 C# network diagnostic tool for IT operations
- docker-infrastructure - Docker Compose IaC for self-hosted services with Traefik and monitoring
- cosmicbytez-homelab - Home lab infrastructure and media server documentation
- cosmicbytez-secops - Security operations, PNPT training, and ethical hacking resources
MIT License - See LICENSE.txt for details.
Built by CosmicBytez for Business Central DevOps | Windows Desktop | Docker Orchestration






