How wiltark/pterodactyl-app works
Main Components Identification
The project appears to be an Electron desktop application with these key components:
a) Frontend Layer:
• index.html (main UI)
b) Backend/Process Layer:
• main.js (Electron main process)
• preload.js (Electron preload script)
• data.json (local data storage)
┌─────────────────────────────────────────────────┐
• Electron App │
• ┌─────────────┐ ┌─────────────────┐ │
• Main Process │◄────────┤ Renderer Process│ │
• (main.js) │ │ (index.html) │ │
• ┘ └─────────────────┘ │
• ▲ ▲ │
• ┌─────────────┐ ┌─────────────┐ │
• data.json │ │ preload.js │ │
• ┘ └─────────────┘ │
• ┘
┌─────────────────┐ ┌─────────────────────┐
• Pterodactyl │◄─────┤ Electron App │
• Servers │ │ │
• ┘ └─────────────────────┘
Important Architectural Aspects to Highlight
a) Process Communication:
• IPC (Inter-Process Communication) between main and renderer processes
• Preload script's role in security and communication
b) Data Flow:
• How server data is stored in data.json
• Communication with external Pterodactyl servers