refactor: improve storage handling, UI feedback, and defaults

- Update default admin email to admin@datastack.dev
- Improve storage flush logic with partial success handling
- Enhance CSV download reliability using fetch and Blob
- Adjust simulator protocol resolution and timing
- Fix date range filtering in data API query
This commit is contained in:
Team Dark Devil committed 2026-11-19 00:42:38 +06:00
1 parent 40a6855724
commit 3ad9b1d4d2
17 files changed
+281 -78

No files matched your search

+48
View File
@@ -0,0 +1,48 @@
#!/usr/bin/env node
/**
* DataStack Unified Development Runner
* Starts both the Next.js Web Console (Port 3000) and Express/Socket.IO Ingestion Server (Port 4000)
* concurrently with unified terminal logging and clean shutdown handling.
*/
const { spawn } = require('node:child_process');
console.log('\x1b[36m%s\x1b[0m', '=======================================================');
console.log('\x1b[36m%s\x1b[0m', ' DataStack Unified Development Runner');
console.log('\x1b[36m%s\x1b[0m', ' - Port 3000: Next.js 15 Web & Admin Console (/vcon/*)');
console.log('\x1b[36m%s\x1b[0m', ' - Port 4000: Ingestion & Socket.IO Streaming Engine');
console.log('\x1b[36m%s\x1b[0m', '=======================================================\n');
const nextProc = spawn('npm', ['run', 'dev'], {
stdio: 'inherit',
shell: true,
env: { ...process.env },
});
const serverProc = spawn('npm', ['run', 'server'], {
stdio: 'inherit',
shell: true,
env: { ...process.env },
});
function shutdown(signal) {
console.log(`\n[DataStack] Received ${signal}. Gracefully stopping all dev services...`);
if (!nextProc.killed) nextProc.kill(signal);
if (!serverProc.killed) serverProc.kill(signal);
process.exit(0);
}
process.on('SIGINT', () => shutdown('SIGINT'));
process.on('SIGTERM', () => shutdown('SIGTERM'));
nextProc.on('exit', (code) => {
if (code && code !== 0) {
console.error(`[DataStack] Next.js development server exited with code ${code}`);
}
});
serverProc.on('exit', (code) => {
if (code && code !== 0) {
console.error(`[DataStack] Ingestion server exited with code ${code}`);
}
});