feat: refactor and optimize frontend with Next.js App Router, TypeScript, and Tailwind CSS

- Complete refactoring of old frontend into Next.js App Router workspace
- Redesigned sidebar collapsing animation with absolute toggle positioning
- Resolved visual canvas bleed transitions between light/dark themes
- Added custom dark theme variant for toggle switch buttons
- Implemented full localization across Indonesian, English, Spanish, Japanese, and Chinese
- Synchronized HTML document themes to apply dark mode styles to portals/overlays
This commit is contained in:
akukanara
2026-05-31 16:46:57 +07:00
Unverified
parent 19e5138525
commit 9d876de930
81 changed files with 10554 additions and 1583 deletions
+50
View File
@@ -0,0 +1,50 @@
const fs = require('fs');
const path = require('path');
const srcDir = path.join(__dirname, 'out');
const destDir = path.join(__dirname, '..', 'frontend');
function copyDirSync(src, dest) {
fs.mkdirSync(dest, { recursive: true });
const entries = fs.readdirSync(src, { withFileTypes: true });
for (let entry of entries) {
const srcPath = path.join(src, entry.name);
const destPath = path.join(dest, entry.name);
if (entry.isDirectory()) {
copyDirSync(srcPath, destPath);
} else {
fs.copyFileSync(srcPath, destPath);
}
}
}
function cleanDirSync(dir) {
if (!fs.existsSync(dir)) return;
const entries = fs.readdirSync(dir, { withFileTypes: true });
for (let entry of entries) {
if (entry.name === '.git' || entry.name === '.antigravitycli') continue;
const fullPath = path.join(dir, entry.name);
if (entry.isDirectory()) {
fs.rmSync(fullPath, { recursive: true, force: true });
} else {
fs.unlinkSync(fullPath);
}
}
}
try {
console.log('Wiping old static files in frontend/ ...');
cleanDirSync(destDir);
console.log('Copying static Next.js assets to frontend/ ...');
if (fs.existsSync(srcDir)) {
copyDirSync(srcDir, destDir);
console.log('Build output synchronization successful!');
} else {
console.error('Error: "out/" directory not found. Compile the Next.js build first.');
}
} catch (err) {
console.error('Synchronization failed:', err);
}