Calculatrice 3D, Web ELGPU & Analytics
L'application intègre nativement le pont IPC sécurisé, la vérification cryptographique SHA-256, le serveur WebSocket local et la politique d'interconnexion globale avec toutes les applications du domaine ELGPU (*.elgpu), leurs sous-domaines, www et l'ensemble des liens https:// du Web.
const { app, BrowserWindow, ipcMain } = require('electron');
const path = require('path');
const crypto = require('crypto');
const WebSocket = require('ws');
function createWindow () {
const win = new BrowserWindow({
width: 1024,
height: 768,
webPreferences: {
preload: path.join(__dirname, 'preload.js'),
contextIsolation: true,
nodeIntegration: false
}
});
win.loadFile('index.html');
}
// Serveur WebSocket local pour intercommunication inter-applications sécurisée
const wss = new WebSocket.Server({ port: 8080 });
wss.on('connection', (ws) => {
ws.on('message', (msg) => {
const packet = JSON.parse(msg);
const hash = crypto.createHash('sha256').update(JSON.stringify(packet.data)).digest('hex');
if (hash === packet.hash) ws.send(JSON.stringify({ status: 'ACCEPTED', hash }));
});
});
app.whenReady().then(createWindow);
{
"name": "kalel-enterprise-desktop",
"version": "1.0.0",
"description": "Calculatrice 3D & Enterprise Electron",
"main": "main.js",
"scripts": { "start": "electron ." },
"devDependencies": { "electron": "^28.0.0", "ws": "^8.16.0" }
}