feat: rebrand from Dyad to MoreMinimore with enhanced documentation

- Update project name from Dyad to MoreMinimore throughout README
- Add comprehensive documentation including quick start guide, build instructions, and development commands
- Include custom features documentation (remove-limit, smart context)
- Add prerequisites, installation options, and update procedures
- Remove external links and branding references to original project
- Add build scripts documentation with production and development options
This commit is contained in:
Kunthawat Greethong
2025-12-22 19:18:27 +07:00
parent 68189db3b3
commit 93206abf36
16 changed files with 571 additions and 3532 deletions

View File

@@ -1,348 +0,0 @@
# MoreMinimore Build Script Guide
## 🎯 Overview
The `build-moreminimore-app.sh` script is a comprehensive build automation tool that handles the complete process of building the MoreMinimore Electron application with proper configuration, error handling, and cross-platform support.
## 🚀 Quick Start
### **Development Build (Recommended for Testing)**
```bash
./scripts/build-moreminimore-app.sh
```
### **Production Build (Requires Code Signing)**
```bash
./scripts/build-moreminimore-app.sh --production
```
## 📋 Features
### **✅ Automatic Code Signing Management**
- **Development builds**: Automatically disables code signing by setting `E2E_TEST_BUILD=true`
- **Production builds**: Requires Apple Developer credentials for proper code signing
### **✅ Comprehensive Build Process**
- Prerequisites checking (Node.js, npm, logo files)
- Dependency installation
- Build artifact cleanup
- TypeScript compilation verification
- Application building with Electron Forge
- Build verification and output reporting
### **✅ Error Handling & Troubleshooting**
- Detailed error messages with troubleshooting steps
- Verbose mode for debugging
- Automatic logo generation if missing
- Graceful failure handling
### **✅ Cross-Platform Support**
- **macOS**: Creates `.zip` distribution files
- **Linux**: Creates `.deb` packages
- **Windows**: Creates `.exe` installers
## 🔧 Usage Options
### **Command Line Options**
```bash
./scripts/build-moreminimore-app.sh [OPTIONS]
OPTIONS:
--production Build for production (requires code signing setup)
--clean-only Only clean build artifacts, don't build
--skip-deps Skip dependency installation
--verbose Enable verbose output
--help, -h Show help message
```
### **Usage Examples**
#### **Standard Development Build**
```bash
./scripts/build-moreminimore-app.sh
```
- Disables code signing automatically
- Installs dependencies
- Builds for current platform
- Creates distributable package
#### **Production Build**
```bash
./scripts/build-moreminimore-app.sh --production
```
- Enables code signing
- Requires Apple Developer credentials
- Creates production-ready installer
#### **Clean Build Artifacts**
```bash
./scripts/build-moreminimore-app.sh --clean-only
```
- Removes `out/` directory
- Cleans scaffold node_modules
- Prepares for fresh build
#### **Verbose Debug Build**
```bash
./scripts/build-moreminimore-app.sh --verbose
```
- Shows detailed build output
- Enables Electron Forge debug logging
- Helpful for troubleshooting
#### **Fast Build (Skip Dependencies)**
```bash
./scripts/build-moreminimore-app.sh --skip-deps
```
- Skips `npm install`
- Useful for repeated builds
- Assumes dependencies are current
## 📁 Build Output
### **Development Builds**
- **Location**: `out/make/zip/darwin/arm64/`
- **File**: `moreminimore-darwin-arm64-0.31.0-beta.1.zip`
- **Size**: ~180MB
- **Code Signing**: Disabled (for development/testing)
### **Production Builds**
- **Location**: `out/make/` with platform-specific subdirectories
- **Formats**:
- macOS: `.zip` and `.dmg`
- Windows: `.exe` installer
- Linux: `.deb` package
- **Code Signing**: Enabled (requires credentials)
## 🔑 Code Signing Configuration
### **Development Builds**
Automatically handled by setting:
```bash
export E2E_TEST_BUILD=true
```
This tells Electron Forge to skip code signing, which is perfect for development and testing.
### **Production Builds**
Requires the following environment variables:
```bash
export APPLE_TEAM_ID="your-apple-developer-team-id"
export APPLE_ID="your-apple-id@example.com"
export APPLE_PASSWORD="your-app-specific-password"
export SM_CODE_SIGNING_CERT_SHA1_HASH="your-certificate-sha1-hash"
```
#### **Setting Up Apple Developer Credentials**
1. **Get Apple Developer Account**
- Sign up at [developer.apple.com](https://developer.apple.com)
- Enroll in Apple Developer Program ($99/year)
2. **Create Development Certificate**
- Go to Xcode → Preferences → Accounts
- Add your Apple ID
- Create a development certificate
3. **Find Your Team ID**
```bash
# This will show your team ID
security find-identity -v -p codesigning
```
4. **Generate App-Specific Password**
- Go to [appleid.apple.com](https://appleid.apple.com)
- Sign in with your Apple ID
- Go to "Security" → "App-Specific Passwords"
- Generate a new password for Electron building
5. **Get Certificate Hash**
```bash
# Get the SHA1 hash of your certificate
security find-certificate -c "Your Certificate Name" -p | openssl x509 -noout -fingerprint -sha1
```
## 🛠️ Troubleshooting
### **Common Issues & Solutions**
#### **Code Signing Errors**
```
Error: Failed to codesign your application
```
**Solution**: Use development build mode:
```bash
./scripts/build-moreminimore-app.sh
```
#### **Missing Logo Files**
```
Error: Source logo not found: assets/moreminimorelogo.png
```
**Solution**: Ensure your logo is present:
```bash
# Place your logo at:
assets/moreminimorelogo.png
```
#### **TypeScript Compilation Errors**
```
Error: TypeScript compilation failed
```
**Solution**: Check compilation manually:
```bash
npm run ts
```
#### **Dependency Issues**
```
Error: npm install failed
```
**Solution**: Clean and reinstall:
```bash
rm -rf node_modules package-lock.json
npm install
```
#### **Build Permission Errors**
```
Error: Permission denied
```
**Solution**: Make script executable:
```bash
chmod +x scripts/build-moreminimore-app.sh
```
### **Debug Mode**
For detailed troubleshooting:
```bash
./scripts/build-moreminimore-app.sh --verbose
```
This will show:
- Detailed npm output
- Electron Forge debug logs
- Step-by-step build process
- Error stack traces
## 🔄 Build Process Flow
```
1. Environment Setup
├── Parse command line arguments
├── Set code signing mode
└── Configure debug options
2. Prerequisites Check
├── Verify Node.js and npm
├── Check package.json exists
├── Validate logo files
└── Generate logos if needed
3. Dependency Management
├── Install npm dependencies
└── Verify installation success
4. Build Preparation
├── Clean previous builds
├── Apply custom features
└── Verify TypeScript compilation
5. Application Build
├── Run Electron Forge
├── Package application
└── Create distributable
6. Verification
├── Check build output
├── Verify file sizes
└── Show results
```
## 📊 Build Performance
### **Typical Build Times**
- **Clean Build**: 3-5 minutes
- **Incremental Build**: 1-2 minutes
- **Dependency Install**: 30-60 seconds
### **Build Sizes**
- **Development ZIP**: ~180MB
- **Production Installer**: ~200MB
- **Source Code**: ~50MB
### **System Requirements**
- **RAM**: Minimum 4GB, recommended 8GB+
- **Storage**: 2GB free space for build artifacts
- **Network**: Required for dependency installation
## 🎨 Integration with Workflow
### **Development Workflow**
```bash
# 1. Update code
git pull origin main
# 2. Apply custom features
./scripts/update-and-debrand.sh
# 3. Build application
./scripts/build-moreminimore-app.sh
# 4. Test application
open out/make/zip/darwin/arm64/moreminimore-darwin-arm64-*.zip
```
### **Release Workflow**
```bash
# 1. Set up production credentials
export APPLE_TEAM_ID="your-team-id"
export APPLE_ID="your-apple-id@example.com"
export APPLE_PASSWORD="your-app-password"
export SM_CODE_SIGNING_CERT_SHA1_HASH="your-cert-hash"
# 2. Build production version
./scripts/build-moreminimore-app.sh --production
# 3. Distribute
# Upload out/make/ files to your distribution platform
```
## 📝 Best Practices
### **Before Building**
1. **Update dependencies**: `npm update`
2. **Clean workspace**: `git clean -fd`
3. **Check TypeScript**: `npm run ts`
4. **Verify logos**: `ls -la assets/`
### **During Development**
1. **Use development builds**: Avoid code signing overhead
2. **Enable verbose mode**: For debugging issues
3. **Clean regularly**: Prevent artifact accumulation
4. **Test builds**: Verify after major changes
### **For Production**
1. **Set up credentials**: Configure Apple Developer account
2. **Test signing**: Verify code signing works
3. **Clean build**: Start with fresh artifacts
4. **Verify output**: Test installer on clean system
## 🔗 Related Documentation
- [Logo Integration Guide](README-LOGO-INTEGRATION.md)
- [Debranding Script Guide](README-DEBRAND.md)
- [Update Script Guide](README-UPDATE-SCRIPT.md)
- [Custom Integration Guide](README-CUSTOM-INTEGRATION.md)
## 🆘 Support
If you encounter issues:
1. **Check the logs**: Run with `--verbose` flag
2. **Verify prerequisites**: Ensure all requirements are met
3. **Clean and retry**: Use `--clean-only` then rebuild
4. **Check credentials**: For production builds, verify Apple Developer setup
5. **Review logs**: Check both script output and npm logs
The build script is designed to handle most common issues automatically and provide clear guidance when manual intervention is needed.

View File

@@ -1,267 +0,0 @@
# 🎉 MoreMinimore Build Solution - Complete Guide
## 🎯 Problem Solved
**Original Issue**: Code signing failure during Electron app build
```
Error: Failed to codesign your application
```
**Root Cause**: Missing Apple Developer credentials for code signing
**Solution**: Automated build script with intelligent code signing management
## 🚀 Solution Overview
We created a comprehensive build automation system that:
1. **✅ Automatically handles code signing** - Disables for development, enables for production
2. **✅ Provides complete build automation** - From dependencies to final package
3. **✅ Includes robust error handling** - Clear messages and troubleshooting
4. **✅ Supports multiple build modes** - Development, production, clean, verbose
5. **✅ Works cross-platform** - macOS, Windows, Linux support
## 📁 Files Created
### **Core Build Script**
- `scripts/build-moreminimore-app.sh` - Main build automation script
### **Documentation**
- `README-BUILD-SCRIPT.md` - Comprehensive build script guide
- `README-BUILD-SOLUTION.md` - This solution summary
## 🔧 Quick Start
### **Development Build (No Code Signing)**
```bash
./scripts/build-moreminimore-app.sh
```
### **Production Build (Code Signing Required)**
```bash
export APPLE_TEAM_ID="your-team-id"
export APPLE_ID="your-apple-id@example.com"
export APPLE_PASSWORD="your-app-password"
export SM_CODE_SIGNING_CERT_SHA1_HASH="your-cert-hash"
./scripts/build-moreminimore-app.sh --production
```
## 🎯 Key Features
### **Automatic Code Signing Management**
- **Development**: Sets `E2E_TEST_BUILD=true` to disable code signing
- **Production**: Requires Apple Developer credentials for proper signing
- **Smart Detection**: Automatically detects build mode and configures accordingly
### **Comprehensive Build Process**
```
1. Environment Setup → 2. Prerequisites Check → 3. Dependencies Install
4. Build Cleanup → 5. Preparation → 6. Application Build → 7. Verification
```
### **Error Handling & Troubleshooting**
- Detailed error messages with solutions
- Verbose mode for debugging
- Automatic logo generation if missing
- Graceful failure handling
### **Multiple Build Options**
- `--production` - Production build with code signing
- `--clean-only` - Clean build artifacts only
- `--skip-deps` - Skip dependency installation
- `--verbose` - Detailed build output
- `--help` - Show help and usage
## 📊 Build Results
### **Successful Development Build**
```
🎉 MoreMinimore application built successfully!
Build Type: Development (no code signing)
Build Artifacts: out/make/zip/darwin/arm64/moreminimore-darwin-arm64-0.31.0-beta.1.zip
Build Directory Size: 646M
```
### **Output File**
- **Location**: `out/make/zip/darwin/arm64/moreminimore-darwin-arm64-0.31.0-beta.1.zip`
- **Size**: 182MB
- **Type**: Development build (no code signing)
- **Status**: ✅ Ready for testing and distribution
## 🛠️ Technical Implementation
### **Code Signing Fix**
The script automatically sets `E2E_TEST_BUILD=true` for development builds, which tells Electron Forge to skip code signing:
```bash
# In setup_environment() function
if [ "$PRODUCTION_BUILD" = false ]; then
export E2E_TEST_BUILD=true
print_success "✓ E2E_TEST_BUILD=true (code signing disabled)"
fi
```
### **Build Verification**
The script verifies build success by checking for platform-specific artifacts:
```bash
# macOS verification
if [ -f "out/make/zip/darwin/arm64/MoreMinimore-darwin-arm64-"*".zip" ]; then
build_found=true
print_success "✓ macOS build found: $(basename "$app_file")"
fi
```
### **Error Handling**
Comprehensive error handling with clear messages:
```bash
handle_error() {
local exit_code=$?
if [ $exit_code -ne 0 ]; then
print_error "Build failed with exit code $exit_code"
echo "Troubleshooting steps..."
exit $exit_code
fi
}
```
## 🎨 Integration with Existing Workflow
### **Before (Manual Process)**
```bash
# Manual build with potential code signing issues
npm run make
# ❌ Fails due to missing Apple Developer credentials
```
### **After (Automated Process)**
```bash
# Automated build with intelligent code signing
./scripts/build-moreminimore-app.sh
# ✅ Succeeds with automatic code signing management
```
### **Complete Workflow**
```bash
# 1. Update code
git pull origin main
# 2. Apply custom features (if needed)
./scripts/update-and-debrand.sh
# 3. Build application
./scripts/build-moreminimore-app.sh
# 4. Test application
open out/make/zip/darwin/arm64/moreminimore-darwin-arm64-*.zip
```
## 🔍 Testing Results
### **✅ Development Build Test**
- **Status**: PASSED
- **Output**: 182MB ZIP file created successfully
- **Code Signing**: Properly disabled
- **Performance**: ~3 minutes build time
- **Error Handling**: Working correctly
### **✅ Help System Test**
- **Status**: PASSED
- **Command**: `./scripts/build-moreminimore-app.sh --help`
- **Output**: Comprehensive help documentation displayed
### **✅ Clean Function Test**
- **Status**: PASSED
- **Command**: `./scripts/build-moreminimore-app.sh --clean-only`
- **Output**: Build artifacts cleaned successfully
### **✅ Prerequisites Check**
- **Status**: PASSED
- **Node.js**: v24.8.0 ✅
- **npm**: v11.6.0 ✅
- **Logo files**: Present ✅
- **TypeScript**: Compiles successfully ✅
## 🎯 Benefits Achieved
### **Immediate Benefits**
1. **✅ Build Success** - Application builds without code signing errors
2. **✅ Time Savings** - Automated process saves manual configuration time
3. **✅ Error Prevention** - Intelligent code signing management prevents failures
4. **✅ Consistency** - Repeatable build process every time
### **Long-term Benefits**
1. **🔄 Maintainability** - Script handles future build requirements
2. **📈 Scalability** - Supports multiple build modes and platforms
3. **🛡️ Reliability** - Robust error handling and verification
4. **📚 Documentation** - Comprehensive guides for team members
## 🔮 Future Enhancements
### **Potential Improvements**
1. **CI/CD Integration** - GitHub Actions workflow
2. **Auto-updater Support** - Automatic update mechanism
3. **Multi-platform Builds** - Simultaneous cross-platform builds
4. **Build Optimization** - Faster incremental builds
5. **Artifact Management** - Automatic upload to distribution platform
### **Extension Points**
- Custom build configurations
- Additional verification steps
- Integration with testing frameworks
- Automated release management
## 📞 Support & Troubleshooting
### **Common Issues & Solutions**
| Issue | Solution |
|-------|----------|
| Code signing error | Use development build: `./scripts/build-moreminimore-app.sh` |
| Missing logo | Place logo at `assets/moreminimorelogo.png` |
| TypeScript errors | Run `npm run ts` to check compilation |
| Permission denied | Run `chmod +x scripts/build-moreminimore-app.sh` |
### **Getting Help**
```bash
# Show help and options
./scripts/build-moreminimore-app.sh --help
# Verbose debugging
./scripts/build-moreminimore-app.sh --verbose
# Clean and retry
./scripts/build-moreminimore-app.sh --clean-only
./scripts/build-moreminimore-app.sh
```
## 🎉 Success Metrics
### **Problem Resolution**
-**Code signing issue**: RESOLVED
-**Build automation**: IMPLEMENTED
-**Error handling**: ROBUST
-**Documentation**: COMPREHENSIVE
-**Testing**: VERIFIED
### **Performance Metrics**
- **Build Time**: ~3 minutes (vs. manual failures)
- **Success Rate**: 100% (vs. 0% before)
- **Setup Time**: 5 minutes (vs. hours of troubleshooting)
- **Maintenance**: Minimal (automated process)
## 🏆 Conclusion
The MoreMinimore build solution successfully resolves the code signing issue while providing a comprehensive, automated build system. The script handles all aspects of the build process, from environment setup to final verification, with intelligent code signing management that works for both development and production scenarios.
**Key Achievement**: Transformed a failing manual build process into a reliable, automated system that just works.
### **Next Steps**
1. ✅ Use the build script for all future builds
2. ✅ Set up Apple Developer credentials for production builds
3. ✅ Integrate with your development workflow
4. ✅ Share with team members for consistent builds
The solution is production-ready and will serve as the foundation for all MoreMinimore application builds going forward.

View File

@@ -1,615 +0,0 @@
# Dyad Custom Features Integration Guide
This guide explains how to use the custom features integration script to maintain your remove-limit modifications when updating the main Dyad codebase.
## Overview
The integration script (`scripts/integrate-custom-features.sh`) helps you merge your custom remove-limit features with upstream updates from the original Dyad repository. It automatically:
- Creates backups before making changes
- Detects custom modifications in key files
- Creates missing custom files
- Validates the integration
- Provides restore functionality
## Features Integrated
### Remove Limit Features
- **Smart Context Management**: Advanced context handling with rolling summaries
- **Rate Limit Simulation**: Configurable rate limiting for testing
- **Enhanced Chat Streaming**: Improved message handling with custom payloads
- **Context Snippet Management**: Intelligent snippet organization and retrieval
### Smart Context System
- **Context Caching**: Efficient caching with TTL
- **Rolling Summaries**: Automatic summarization when context exceeds thresholds
- **Snippet Importance Scoring**: Intelligent ranking of context snippets
- **Size Management**: Automatic trimming and optimization
## Usage
### Basic Integration
```bash
# Integrate custom features (creates backup automatically)
./scripts/integrate-custom-features.sh integrate
# Validate current integration
./scripts/integrate-custom-features.sh validate
# Show help
./scripts/integrate-custom-features.sh help
```
### Restore from Backup
```bash
# List available backups
ls -la backups/
# Restore from a specific backup
./scripts/integrate-custom-features.sh restore backup-20231201-120000
```
## Files Managed
### Core Custom Files
- `src/components/HelpDialog.tsx` - Enhanced help dialog with custom features
- `src/components/chat/PromoMessage.tsx` - Modified promo messages
- `src/ipc/handlers/chat_stream_handlers.ts` - Enhanced chat streaming with remove-limit
- `src/ipc/ipc_client.ts` - Extended IPC client with smart context methods
- `src/ipc/ipc_host.ts` - Updated IPC host with new handlers
- `src/ipc/ipc_types.ts` - Extended type definitions
- `src/preload.ts` - Updated preload script with new channels
- `testing/fake-llm-server/chatCompletionHandler.ts` - Enhanced testing server
### New Custom Files
- `src/ipc/handlers/smart_context_handlers.ts` - Smart context IPC handlers
- `src/ipc/utils/smart_context_store.ts` - Context storage and management
- `src/hooks/useSmartContext.ts` - React hooks for smart context
## Complete Step-by-Step Integration Guide
This section provides detailed, copy-paste ready commands for every step of the integration process. Follow these commands exactly as written.
### 📋 Pre-Update Checklist (5 minutes)
**Step 1: Verify Current Working Directory**
```bash
# Make sure you're in the correct directory
pwd
# Expected output: /Users/kunthawatgreethong/Gitea/moreminimore-vibe
# If not, navigate to the correct directory
cd /Users/kunthawatgreethong/Gitea/moreminimore-vibe
```
**Step 2: Check Git Status**
```bash
# Check if you have any uncommitted changes
git status
# Expected: "working tree clean" or list your changes
# If you have changes, commit them first
git add .
git commit -m "Save current state before upstream update"
```
**Step 3: Verify Custom Features Are Working**
```bash
# Validate current integration
./scripts/integrate-custom-features.sh validate
# Expected: [SUCCESS] Integration validation passed
# If validation fails, fix issues before proceeding
./scripts/integrate-custom-features.sh help
```
**Step 4: Check Current Git Branch**
```bash
# Make sure you're on your main branch
git branch
# Expected: * main or * master (with * indicating current branch)
# If not on main branch, switch to it
git checkout main
```
### 🔄 Upstream Update Process (10-15 minutes)
**Step 5: Fetch Latest Changes from Upstream**
```bash
# Fetch all changes from upstream repository
git fetch upstream
# Expected: No output (or shows what was fetched)
# Check what new commits are available
git log main..upstream/main --oneline
# Expected: List of new commits from upstream
```
**Step 6: Stash Your Local Changes (Optional but Recommended)**
```bash
# If you have any local changes not committed
git stash push -m "Temporary stash before upstream merge"
# Expected: Saved working directory and index state
# To see your stashes
git stash list
```
**Step 7: Merge Upstream Changes**
```bash
# Merge upstream changes into your main branch
git merge upstream/main
# Expected: Shows merge summary or conflicts
# If there are conflicts, you'll see:
# CONFLICT (content): Merge conflict in file-name
```
**Step 8: Handle Merge Conflicts (If Any)**
```bash
# If conflicts exist, check which files have conflicts
git status
# Look for files marked as "both modified"
# Open conflicted files and resolve them manually
# Look for these markers in files:
# <<<<<<< HEAD
# Your changes
# =======
# Upstream changes
# >>>>>>> upstream/main
# After resolving conflicts in each file:
git add path/to/resolved/file.ts
# Continue with merge when all conflicts resolved
git merge --continue
```
**Step 9: Restore Stashed Changes (If You Stashed)**
```bash
# Restore your stashed changes
git stash pop
# Expected: Shows what was restored
# If there are new conflicts, resolve them
git status
git add . (resolve conflicts first)
git commit -m "Merge upstream changes and resolve conflicts"
```
### 🔧 Integration Process (5-10 minutes)
**Step 10: Run the Integration Script**
```bash
# Execute the integration script
./scripts/integrate-custom-features.sh integrate
# Expected output:
# [2025-12-18 HH:MM:SS] Starting custom features integration...
# [2025-12-18 HH:MM:SS] Creating backup: backup-YYYYMMDD-HHMMSS
# [SUCCESS] Backup created at: /Users/kunthawatgreethong/Gitea/moreminimore-vibe/backups/backup-YYYYMMDD-HHMMSS
# [2025-12-18 HH:MM:SS] Creating missing custom files...
# [SUCCESS] Missing custom files created
# [2025-12-18 HH:MM:SS] Validating integration...
# [SUCCESS] Integration validation passed
# [SUCCESS] Custom features integration completed successfully!
```
**Step 11: Verify Integration Success**
```bash
# Check that all expected files exist
ls -la src/ipc/handlers/smart_context_handlers.ts
ls -la src/ipc/utils/smart_context_store.ts
ls -la src/hooks/useSmartContext.ts
# Expected: All three files should exist and show file info
```
### ✅ Validation and Testing (10-15 minutes)
**Step 12: Run Validation Script**
```bash
# Validate the integration
./scripts/integrate-custom-features.sh validate
# Expected:
# [2025-12-18 HH:MM:SS] Validating integration...
# [SUCCESS] Integration validation passed
# If you see warnings, note them but continue
# Warnings about missing custom modifications are usually OK
```
**Step 13: Check TypeScript Compilation**
```bash
# Check for TypeScript errors (may have some MCP-related warnings)
npm run ts
# Expected: May show some MCP-related errors but should complete
# If many new errors appear, investigate before proceeding
```
**Step 14: Test Application Startup**
```bash
# Install any new dependencies if needed
npm install
# Start the application in development mode
npm start
# Expected: Application should start without critical errors
# Let it run for 30-60 seconds to ensure stability
# Press Ctrl+C to stop when confirmed working
```
**Step 15: Test Custom Features Manually**
```bash
# Start the application again
npm start
# Test these features in the UI:
# 1. Create a new chat
# 2. Send a message
# 3. Check if smart context is working (no obvious errors)
# 4. Verify help dialog opens correctly
# 5. Check that promo messages display properly
# If everything works, integration is successful!
# If issues occur, proceed to troubleshooting section
```
### 🚨 If Something Goes Wrong
**Step 16: Identify the Problem**
```bash
# Check what went wrong
./scripts/integrate-custom-features.sh validate
# Note any errors or warnings
# Check application logs if it won't start
npm start 2>&1 | tee startup-errors.log
# Review startup-errors.log for clues
```
**Step 17: Restore from Backup (If Needed)**
```bash
# List available backups
ls -la backups/
# Expected: List of backup directories with timestamps
# Find your most recent backup (look for the latest timestamp)
# Example: backup-20231218-154512
# Restore from the most recent working backup
./scripts/integrate-custom-features.sh restore backup-20231218-154512
# Expected:
# [2025-12-18 HH:MM:SS] Restoring from backup: backup-20231218-154512
# [SUCCESS] Restore completed
```
**Step 18: Verify Restoration**
```bash
# Check that custom features are back
./scripts/integrate-custom-features.sh validate
# Expected: [SUCCESS] Integration validation passed
# Test application startup
npm start
# Should work as it did before the update
```
**Step 19: Manual Investigation (If Restoration Doesn't Work)**
```bash
# Check Git state
git status
git log --oneline -10
# Check specific files for issues
git diff HEAD~1 src/ipc/ipc_types.ts
git diff HEAD~1 src/ipc/ipc_client.ts
# Look for specific error patterns
grep -r "SmartContext" src/ --include="*.ts" --include="*.tsx"
```
### 🔍 Troubleshooting Commands
**Check Integration Script Health**
```bash
# Make script executable (if permission issues)
chmod +x scripts/integrate-custom-features.sh
# Test script help
./scripts/integrate-custom-features.sh help
# Should show usage instructions
```
**Verify File Permissions**
```bash
# Check script permissions
ls -la scripts/integrate-custom-features.sh
# Should show -rwxr-xr-x (executable)
# Fix permissions if needed
chmod 755 scripts/integrate-custom-features.sh
```
**Check Node.js and npm**
```bash
# Verify Node.js version
node --version
# Expected: v18.x.x or higher
# Verify npm version
npm --version
# Expected: 9.x.x or higher
# Clear npm cache if needed
npm cache clean --force
```
**Check Git Configuration**
```bash
# Verify upstream remote is configured
git remote -v
# Should show upstream remote pointing to dyad-sh/dyad
# If upstream is missing, add it
git remote add upstream https://github.com/kunthawat/moreminimore-vibe.git
```
### 📝 Quick Reference Commands
**Emergency Restore (One-liner)**
```bash
# Restore latest backup (replace with actual backup name)
./scripts/integrate-custom-features.sh restore $(ls -t backups/ | head -1)
```
**Check All Backups**
```bash
# List all backups with details
ls -la backups/ | grep backup
```
**Force Clean Integration**
```bash
# For problematic integrations, start fresh
git clean -fd
git reset --hard HEAD
./scripts/integrate-custom-features.sh integrate
```
**Verify All Custom Files**
```bash
# Quick check that all custom files exist
files=("src/ipc/handlers/smart_context_handlers.ts" "src/ipc/utils/smart_context_store.ts" "src/hooks/useSmartContext.ts")
for file in "${files[@]}"; do
if [[ -f "$file" ]]; then
echo "✅ $file exists"
else
echo "❌ $file missing"
fi
done
```
### ⏱️ Time Estimates
- **Pre-Update Checklist**: 5 minutes
- **Upstream Update**: 10-15 minutes (longer if many conflicts)
- **Integration Process**: 5-10 minutes
- **Validation and Testing**: 10-15 minutes
- **Troubleshooting**: 15-30 minutes (if needed)
**Total Time**: 30-60 minutes for smooth integration, up to 2 hours if problems occur.
### 🎯 Success Indicators
You'll know the integration was successful when:
1. ✅ Integration script runs without errors
2. ✅ Validation script shows "[SUCCESS] Integration validation passed"
3. ✅ Application starts with `npm start`
4. ✅ No critical errors in console
5. ✅ Custom features work in the UI
6. ✅ TypeScript compilation completes (may have warnings)
If all these are true, your custom features have been successfully integrated with the latest upstream changes!
---
## Integration Workflow Summary
### Before Upstream Update
1. **Current State**: Your custom features are integrated
2. **Backup**: Script automatically creates backup
3. **Validation**: Ensure everything is working
### After Upstream Update
1. **Update Code**: Pull latest changes from upstream
2. **Run Integration**: `./scripts/integrate-custom-features.sh integrate`
3. **Validate**: Check that integration succeeded
4. **Test**: Verify custom features work correctly
### If Something Goes Wrong
1. **Restore**: `./scripts/integrate-custom-features.sh restore <backup-name>`
2. **Investigate**: Check what conflicts occurred
3. **Manual Merge**: Resolve conflicts manually if needed
4. **Retry**: Run integration again
## Custom Features Explained
### Smart Context System
The smart context system provides intelligent management of chat context to handle longer conversations without hitting token limits.
#### Key Components
1. **SmartContextStore**: Manages context caching, summarization, and retrieval
2. **Context Snippets**: Individual pieces of context with importance scoring
3. **Rolling Summaries**: Automatically generated summaries of older messages
4. **Size Management**: Intelligent trimming based on importance and recency
#### Usage in Components
```typescript
import { useSmartContext, useUpdateSmartContext } from '@/hooks/useSmartContext';
// Get smart context for a chat
const { data: context, isLoading } = useSmartContext({
chatId: 123,
maxTokens: 8000,
includeSummaries: true
});
// Update context with new content
const updateContext = useUpdateSmartContext();
updateContext.mutate({
chatId: 123,
content: "New message content",
type: "message",
importance: 1.0
});
```
### Rate Limit Simulation
The system includes configurable rate limiting for testing purposes:
```typescript
// In chat_stream_handlers.ts
const rateLimitConfig = {
enabled: true,
requestsPerMinute: 60,
burstLimit: 10
};
```
### Enhanced Chat Streaming
Improved message handling with:
- Custom payload processing
- Better error handling
- Enhanced metadata support
- Streaming optimizations
## Configuration
### Smart Context Settings
You can configure the smart context behavior by modifying the `SmartContextStore`:
```typescript
// In src/ipc/utils/smart_context_store.ts
private maxContextSize = 100000; // 100k characters
private maxSnippets = 50;
private summaryThreshold = 20000; // Summarize when context exceeds this
```
### Rate Limit Settings
Configure rate limiting in the chat stream handlers:
```typescript
// Adjust these values based on your needs
const RATE_LIMIT_CONFIG = {
requestsPerMinute: 60,
burstLimit: 10,
enabled: process.env.NODE_ENV === 'development'
};
```
## Troubleshooting
### Common Issues
1. **TypeScript Errors**: The script automatically fixes MCP-related TypeScript issues during integration.
2. **Missing Custom Modifications**: The script warns if files don't contain expected custom patterns.
3. **Backup Restoration**: Always restore from the most recent working backup.
### MCP TypeScript Issues
The integration script automatically handles MCP (Model Context Protocol) related TypeScript compilation errors:
**Issues Fixed:**
- `chat_stream_handlers.ts`: Adds type assertion (`as any`) for tool objects
- `mcp_handlers.ts`: Adds type assertion for tool.description property
- `mcp_manager.ts`: Replaces problematic imports with stub implementation
**Automatic Fixes:**
The `fix_mcp_typescript_issues()` function in the script:
1. Detects MCP-related type errors
2. Applies appropriate type assertions
3. Creates stub implementations for missing exports
4. Ensures compilation succeeds
**Manual Fix (if needed):**
If you encounter MCP TypeScript errors after integration:
```bash
# Re-run the integration script to fix MCP issues
./scripts/integrate-custom-features.sh integrate
# Or manually fix by adding 'as any' type assertions to tool objects
```
### Validation Warnings
If you see warnings about missing custom modifications:
1. Check if the file actually needs custom changes
2. Verify the custom patterns are being detected correctly
3. Manually add custom modifications if needed
### Manual Intervention
Sometimes you may need to manually merge changes:
1. **Conflicts**: Resolve Git conflicts in key files
2. **New Features**: Add custom features to new upstream files
3. **API Changes**: Update custom code to match new APIs
## Best Practices
1. **Regular Backups**: Always create backups before major changes
2. **Test Thoroughly**: Verify all custom features work after integration
3. **Document Changes**: Keep notes about manual modifications
4. **Version Control**: Commit working states regularly
5. **Gradual Updates**: Update upstream changes incrementally
## Development
### Adding New Custom Features
1. **Update Script**: Add new files to the `CUSTOM_FILES` or `NEW_CUSTOM_FILES` arrays
2. **Create Handlers**: Add IPC handlers for new functionality
3. **Update Types**: Extend type definitions as needed
4. **Test Integration**: Ensure new features integrate properly
### Modifying Existing Features
1. **Update Patterns**: Add new detection patterns to `has_custom_modifications()`
2. **Test Validation**: Ensure the script detects your changes
3. **Document Updates**: Update this documentation
## Support
If you encounter issues:
1. **Check Logs**: Look for error messages in the script output
2. **Restore Backup**: Use a recent backup to restore working state
3. **Manual Merge**: Resolve conflicts manually if needed
4. **Test Incrementally**: Test changes one at a time
## Future Enhancements
Planned improvements to the integration script:
- **Automatic Conflict Resolution**: Smarter merging of conflicting changes
- **Enhanced Validation**: More comprehensive testing
- **GUI Interface**: Visual tool for managing integrations
- **Cloud Backups**: Optional cloud backup storage
- **Rollback System**: More granular rollback capabilities
---
**Note**: This integration script is designed to work with the specific remove-limit features. If you have additional custom modifications, you may need to extend the script accordingly.

View File

@@ -1,456 +0,0 @@
# MoreMinimore
MoreMinimore is a local, open-source AI app builder. It's fast, private, and fully under your control — like Lovable, v0, or Bolt, but running right on your machine.
![Image](https://github.com/user-attachments/assets/f6c83dfc-6ffd-4d32-93dd-4b9c46d17790)
## 🚀 Features
- ⚡️ **Local**: Fast, private and no lock-in.
- 🛠 **Bring your own keys**: Use your own AI API keys — no vendor lock-in.
- 🖥️ **Cross-platform**: Easy to run on Mac or Windows.
-**Enhanced**: Smart context and unlimited usage with custom features.
## 🧰 Prerequisites
- Node.js >= 20
- npm (comes with Node.js)
- Git
You can verify your versions:
```bash
node -v
npm -v
```
## 🏗️ Install (from source)
```bash
git clone https://github.com/kunthawat/moreminimore-vibe.git
cd moreminimore-vibe
npm install
```
## ▶️ Run locally (development)
- Start the app with the default configuration:
```bash
npm start
```
### Environment variables (optional)
- `MOREMINIMORE_GATEWAY_URL`: URL of a compatible gateway if you prefer to route requests.
Example:
```bash
MOREMINIMORE_GATEWAY_URL=http://localhost:8080/v1 npm start
```
## 📦 Build installers (make)
Create platform-specific distributables:
```bash
npm run make
```
Outputs are written to the `out/` directory.
## 🧪 Tests and linting
```bash
# Unit tests
npm test
# Lint
npm run lint
# Prettier check
npm run prettier:check
```
## 📄 License
MIT License — see [LICENSE](./LICENSE).
---
# 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:
```bash
# 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:
1. Create a backup of your current code
2. Apply all debranding changes
3. Install dependencies
4. Test compilation
5. 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
```bash
# 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
```bash
# 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`:
```typescript
// 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`:
```typescript
// 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`:
```typescript
// 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`:
```typescript
// 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`:
```typescript
// Remove this line:
registerProHandlers();
```
### Remove Pro IPC Channels
Edit `src/preload.ts`:
```typescript
// 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
```json
{
"name": "moreminimore",
"productName": "moreminimore",
"description": "Free, local, open-source AI app builder"
}
```
Keep the original dependency (no changes needed):
```json
"@dyad-sh/supabase-management-js": "v1.0.1",
```
### Update Protocol Handlers
Edit `src/main.ts`:
```typescript
// 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`:
```typescript
// 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:
```bash
# 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
```typescript
// Comment out unused import
// import { updateElectronApp, UpdateSourceType } from "update-electron-app"; // Removed - Dyad API dependency
```
### Clean up release_note_handlers.ts
```typescript
// Remove unused import
// import fetch from "node-fetch";
```
## Step 10: Install Dependencies and Test
```bash
# Install dependencies
npm install
# Test TypeScript compilation
npm run ts
# Test the application
npm start
```
## Validation
After applying the changes, validate that:
1. **TypeScript compilation passes**: `npm run ts`
2. **Application starts without errors**: `npm start`
3. **No Dyad API calls in the codebase**: `grep -r "api\.dyad\.sh" src/`
4. **No Dyad Engine calls**: `grep -r "engine\.dyad\.sh" src/`
5. **Custom features are enabled**: Check `src/custom/index.ts`
## Troubleshooting
### TypeScript Compilation Errors
If you encounter TypeScript errors:
1. Check for missing imports
2. Verify all Dyad API references are removed
3. Ensure pro feature handlers are properly removed
4. Check for unused variables and imports
### Runtime Errors
If the application doesn't start:
1. Check the console for specific error messages
2. Verify all IPC handlers are properly registered
3. Ensure all file paths are correct
4. Check for missing dependencies
### Missing Features
If some features don't work:
1. Verify smart context handlers are registered
2. Check that custom features are enabled
3. Ensure UI components are properly updated
4. Verify protocol handlers are working
## Rollback
If you need to rollback changes:
```bash
# 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:
1. Check this guide for troubleshooting steps
2. Review the automated script for reference implementations
3. Test changes in a development environment first
4. Keep backups of your working code
## Contributing
When contributing to MoreMinimore:
1. Ensure no Dyad dependencies are added
2. Maintain the custom features
3. Update documentation as needed
4. 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.

View File

@@ -1,151 +0,0 @@
# Moreminimore Integration - Final Solution Summary
## 🎯 Problem Solved
Successfully integrated the "remove-limit" feature from `dyad-remove-limit-doc` into the main codebase while preserving all multi-provider functionality and maintaining the Moreminimore branding.
## ✅ What Was Accomplished
### 1. **Fixed Multi-Provider Functionality**
- **Issue**: The original update script was destructive and removed support for multiple AI providers
- **Solution**: Created a non-destructive branding update approach that preserves all provider configurations
- **Result**: Users can now configure OpenAI, Anthropic, Azure, Vertex, OpenRouter, and Moreminimore simultaneously
### 2. **Restored Original ProviderSettingsPage Architecture**
- **Issue**: Simplified version lost support for custom models, provider-specific configurations, and advanced features
- **Solution**: Restored the full-featured ProviderSettingsPage with proper Moreminimore branding
- **Result**: All provider settings work correctly with proper validation, error handling, and user experience
### 3. **Implemented Moreminimore Branding**
- **Updated**: All UI text from "Dyad" to "Moreminimore"
- **Updated**: API endpoints to use Moreminimore services
- **Updated**: Logo integration and visual branding
- **Updated**: Help dialogs and documentation references
### 4. **Fixed TypeScript Compilation Errors**
- **Issue**: Property name mismatches between components
- **Solution**: Standardized prop names (`isMoreMinimore` instead of `isDyad`)
- **Result**: Clean compilation with no TypeScript errors
### 5. **Enhanced Update Script**
- **Before**: Destructive script that broke multi-provider support
- **After**: Safe, non-destructive script that only updates branding
- **Features**: Preserves user configurations, supports future updates, maintains functionality
## 🏗️ Technical Architecture
### ProviderSettingsPage Features
- ✅ Multi-provider support (OpenAI, Anthropic, Azure, Vertex, OpenRouter, Moreminimore)
- ✅ Custom model configuration
- ✅ Environment variable support
- ✅ API key management with encryption
- ✅ Provider-specific configurations (Azure, Vertex)
- ✅ Real-time validation and error handling
- ✅ Moreminimore Pro toggle integration
### Update Script Safety
- ✅ Non-destructive branding updates only
- ✅ Preserves all provider configurations
- ✅ Maintains custom model settings
- ✅ Safe for future updates
- ✅ Rollback capability
## 🧪 Testing Results
### Compilation Tests
- ✅ TypeScript compilation: PASSED
- ✅ Linting: PASSED
- ✅ Application startup: PASSED
### Functional Tests
- ✅ Provider settings page loads correctly
- ✅ Multiple providers can be configured
- ✅ Moreminimore branding is consistent
- ✅ API endpoints are properly configured
- ✅ Custom model support is preserved
## 📁 Key Files Modified
### Core Application Files
- `src/components/settings/ProviderSettingsPage.tsx` - Restored full functionality
- `src/ipc/shared/language_model_constants.ts` - Updated API endpoints
- `src/ipc/utils/get_model_client.ts` - Moreminimore integration
- `src/components/HelpDialog.tsx` - Branding updates
- `src/app/TitleBar.tsx` - Logo and title updates
### Branding Files
- `assets/moreminimorelogo.png` - New logo
- Multiple component files for consistent branding
### Update Scripts
- `scripts/update-and-debrand.sh` - Safe, non-destructive updates
- `scripts/frontend-debrand.sh` - Branding automation
## 🚀 How to Use
### Initial Setup
```bash
# Run the comprehensive update and debrand script
./scripts/update-and-debrand.sh
# Start the application
npm start
```
### Provider Configuration
1. Navigate to Settings → Providers
2. Configure any supported AI provider:
- OpenAI, Anthropic, Azure, Vertex, OpenRouter, or Moreminimore
3. Each provider has its own configuration section
4. Custom models are supported where applicable
### Future Updates
```bash
# Safe to run anytime - preserves your configurations
./scripts/update-and-debrand.sh
```
## 🔧 Technical Details
### Multi-Provider Support
The application now supports:
- **OpenAI**: Full API key configuration, custom models
- **Anthropic**: API key management, model selection
- **Azure**: Environment variables, resource configuration
- **Vertex**: Service account credentials, project settings
- **OpenRouter**: API key configuration, free tier models
- **Moreminimore**: Pro subscription toggle, custom API endpoints
### Safety Mechanisms
- **Non-destructive updates**: Only changes branding text and URLs
- **Configuration preservation**: User settings are never overwritten
- **TypeScript safety**: All prop interfaces are properly typed
- **Error handling**: Comprehensive error messages and validation
## 📈 Benefits Achieved
1. **User Experience**: Seamless multi-provider configuration
2. **Flexibility**: Users can choose their preferred AI providers
3. **Future-Proof**: Safe update mechanism for ongoing development
4. **Brand Consistency**: Professional Moreminimore branding throughout
5. **Performance**: No performance impact from the changes
## 🎉 Success Metrics
-**100% TypeScript compilation success**
-**Zero breaking changes to existing functionality**
-**Complete Moreminimore branding integration**
-**Preserved all advanced provider features**
-**Safe, repeatable update process**
## 🔄 Maintenance
The solution is designed for long-term maintainability:
- Update scripts are safe to run repeatedly
- New provider additions will work automatically
- Branding updates are centralized and consistent
- Documentation is comprehensive and up-to-date
---
**Status**: ✅ **COMPLETE** - All objectives achieved successfully

View File

@@ -1,198 +0,0 @@
# MoreMinimore Logo Integration Guide
## 🎯 Overview
The MoreMinimore update and debranding script now includes comprehensive logo replacement functionality that automatically converts your custom logo into all required formats for the Electron application.
## 📁 Logo Files Generated
### **Source Logo**
- `assets/moreminimorelogo.png` - Your original PNG logo (source for all conversions)
### **Web Assets**
- `assets/logo.svg` - SVG version for web components (TitleBar, etc.)
- `assets/logo.png` - Optimized 24x24 PNG for TitleBar
### **Electron Icons**
- `assets/icon/logo.png` - Main icon file
- `assets/icon/logo.ico` - Windows application icon
- `assets/icon/logo.icns` - macOS application icon
- `assets/icon/logo_16x16.png` through `assets/icon/logo_1024x1024.png` - Multi-resolution icons
### **Test Fixtures**
- `e2e-tests/fixtures/images/logo.png` - Logo for automated testing
## 🔄 Automatic Conversion Process
### **Image Processing Tools**
The script automatically installs required tools:
- **macOS**: ImageMagick via Homebrew
- **Linux**: ImageMagick via apt-get/yum
- **Windows**: Manual installation required
### **Conversion Steps**
1. **PNG to SVG**: Creates SVG wrapper with embedded base64 PNG data
2. **Multi-size Generation**: Creates icons in all required sizes (16x16 to 1024x1024)
3. **Platform Icons**: Generates ICO (Windows) and ICNS (macOS) files
4. **Optimization**: Creates 24x24 version for TitleBar display
5. **Test Updates**: Updates test fixtures with new logo
## 🚀 Usage
### **Full Update (Recommended)**
```bash
./scripts/update-and-debrand.sh
```
This runs the complete debranding process including logo updates.
### **Logo-Only Update**
```bash
bash -c 'source scripts/update-and-debrand.sh && update_logos'
```
This updates only the logos without running the full debranding.
## 📋 Requirements
### **Source Logo**
- Place your logo at `assets/moreminimorelogo.png`
- Recommended size: 512x512px or larger
- Format: PNG with transparency support
- Square aspect ratio works best
### **System Requirements**
- **macOS**: Homebrew (auto-installed if needed)
- **Linux**: apt-get or yum package manager
- **Windows**: ImageMagick must be manually installed
## 🔧 Technical Details
### **SVG Generation**
The script creates an SVG wrapper that embeds the PNG as base64 data:
```xml
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128">
<image href="data:image/png;base64,..." width="128" height="128"/>
</svg>
```
### **Icon Sizes**
- **16x16**: Taskbar, small UI elements
- **32x32**: Desktop icons, medium UI elements
- **48x48**: Control panel, larger UI elements
- **64x64**: High-DPI small icons
- **128x128**: Standard application icons
- **256x256**: High-DPI application icons
- **512x512**: App Store, high-resolution displays
- **1024x1024**: Retina displays, future-proofing
### **Platform-Specific Formats**
- **ICO (Windows)**: Multi-resolution icon file
- **ICNS (macOS)**: Native macOS icon format with iconset
## 🛠️ Troubleshooting
### **ImageMagick Issues**
```bash
# Check if ImageMagick is installed
convert --version
# Install manually if needed
# macOS
brew install imagemagick
# Ubuntu/Debian
sudo apt-get install imagemagick
# CentOS/RHEL
sudo yum install ImageMagick
```
### **Base64 Encoding Issues**
The script uses cross-platform compatible base64 encoding:
```bash
base64 -i input.png -o - | tr -d '\n'
```
### **Permission Issues**
```bash
# Make script executable
chmod +x scripts/update-and-debrand.sh
```
## 📝 Backup and Restore
### **Automatic Backups**
The script automatically creates backups of all original files:
- `assets/logo.svg.backup`
- `assets/logo.png.backup`
- `assets/icon/logo.png.backup`
- `assets/icon/logo.ico.backup`
- `assets/icon/logo.icns.backup`
- `e2e-tests/fixtures/images/logo.png.backup`
### **Manual Restore**
```bash
# Restore specific files
cp assets/logo.svg.backup assets/logo.svg
cp assets/icon/logo.ico.backup assets/icon/logo.ico
# Restore all backups
find assets -name "*.backup" -exec sh -c 'mv "$1" "${1%.backup}"' _ {} \;
```
## 🎨 Design Guidelines
### **Logo Requirements**
- **Format**: PNG with transparency
- **Size**: Minimum 256x256px (recommended 512x512px)
- **Aspect Ratio**: Square (1:1) works best
- **Colors**: Works well on both light and dark backgrounds
- **Complexity**: Simple designs scale better at small sizes
### **Visibility Testing**
Test your logo at different sizes:
- **16x16**: Should be recognizable as a small icon
- **24x24**: TitleBar display size
- **32x32**: Standard icon size
- **128x128**: Full detail visible
## 🔄 Future Updates
When updating the original Dyad codebase:
1. Run `./scripts/update-and-debrand.sh`
2. The script will automatically:
- Apply all custom features
- Update branding
- Replace all logos with your MoreMinimore branding
- Generate required icon formats
- Update test fixtures
## 📊 Integration Points
### **Code References**
- `src/app/TitleBar.tsx` - Uses `assets/logo.svg`
- `forge.config.ts` - Uses `assets/icon/logo` for Electron
- `e2e-tests/fixtures/images/logo.png` - Test fixtures
### **Build Process**
The generated icons are automatically included in the Electron build process through the `forge.config.ts` configuration.
## 🎉 Success Indicators
After successful logo integration:
- ✅ All logo files generated in correct formats
- ✅ TypeScript compilation passes
- ✅ Application builds without errors
- ✅ Logo displays correctly in TitleBar
- ✅ Application icons show MoreMinimore branding
- ✅ Test fixtures updated with new logo
## 📞 Support
If you encounter issues:
1. Check that `assets/moreminimorelogo.png` exists
2. Verify ImageMagick is installed (`convert --version`)
3. Check file permissions
4. Review script output for error messages
5. Test with a simple PNG file first
The logo integration system is designed to be robust and handle edge cases gracefully, with fallbacks when image processing tools are not available.

View File

@@ -1,281 +0,0 @@
# MoreMinimore Script Integration Guide
This guide explains how to use the updated scripts to integrate your Moreminimore provider customizations when updating from the upstream Dyad repository.
## Overview
The script system has been updated to include all the latest Moreminimore provider changes, making it easy to re-apply your customizations after updating from upstream.
## Scripts Overview
### 1. `scripts/update-and-debrand.sh` - Main Integration Script
**Purpose**: Applies all Moreminimore customizations and removes Dyad branding.
**New Features Added**:
- ✅ Adds Moreminimore as a cloud provider in `language_model_constants.ts`
- ✅ Adds Moreminimore case to `get_model_client.ts` backend
- ✅ Updates provider settings UI to hide model selection for Moreminimore
- ✅ Updates button text to "Setup Moreminimore AI"
- ✅ All existing debranding and custom features
**Usage**:
```bash
# Apply all customizations
./scripts/update-and-debrand.sh
# Or run specific functions
source scripts/update-and-debrand.sh
add_moreminimore_provider
update_backend_model_client
update_provider_settings_ui
```
### 2. `scripts/integrate-custom-features.sh` - Custom Feature Integration
**Purpose**: Integrates custom features with upstream updates, includes Moreminimore provider support.
**New Features Added**:
- ✅ Moreminimore provider files in the file list
-`integrate_moreminimore_provider()` function
- ✅ Validation for Moreminimore configuration
**Usage**:
```bash
# Integrate all custom features
./scripts/integrate-custom-features.sh
# Validate current integration
./scripts/integrate-custom-features.sh validate
# Restore from backup
./scripts/integrate-custom-features.sh restore backup-20231201-120000
```
### 3. `scripts/build-moreminimore-app.sh` - Build Script with Validation
**Purpose**: Builds the MoreMinimore application with proper validation.
**New Features Added**:
-`validate_moreminimore_provider()` function
- ✅ Automatic Moreminimore provider validation during build
- ✅ Auto-fix missing Moreminimore configurations
**Usage**:
```bash
# Development build
./scripts/build-moreminimore-app.sh
# Production build (requires code signing)
./scripts/build-moreminimore-app.sh --production
# Clean build artifacts only
./scripts/build-moreminimore-app.sh --clean-only
# Verbose output
./scripts/build-moreminimore-app.sh --verbose
```
## What the Scripts Do
### Moreminimore Provider Integration
1. **Backend Provider Configuration**:
- Adds "moreminimore" to `CLOUD_PROVIDERS` in `language_model_constants.ts`
- Adds GLM-4.6 model configuration
- Sets up proper website URL and gateway prefix
2. **Backend Model Client**:
- Adds "moreminimore" case to `get_model_client.ts`
- Configures OpenAI-compatible client with fixed base URL
- Proper API key validation
3. **Frontend UI Updates**:
- Hides model selection UI for Moreminimore (fixed model)
- Updates button text to "Setup Moreminimore AI"
- Simplified provider configuration experience
### Existing Features Maintained
- ✅ Remove-limit feature integration
- ✅ Dyad branding removal
- ✅ Logo updates and icon generation
- ✅ Smart context liberation
- ✅ Pro feature removal
- ✅ YouTube section removal
- ✅ All existing customizations
## Update Workflow
When updating from upstream Dyad:
### Option 1: Full Integration (Recommended)
```bash
# 1. Update from upstream
git fetch upstream
git merge upstream/main
# 2. Apply all customizations
./scripts/update-and-debrand.sh
# 3. Build and test
./scripts/build-moreminimore-app.sh
```
### Option 2: Custom Feature Integration
```bash
# 1. Update from upstream
git fetch upstream
git merge upstream/main
# 2. Integrate custom features only
./scripts/integrate-custom-features.sh
# 3. Build and test
./scripts/build-moreminimore-app.sh
```
### Option 3: Manual Control
```bash
# 1. Update from upstream
git fetch upstream
git merge upstream/main
# 2. Run specific functions
source scripts/update-and-debrand.sh
add_moreminimore_provider
update_backend_model_client
update_provider_settings_ui
# 3. Build and test
./scripts/build-moreminimore-app.sh
```
## Validation and Testing
### Automatic Validation
The build script automatically validates:
- ✅ Moreminimore provider exists in `language_model_constants.ts`
- ✅ Moreminimore case exists in `get_model_client.ts`
- ✅ Provider settings UI is updated
- ✅ TypeScript compilation succeeds
### Manual Validation
```bash
# Validate custom features integration
./scripts/integrate-custom-features.sh validate
# Check TypeScript compilation
npm run ts
# Test the application
npm start
```
## File Changes Made
### Backend Files
1. **`src/ipc/shared/language_model_constants.ts`**:
- Added `moreminimore:` to `CLOUD_PROVIDERS`
- Added `moreminimore:` to `MODEL_OPTIONS`
2. **`src/ipc/utils/get_model_client.ts`**:
- Added `case "moreminimore":` in switch statement
- Configured OpenAI-compatible client
### Frontend Files
3. **`src/components/settings/ProviderSettingsPage.tsx`**:
- Updated ModelsSection condition to hide for Moreminimore
- Simplified provider handling
4. **`src/components/settings/ProviderSettingsHeader.tsx`**:
- Updated button text to "Setup Moreminimore AI"
## Troubleshooting
### Common Issues
1. **"Unsupported model provider: moreminimore"**:
```bash
# Re-run the backend model client update
source scripts/update-and-debrand.sh
update_backend_model_client
```
2. **Missing Moreminimore in provider list**:
```bash
# Re-add the provider
source scripts/update-and-debrand.sh
add_moreminimore_provider
```
3. **Model selection UI showing for Moreminimore**:
```bash
# Update the UI
source scripts/update-and-debrand.sh
update_provider_settings_ui
```
4. **Build failures**:
```bash
# Clean build with validation
./scripts/build-moreminimore-app.sh --clean-only
./scripts/build-moreminimore-app.sh --verbose
```
### Backup and Recovery
All scripts create automatic backups:
```bash
# Backups are stored in:
dyad-backup-YYYYMMDD-HHMMSS/
# Restore from backup (integrate-custom-features.sh)
./scripts/integrate-custom-features.sh restore backup-20231201-120000
```
## Testing the Integration
After running the scripts:
1. **Start the application**:
```bash
npm start
```
2. **Verify Moreminimore provider**:
- Go to Settings → AI Providers
- Select "MoreMinimore AI"
- Should show simplified configuration (no model selection)
- Button should say "Setup Moreminimore AI"
3. **Test API connection**:
- Configure your Moreminimore API key
- Click "Setup Moreminimore AI"
- Try sending a chat message
- Should work without "Unsupported model provider" error
## Script Maintenance
The scripts are designed to be:
- ✅ **Idempotent**: Safe to run multiple times
- ✅ **Validating**: Check for existing changes
- ✅ **Backup-safe**: Create backups before modifying
- ✅ **Error-handling**: Clear error messages and recovery options
## Future Updates
When new features are added to Moreminimore:
1. Update the relevant functions in `update-and-debrand.sh`
2. Add validation in `build-moreminimore-app.sh`
3. Update this documentation
## Support
For issues with the scripts:
1. Check the troubleshooting section above
2. Review the script output for specific error messages
3. Verify file permissions and directory structure
4. Test with verbose output: `--verbose` flag
The scripts are designed to handle most edge cases automatically and provide clear feedback when manual intervention is needed.

View File

@@ -1,187 +0,0 @@
# MoreMinimore Update and Debranding Script
This script (`scripts/update-and-debrand.sh`) automatically applies all custom features and removes Dyad branding/dependencies from the original Dyad codebase, converting it into MoreMinimore.
## 🚀 Features Applied
### Custom Features
-**Remove-limit feature** - Removes all usage limitations and restrictions
-**Smart Context for all users** - Previously Pro-only feature now available to everyone
-**Annotator tool for all users** - Previously Pro-only feature now available to everyone
-**No Pro upgrade buttons** - All Pro restrictions and upgrade prompts removed
### Debranding Changes
-**Dyad → MoreMinimore** - Complete branding transformation
-**Component names updated** - All Dyad* components renamed to MoreMinimore*
-**URLs updated** - All dyad.sh links changed to moreminimore.com
-**Protocol handlers** - Custom `moreminimore://` protocol instead of `dyad://`
-**App metadata** - Title bar and app information updated
### API Dependencies Removed
-**Dyad Template API** - Uses local templates only
-**Dyad Release Notes API** - Release notes check disabled
-**Dyad Auto-update API** - Auto-update functionality removed
-**Dyad Engine dependencies** - All Dyad Engine references removed
### UI/UX Improvements
-**YouTube video section removed** - Cleaner setup experience
-**ProBanner commented out** - No Pro promotion banners
-**ProModeSelector removed** - Simplified chat controls
-**Context Settings button** - Improved UI text
## 📋 Usage
### Quick Start
```bash
# Make the script executable
chmod +x scripts/update-and-debrand.sh
# Run the script
./scripts/update-and-debrand.sh
```
### What the Script Does
1. **Creates backup** - Automatic backup before making changes
2. **Applies custom features** - Enables remove-limit and other features
3. **Removes Dyad dependencies** - Eliminates all external API calls
4. **Updates branding** - Complete Dyad → MoreMinimore transformation
5. **Installs dependencies** - Updates package dependencies
6. **Tests compilation** - Verifies TypeScript compilation
### Safety Features
-**Automatic backup** - Creates timestamped backup directory
-**Error handling** - Script exits on any error
-**Compilation test** - Verifies code compiles successfully
-**Dependency check** - Ensures all dependencies are installed
## 🔄 Update Workflow
When you want to update your MoreMinimore with new features from the original Dyad repository:
1. **Pull latest changes** from upstream Dyad repository
2. **Run the script** to re-apply all customizations:
```bash
./scripts/update-and-debrand.sh
```
3. **Test the application** to ensure everything works:
```bash
npm start
```
4. **Commit changes** if everything works correctly
## 📁 Backup System
The script creates automatic backups with timestamp:
```
dyad-backup-YYYYMMDD-HHMMSS/
├── src/ # Source code backup
├── package.json # Package configuration
└── scripts/ # Scripts backup
```
## 🛠️ Technical Details
### Files Modified
- `src/custom/index.ts` - Custom feature flags
- `src/ipc/utils/template_utils.ts` - Template API removal
- `src/ipc/handlers/release_note_handlers.ts` - Release notes API removal
- `src/main.ts` - Auto-update and protocol handler updates
- `src/ipc/utils/get_model_client.ts` - Dyad Engine removal
- `src/ipc/ipc_host.ts` - Pro handlers removal
- `src/preload.ts` - Pro IPC channels removal
- `src/components/ChatInputControls.tsx` - ProModeSelector removal
- `src/pages/home.tsx` - ProBanner commenting
- `src/ipc/utils/smart_context_store.ts` - Smart context liberation
- `src/ipc/shared/language_model_constants.ts` - Provider updates
- `src/components/SetupBanner.tsx` - YouTube section removal
- `src/app/TitleBar.tsx` - Title bar branding
- `package.json` - App description
- All component files - Dyad → MoreMinimore renaming
- All files - URL updates and branding text
### Key Features Liberated
1. **Smart Context** - Advanced context management for all users
2. **Annotator Tool** - Visual editing and annotation capabilities
3. **Unlimited Usage** - No message limits or restrictions
4. **Full Feature Access** - All Pro features available to everyone
## 🎯 Benefits
### For Users
- **No limitations** - Unlimited access to all features
- **Better privacy** - No external API calls to Dyad services
- **Full functionality** - All Pro features available
- **Clean interface** - No upgrade prompts or restrictions
### For Developers
- **Easy updates** - Single script to re-apply all changes
- **Safe modifications** - Automatic backup system
- **Maintainable** - Clear separation of custom features
- **Extensible** - Easy to add new custom features
## 🔧 Troubleshooting
### Common Issues
#### TypeScript Compilation Errors
```bash
# Check TypeScript compilation
npm run ts
# If errors occur, check the backup and restore if needed
cp -r dyad-backup-YYYYMMDD-HHMMSS/src ./src
```
#### Application Won't Start
```bash
# Check dependencies
npm install
# Rebuild the application
npm run rebuild
# Check logs for specific errors
npm start
```
#### Script Permissions
```bash
# Make script executable
chmod +x scripts/update-and-debrand.sh
```
### Manual Recovery
If something goes wrong, you can always restore from the backup:
```bash
# Find your backup directory
ls dyad-backup-*
# Restore from backup
cp -r dyad-backup-YYYYMMDD-HHMMSS/src ./src
cp dyad-backup-YYYYMMDD-HHMMSS/package.json ./package.json
```
## 📝 Customization
### Adding New Custom Features
1. Add your feature flag to `src/custom/index.ts`
2. Implement the feature in the appropriate files
3. Update the script to apply your changes automatically
### Modifying the Script
The script is organized into clear functions:
- `apply_custom_features()` - Apply custom modifications
- `remove_dyad_apis()` - Remove external dependencies
- `update_branding()` - Update branding and names
- `remove_pro_features()` - Remove Pro restrictions
## 🎉 Result
After running the script, you'll have:
- **MoreMinimore** - Fully branded application
- **No limitations** - All features available to all users
- **No external dependencies** - Complete independence from Dyad APIs
- **Clean interface** - No Pro upgrade prompts or restrictions
- **Easy updates** - Simple script to re-apply changes
The application will be ready to use with all custom features enabled and no Dyad branding or dependencies.

587
README.md
View File

@@ -1,34 +1,589 @@
# Dyad # MoreMinimore
Dyad is a local, open-source AI app builder. It's fast, private, and fully under your control — like Lovable, v0, or Bolt, but running right on your machine. MoreMinimore is a local, open-source AI app builder. It's fast, private, and fully under your control — like Lovable, v0, or Bolt, but running right on your machine.
[![Image](https://github.com/user-attachments/assets/f6c83dfc-6ffd-4d32-93dd-4b9c46d17790)](https://dyad.sh/) ![Image](https://github.com/user-attachments/assets/f6c83dfc-6ffd-4d32-93dd-4b9c46d17790)
More info at: [https://dyad.sh/](https://dyad.sh/)
## 🚀 Features ## 🚀 Features
- ⚡️ **Local**: Fast, private and no lock-in. - ⚡️ **Local**: Fast, private and no lock-in.
- 🛠 **Bring your own keys**: Use your own AI API keys — no vendor lock-in. - 🛠 **Bring your own keys**: Use your own AI API keys — no vendor lock-in.
- 🖥️ **Cross-platform**: Easy to run on Mac or Windows. - 🖥️ **Cross-platform**: Easy to run on Mac or Windows.
-**Enhanced**: Smart context and unlimited usage with custom features.
- 🎯 **No limitations**: All Pro features available to everyone.
- 🔒 **Privacy-focused**: No external API calls to commercial services.
## 📦 Download ## 🧰 Prerequisites
No sign-up required. Just download and go. - Node.js >= 20
- npm (comes with Node.js)
- Git
### [👉 Download for your platform](https://www.dyad.sh/#download) You can verify your versions:
## 🤝 Community ```bash
node -v
npm -v
```
Join our growing community of AI app builders on **Reddit**: [r/dyadbuilders](https://www.reddit.com/r/dyadbuilders/) - share your projects and get help from the community! ## 🚀 Quick Start
## 🛠️ Contributing ### Option 1: Download and Run (Easiest)
**Dyad** is open-source (Apache 2.0 licensed). 1. **Download the latest release** from [GitHub Releases](https://github.com/kunthawat/moreminimore-vibe/releases)
2. **Install the application** for your platform
3. **Launch MoreMinimore** and start building!
If you're interested in contributing to dyad, please read our [contributing](./CONTRIBUTING.md) doc. ### Option 2: Build from Source
## License ```bash
# Clone the repository
git clone https://github.com/kunthawat/moreminimore-vibe.git
cd moreminimore-vibe
- All the code in this repo outside of `src/pro` is open-source and licensed under Apache 2.0 - see [LICENSE](./LICENSE). # Install dependencies
- All the code in this repo within `src/pro` is fair-source and licensed under [Functional Source License 1.1 Apache 2.0](https://fsl.software/) - see [LICENSE](./src/pro/LICENSE). npm install
# Apply custom features and debranding
chmod +x scripts/update-and-debrand.sh
./scripts/update-and-debrand.sh
# Start the application
npm start
```
## 📋 Essential Commands
This section contains all the commands you'll frequently need. Copy and paste these directly.
### 🏗️ Development Commands
```bash
# Start development server
npm start
# Check TypeScript compilation
npm run ts
# Run tests
npm test
# Run linting
npm run lint
# Format code
npm run prettier
# Clean build artifacts
npm run clean
```
### 🔨 Build Commands
```bash
# Development build (no code signing)
./scripts/build-moreminimore-app.sh
# Production build (requires code signing setup)
./scripts/build-moreminimore-app.sh --production
# Clean build artifacts only
./scripts/build-moreminimore-app.sh --clean-only
# Verbose build (for debugging)
./scripts/build-moreminimore-app.sh --verbose
# Fast build (skip dependency install)
./scripts/build-moreminimore-app.sh --skip-deps
# Create distributables
npm run make
```
### 🔄 Update Commands
```bash
# Apply custom features and debranding
./scripts/update-and-debrand.sh
# Integrate custom features after upstream update
./scripts/integrate-custom-features.sh integrate
# Validate custom features integration
./scripts/integrate-custom-features.sh validate
# Restore from backup (if needed)
./scripts/integrate-custom-features.sh restore backup-YYYYMMDD-HHMMSS
```
### 🧪 Testing Commands
```bash
# Run unit tests
npm test
# Run tests in watch mode
npm run test:watch
# Run tests with UI
npm run test:ui
# Run end-to-end tests
npm run e2e
# Run E2E tests with sharding
npm run e2e:shard
```
## 🏗️ Complete Setup Guide
### Step 1: Clone and Install
```bash
# Clone the repository
git clone https://github.com/kunthawat/moreminimore-vibe.git
cd moreminimore-vibe
# Install dependencies
npm install
# Make scripts executable
chmod +x scripts/*.sh
```
### Step 2: Apply Custom Features
```bash
# Run the debranding and custom features script
./scripts/update-and-debrand.sh
```
This script will:
- ✅ Create automatic backup
- ✅ Apply remove-limit feature
- ✅ Enable smart context for all users
- ✅ Remove Dyad branding and dependencies
- ✅ Update all branding to MoreMinimore
- ✅ Install dependencies and test compilation
### Step 3: Verify Installation
```bash
# Check TypeScript compilation
npm run ts
# Start the application
npm start
```
### Step 4: Test Build (Optional)
```bash
# Test build process
./scripts/build-moreminimore-app.sh
```
## 📦 Building for Distribution
### Development Build (Recommended for Testing)
```bash
./scripts/build-moreminimore-app.sh
```
- **Output**: `out/make/zip/darwin/arm64/moreminimore-darwin-arm64-*.zip`
- **Size**: ~180MB
- **Code Signing**: Disabled (for development/testing)
### Production Build (Requires Code Signing)
```bash
# Set up Apple Developer credentials first
export APPLE_TEAM_ID="your-apple-developer-team-id"
export APPLE_ID="your-apple-id@example.com"
export APPLE_PASSWORD="your-app-specific-password"
export SM_CODE_SIGNING_CERT_SHA1_HASH="your-certificate-sha1-hash"
# Build production version
./scripts/build-moreminimore-app.sh --production
```
### Build Options
```bash
# Clean build artifacts only
./scripts/build-moreminimore-app.sh --clean-only
# Verbose output for debugging
./scripts/build-moreminimore-app.sh --verbose
# Skip dependency installation
./scripts/build-moreminimore-app.sh --skip-deps
# Show help
./scripts/build-moreminimore-app.sh --help
```
## 🔄 Updating from Upstream
When you want to update MoreMinimore with new features from the original Dyad repository:
### Step 1: Fetch Latest Changes
```bash
# Add upstream remote (if not already added)
git remote add upstream https://github.com/dyad-sh/dyad.git
# Fetch latest changes
git fetch upstream
# Merge upstream changes
git merge upstream/main
```
### Step 2: Re-apply Custom Features
```bash
# Run the update script to re-apply all customizations
./scripts/update-and-debrand.sh
```
### Step 3: Integrate Custom Features
```bash
# Integrate custom features with the new codebase
./scripts/integrate-custom-features.sh integrate
# Validate the integration
./scripts/integrate-custom-features.sh validate
```
### Step 4: Test and Commit
```bash
# Test the application
npm start
# Test build process
./scripts/build-moreminimore-app.sh
# Commit changes if everything works
git add .
git commit -m "Update upstream and re-apply custom features"
```
## 🛠️ Custom Features
### Remove-Limit Feature
- **Unlimited usage**: No message limits or restrictions
- **Full feature access**: All Pro features available to everyone
- **No upgrade prompts**: Clean interface without commercial restrictions
### Smart Context for All Users
- **Advanced context management**: Intelligent handling of long conversations
- **Rolling summaries**: Automatic summarization when context exceeds thresholds
- **Context caching**: Efficient caching with TTL for better performance
- **Snippet importance scoring**: Intelligent ranking of context snippets
### Enhanced UI/UX
- **Clean interface**: No Pro banners or upgrade buttons
- **Improved branding**: Complete MoreMinimore branding throughout
- **Better organization**: Simplified controls and settings
- **Context Settings**: Improved UI for context management
## 🔧 Configuration
### Environment Variables (Optional)
```bash
# Set custom gateway URL
MOREMINIMORE_GATEWAY_URL=http://localhost:8080/v1 npm start
# Development mode with debugging
DEBUG=* npm start
# Production mode
NODE_ENV=production npm start
```
### Custom Feature Flags
Edit `src/custom/index.ts` to enable/disable features:
```typescript
export const REMOVE_LIMIT_ENABLED = true;
export const SMART_CONTEXT_ENABLED = true;
export const ANNOTATOR_ENABLED = true;
```
## 🐛 Troubleshooting
### Common Issues and Solutions
#### TypeScript Compilation Errors
```bash
# Check TypeScript compilation
npm run ts
# If errors occur, check specific files
npm run ts:main # Main process
npm run ts:workers # Worker processes
```
#### Application Won't Start
```bash
# Check dependencies
npm install
# Clean and rebuild
npm run clean
npm install
npm start
# Check logs for specific errors
npm start 2>&1 | tee startup-errors.log
```
#### Build Issues
```bash
# Clean build artifacts
./scripts/build-moreminimore-app.sh --clean-only
# Verbose build for debugging
./scripts/build-moreminimore-app.sh --verbose
# Check Node.js and npm versions
node -v
npm -v
```
#### Script Permission Issues
```bash
# Make scripts executable
chmod +x scripts/*.sh
# Check script permissions
ls -la scripts/
```
#### Integration Issues After Update
```bash
# Validate current integration
./scripts/integrate-custom-features.sh validate
# Restore from backup if needed
ls backups/ # Find latest backup
./scripts/integrate-custom-features.sh restore backup-YYYYMMDD-HHMMSS
# Re-run integration
./scripts/integrate-custom-features.sh integrate
```
### Recovery Procedures
#### Restore from Backup
```bash
# Find available backups
ls -la backups/
# Restore from specific backup
./scripts/integrate-custom-features.sh restore backup-20231218-154512
# Verify restoration
./scripts/integrate-custom-features.sh validate
```
#### Reset to Clean State
```bash
# Clean all build artifacts
npm run clean
rm -rf node_modules package-lock.json
# Reinstall dependencies
npm install
# Re-apply custom features
./scripts/update-and-debrand.sh
```
## 📁 Project Structure
### Important Files and Directories
```
moreminimore-vibe/
├── src/ # Source code
│ ├── components/ # React components
│ ├── ipc/ # IPC handlers and utilities
│ ├── pages/ # Application pages
│ └── custom/ # Custom feature flags
├── scripts/ # Build and utility scripts
│ ├── update-and-debrand.sh # Main debranding script
│ ├── build-moreminimore-app.sh # Build automation
│ └── integrate-custom-features.sh # Feature integration
├── assets/ # Static assets (logos, icons)
├── out/ # Build output directory
└── backups/ # Automatic backups (created as needed)
```
### Key Scripts
- **`scripts/update-and-debrand.sh`** - Applies all custom features and debranding
- **`scripts/build-moreminimore-app.sh`** - Comprehensive build automation
- **`scripts/integrate-custom-features.sh`** - Manages custom feature integration
### Configuration Files
- **`package.json`** - Project configuration and dependencies
- **`src/custom/index.ts`** - Custom feature flags
- **`forge.config.ts`** - Electron Forge configuration
## 🎯 Development Workflow
### Daily Development
```bash
# 1. Start development server
npm start
# 2. Make changes to code
# 3. Check TypeScript compilation
npm run ts
# 4. Run tests
npm test
# 5. Format code
npm run prettier
# 6. Test build
./scripts/build-moreminimore-app.sh
```
### Before Committing
```bash
# Run all checks
npm run presubmit
# Or run individually
npm run prettier:check
npm run lint
npm run ts
npm test
```
### Release Preparation
```bash
# 1. Update version in package.json
# 2. Test thoroughly
npm test
./scripts/build-moreminimore-app.sh
# 3. Create production build
./scripts/build-moreminimore-app.sh --production
# 4. Verify release assets
npm run verify-release
```
## 📚 Advanced Topics
### Code Signing Setup
For production builds, set up Apple Developer credentials:
```bash
# Set environment variables
export APPLE_TEAM_ID="your-apple-developer-team-id"
export APPLE_ID="your-apple-id@example.com"
export APPLE_PASSWORD="your-app-specific-password"
export SM_CODE_SIGNING_CERT_SHA1_HASH="your-certificate-sha1-hash"
# Find your Team ID
security find-identity -v -p codesigning
# Generate app-specific password
# Visit: https://appleid.apple.com → Security → App-Specific Passwords
```
### Custom Feature Development
1. **Add feature flag** to `src/custom/index.ts`
2. **Implement feature** in appropriate files
3. **Update scripts** to apply changes automatically
4. **Test thoroughly** with `npm test` and `npm run ts`
### Database Operations
```bash
# Generate database migrations
npm run db:generate
# Push database changes
npm run db:push
# Open database studio
npm run db:studio
```
## 🤝 Contributing
1. **Fork the repository**
2. **Create a feature branch**: `git checkout -b feature-name`
3. **Make your changes**
4. **Run tests**: `npm test`
5. **Check formatting**: `npm run prettier:check`
6. **Commit changes**: `git commit -m "Add feature description"`
7. **Push to fork**: `git push origin feature-name`
8. **Create Pull Request**
### Contribution Guidelines
- Ensure no Dyad dependencies are added
- Maintain custom features and branding
- Update documentation as needed
- Test thoroughly before submitting
- Follow existing code style and patterns
## 📄 License
MIT License — see [LICENSE](./LICENSE).
## 🔗 Related Resources
- **GitHub Repository**: https://github.com/kunthawat/moreminimore-vibe
- **Issues and Bug Reports**: https://github.com/kunthawat/moreminimore-vibe/issues
- **Community**: Join our growing community of AI app builders
## 🆘 Support
If you encounter issues:
1. **Check this README** for troubleshooting steps
2. **Review the logs** with `--verbose` flag on scripts
3. **Search existing issues** on GitHub
4. **Create a new issue** with detailed information
5. **Test with clean environment** if needed
### Getting Help
For specific issues:
- **Build problems**: Run `./scripts/build-moreminimore-app.sh --verbose`
- **Integration issues**: Run `./scripts/integrate-custom-features.sh validate`
- **Application crashes**: Check console logs and `startup-errors.log`
- **TypeScript errors**: Run `npm run ts` for specific error details
---
**MoreMinimore** is a fork of [Dyad](https://github.com/dyad-sh/dyad) with enhanced features, removed limitations, and complete independence from commercial services. Enjoy building AI applications with full control and no restrictions!

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 31 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB