feat: initial Reaktor modular synth app

React + Tone.js modular synthesizer with visual node editor.
Includes: Oscillator, Filter, Envelope, LFO, VCA, Delay, Reverb,
Distortion, Mixer, Scope, Output, and Keyboard modules.
SVG wire connections, knob controls, preset save/load system.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jose Luis
2026-03-21 01:02:41 +01:00
commit 95054a70df
23 changed files with 3770 additions and 0 deletions

47
server.js Normal file
View File

@@ -0,0 +1,47 @@
// Lightweight static file server for Reaktor modular synth
const http = require('http');
const fs = require('fs');
const path = require('path');
const PORT = process.env.PORT || 80;
const STATIC_DIR = path.join(__dirname, 'dist');
const MIME = {
'.html': 'text/html', '.css': 'text/css', '.js': 'application/javascript',
'.json': 'application/json', '.png': 'image/png', '.jpg': 'image/jpeg',
'.svg': 'image/svg+xml', '.ico': 'image/x-icon', '.woff2': 'font/woff2',
'.wasm': 'application/wasm',
};
const server = http.createServer((req, res) => {
let filePath = path.join(STATIC_DIR, req.url === '/' ? 'index.html' : req.url);
// SPA fallback: if file doesn't exist, serve index.html
if (!fs.existsSync(filePath) || fs.statSync(filePath).isDirectory()) {
filePath = path.join(STATIC_DIR, 'index.html');
}
if (!filePath.startsWith(STATIC_DIR)) {
res.writeHead(403); res.end('Forbidden'); return;
}
const ext = path.extname(filePath).toLowerCase();
const contentType = MIME[ext] || 'application/octet-stream';
fs.readFile(filePath, (err, data) => {
if (err) {
res.writeHead(err.code === 'ENOENT' ? 404 : 500);
res.end(err.code === 'ENOENT' ? 'Not found' : 'Server error');
return;
}
if (['.png', '.jpg', '.woff2', '.js', '.css'].includes(ext)) {
res.setHeader('Cache-Control', 'public, max-age=604800');
}
res.writeHead(200, { 'Content-Type': contentType });
res.end(data);
});
});
server.listen(PORT, () => {
console.log(`[reaktor] Running on port ${PORT}`);
});