9.4 KiB
MoreMinimore Debranding and Custom Features Guide
This guide explains how to remove Dyad branding and dependencies from the codebase and integrate custom features for MoreMinimore.
Overview
The debranding process includes:
- ✅ Removing Dyad API dependencies (templates, updates, release notes)
- ✅ Removing Dyad Engine dependencies (AI processing)
- ✅ Removing pro features and restrictions
- ✅ Converting smart context from pro to standard feature
- ✅ Updating branding from "Dyad" to "MoreMinimore"
- ✅ Applying custom remove-limit feature
- ✅ Updating UI text and protocol handlers
Quick Start
Option 1: Automated Script (Recommended)
Run the automated debranding script:
# Make the script executable (if not already done)
chmod +x scripts/update-and-debrand.sh
# Run the debranding process
./scripts/update-and-debrand.sh
The script will:
- Create a backup of your current code
- Apply all debranding changes
- Install dependencies
- Test compilation
- Provide a summary of changes
Option 2: Manual Step-by-Step
If you prefer to apply changes manually, follow these steps:
Step 1: Create Backup
# Create a backup directory with timestamp
BACKUP_DIR="dyad-backup-$(date +%Y%m%d-%H%M%S)"
mkdir -p "$BACKUP_DIR"
cp -r src "$BACKUP_DIR/"
cp package.json "$BACKUP_DIR/"
cp -r scripts "$BACKUP_DIR/" 2>/dev/null || true
echo "Backup created: $BACKUP_DIR"
Step 2: Apply Custom Remove-Limit Feature
# Check if custom directory exists
if [ -d "src/custom" ]; then
# Apply remove-limit feature
if ! grep -q "REMOVE_LIMIT_ENABLED" src/custom/index.ts; then
echo "export const REMOVE_LIMIT_ENABLED = true;" >> src/custom/index.ts
echo "Remove-limit feature enabled"
fi
else
mkdir -p src/custom
echo "export const REMOVE_LIMIT_ENABLED = true;" > src/custom/index.ts
echo "Created custom directory and enabled remove-limit feature"
fi
Step 3: Remove Dyad API Dependencies
Remove Template API
Edit src/ipc/utils/template_utils.ts:
// Replace the fetch call to Dyad API
// FROM:
const response = await fetch("https://api.dyad.sh/v1/templates");
// TO:
// Dyad API templates removed - using local templates only
return [...localTemplatesData];
Remove Release Notes API
Edit src/ipc/handlers/release_note_handlers.ts:
// Replace the fetch call
// FROM:
const response = await fetch(`https://api.dyad.sh/v1/release-notes/${version}`);
// TO:
// Release notes disabled - removed Dyad API dependency
logger.debug(`Release notes check disabled for version ${version}`);
return { exists: false };
Remove Auto-Update API
Edit src/main.ts:
// Replace the update-electron-app configuration
// FROM:
const host = `https://api.dyad.sh/v1/update/${postfix}`;
updateElectronApp({
logger,
updateSource: {
type: UpdateSourceType.ElectronPublicUpdateService,
repo: "dyad-sh/dyad",
host,
},
});
// TO:
logger.info("Auto-update disabled - removed Dyad API dependency");
// Auto-update functionality removed to eliminate Dyad API dependency
// Users can manually update by downloading new releases from GitHub
Step 4: Remove Dyad Engine Dependencies
Edit src/ipc/utils/get_model_client.ts:
// Comment out Dyad Engine URL
// const dyadEngineUrl = process.env.DYAD_ENGINE_URL; // Removed - Dyad Engine dependency
// Remove Dyad Pro functionality
// Replace the entire "Handle Dyad Pro override" section with:
// Dyad Pro functionality removed - eliminated Dyad Engine dependency
// All models now use direct provider connections
if (dyadApiKey && settings.enableDyadPro) {
logger.warn(
`Dyad Pro was enabled but has been disabled to remove Dyad API dependency. Falling back to direct provider connection.`,
);
// Fall through to regular provider logic
}
// Comment out the import
// import { createDyadEngine } from "./llm_engine_provider"; // Removed - Dyad Engine dependency
Step 5: Remove Pro Features
Remove Pro Handlers
Edit src/ipc/ipc_host.ts:
// Remove this line:
registerProHandlers();
Remove Pro IPC Channels
Edit src/preload.ts:
// Remove these lines from the contextBridge:
"get-pro-status": () => ipcRenderer.invoke("get-pro-status"),
"enable-dyad-pro": (apiKey: string) => ipcRenderer.invoke("enable-dyad-pro", apiKey),
Step 6: Update Branding
Update package.json
{
"name": "moreminimore",
"productName": "moreminimore",
"description": "Free, local, open-source AI app builder"
}
Replace the dependency:
// FROM:
"@dyad-sh/supabase-management-js": "v1.0.1",
// TO:
"@moreminimore/supabase-management-js": "v1.0.1",
Update Protocol Handlers
Edit src/main.ts:
// Update protocol registration
app.setAsDefaultProtocolClient("moreminimore", process.execPath, [
path.resolve(process.argv[1]),
]);
// Update protocol validation
if (parsed.protocol !== "moreminimore:") {
dialog.showErrorBox(
"Invalid Protocol",
`Expected moreminimore://, got ${parsed.protocol}. Full URL: ${url}`,
);
return;
}
Step 7: Convert Smart Context to Standard Feature
Edit src/ipc/utils/smart_context_store.ts:
// Remove pro restriction
// FROM:
if (settings.enableDyadPro) {
// TO:
// Smart context now available for all users - removed pro restriction
if (true) {
Step 8: Update UI Text
Update "CodeBase Context" to "Context Settings" in components:
# Find and replace in all TSX files
find src/components -name "*.tsx" -type f -exec sed -i.bak 's/CodeBase Context/Context Settings/g' {} \;
find src/components -name "*.tsx" -type f -exec rm {}.bak \;
Step 9: Clean Up Unused Imports
Clean up main.ts
// Comment out unused import
// import { updateElectronApp, UpdateSourceType } from "update-electron-app"; // Removed - Dyad API dependency
Clean up release_note_handlers.ts
// Remove unused import
// import fetch from "node-fetch";
Step 10: Install Dependencies and Test
# Install dependencies
npm install
# Test TypeScript compilation
npm run ts
# Test the application
npm start
Validation
After applying the changes, validate that:
- TypeScript compilation passes:
npm run ts - Application starts without errors:
npm start - No Dyad API calls in the codebase:
grep -r "api\.dyad\.sh" src/ - No Dyad Engine calls:
grep -r "engine\.dyad\.sh" src/ - Custom features are enabled: Check
src/custom/index.ts
Troubleshooting
TypeScript Compilation Errors
If you encounter TypeScript errors:
- Check for missing imports
- Verify all Dyad API references are removed
- Ensure pro feature handlers are properly removed
- Check for unused variables and imports
Runtime Errors
If the application doesn't start:
- Check the console for specific error messages
- Verify all IPC handlers are properly registered
- Ensure all file paths are correct
- Check for missing dependencies
Missing Features
If some features don't work:
- Verify smart context handlers are registered
- Check that custom features are enabled
- Ensure UI components are properly updated
- Verify protocol handlers are working
Rollback
If you need to rollback changes:
# Find your backup directory
ls -la dyad-backup-*
# Restore from backup (replace with your backup directory)
BACKUP_DIR="dyad-backup-YYYYMMDD-HHMMSS"
cp -r "$BACKUP_DIR/src" ./
cp "$BACKUP_DIR/package.json" ./
cp -r "$BACKUP_DIR/scripts" ./
# Reinstall dependencies
npm install
What's Removed vs What's Kept
Removed (Dyad Dependencies)
- ❌ Dyad API calls (templates, updates, release notes)
- ❌ Dyad Engine (AI processing)
- ❌ Pro features and restrictions
- ❌ Dyad branding and references
- ❌ Auto-update functionality
- ❌ Telemetry (disabled)
Kept (Essential Services)
- ✅ OAuth services (Neon, Supabase) - with updated branding
- ✅ Help services - marked for future changes
- ✅ Core AI model connections (OpenAI, Anthropic, etc.)
- ✅ Local model support (Ollama, LM Studio)
- ✅ MCP (Model Context Protocol) support
- ✅ Database and file system operations
Enhanced (Custom Features)
- ✅ Smart context (now available for all users)
- ✅ Remove-limit feature (unlimited usage)
- ✅ Context Settings (improved UI)
- ✅ MoreMinimore branding
Future Considerations
Help Services
The help services are currently kept but should be replaced with:
- Local documentation
- Community-driven support
- Custom help system
Telemetry
Telemetry is disabled but could be replaced with:
- Local analytics
- Optional usage tracking
- Privacy-focused metrics
Auto-Update
Auto-update is removed but could be replaced with:
- GitHub release checking
- Manual update notifications
- Custom update system
Support
For issues with the debranding process:
- Check this guide for troubleshooting steps
- Review the automated script for reference implementations
- Test changes in a development environment first
- Keep backups of your working code
Contributing
When contributing to MoreMinimore:
- Ensure no Dyad dependencies are added
- Maintain the custom features
- Update documentation as needed
- Test thoroughly before submitting changes
Note: This debranding process removes all Dyad commercial dependencies while maintaining the core functionality of the application. The result is a fully functional, open-source AI app builder with custom enhancements.