Repository navigation
v1.0.4
π Erapor 2025 Integration
β¨ Fitur Baru
- Smart Port 8239 Detection
- Automatic detection port 8239 untuk Erapor 2025 application
- Check keberadaan file
C:\appraporsmaref25\wwwroot\app\Config\App.php - Validasi konfigurasi baseURL di CodeIgniter App.php
- Real-time monitoring changes pada port mappings
- Auto-Configuration System
- Banner notification saat port 8239 terdeteksi dan file App.php ditemukan
- One-click apply configuration dengan tombol "Apply Erapor 2025"
- Automatic backup file sebelum modification (
.backup.{timestamp}) - Domain matching validation: pastikan hostname mapping = baseURL config
- Insert/update public
__construct()method dengan markers
- Auto-Cleanup on Delete
- Automatic restore ke default config saat mapping port 8239 dihapus
- Marker-based precise block detection dan removal
- START/END markers untuk clean deletion tanpa code fragments
- Restore backup dengan timestamp sebelum cleanup
- Visual Status Indicators
- Yellow Banner: Muncul saat port 8239 aktif tapi config belum applied
- Menampilkan domain comparison (Expected vs Current)
- Tombol "Apply Erapor 2025" dan "Dismiss"
- Green Badge: Muncul di tabel mapping saat konfigurasi sudah benar
- Badge "Erapor Online β" dengan checkmark icon
- Ditampilkan di sebelah hostname untuk port 8239
- Hanya muncul saat configuration verified dan match
- Yellow Banner: Muncul saat port 8239 aktif tapi config belum applied
π¨ UI/UX Improvements
- Non-Intrusive Banner Design
- Positioned di bawah tombol "Add Mapping"
- Dapat di-dismiss tanpa apply jika belum siap
- Shows clear comparison antara expected vs current baseURL
- Loading state pada tombol apply
- Success/error messages dengan auto-hide
- Status Badge in Mapping Table
- Compact green badge dengan border dan subtle background
- Icon checkmark (β) untuk visual confirmation
- Badge text: "Erapor Online β"
- Only visible when port 8239 properly configured
- Professional color scheme: green-500/20 background, green-400 text
π§ Technical Implementation
- IPC Handlers (
electron/main/ipcHandlers.js):portMapping:checkErapor2025Config- Validate config vs mappingportMapping:applyErapor2025Config- Apply constructor with markersportMapping:restoreErapor2025Config- Clean removal of config block
- PHP File Parsing:
- Regex-based detection of existing constructor
- Marker detection:
//AUTO-CONFIG-FROM-CTM-STARTdanEND - baseURL extraction dan domain comparison
- Safe file operations dengan backup mechanism
- React Components:
Erapor2025Banner.jsx- Configuration prompt banner- Enhanced
PortMappingManager.jsxdengan auto-check dan badge rendering - State management untuk config status
- Auto-refresh after apply/restore operations
π Security & Reliability
- File Safety:
- Automatic backup sebelum ANY modification
- Backup naming:
App.php.backup.{timestamp} - Restore capability jika terjadi error
- Validation:
- File existence check sebelum operations
- Domain format validation
- Config integrity verification
- Marker presence validation
- Error Handling:
- Graceful degradation jika file tidak accessible
- Clear error messages untuk user
- Logging untuk debugging
- Rollback capability via backups
π¦ User Experience Flow
- Detection Phase:
- User create mapping dengan port 8239
- System check file App.php existence
- Validate current configuration
- Configuration Phase:
- Yellow banner appears jika config needed
- User click "Apply Erapor 2025"
- System backup file β insert constructor β refresh UI
- Green badge appears confirming success
- Active Phase:
- Green "Erapor Online β" badge visible di table
- Configuration active dan working
- No banner shown (clean UI)
- Cleanup Phase:
- User delete port 8239 mapping
- System auto-restore ke default config
- Remove constructor block cleanly
- Create restore backup
π― Benefits
β
Zero manual PHP file editing
β
One-click configuration management
β
Automatic backup protection
β
Visual confirmation of status
β
Clean auto-cleanup on delete
β
No code fragments left behind
β
Professional visual indicators
β
Seamless integration dengan existing workflow