Created
April 26, 2025 12:08
-
-
Save antoniwan/5a322e8d1d824a64f770c59a64bba0ca to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
/** | |
* setup-stronghand-schema.js | |
* | |
* Sculpt your FORGE & VAULT drives with pro folder schemas + READMEs. | |
* Usage: | |
* node setup-stronghand-schema.js "D:\\" "E:\\" | |
*/ | |
const fs = require('fs'); | |
const path = require('path'); | |
if (process.argv.length < 3) { | |
console.error('Usage: node setup-stronghand-schema.js <FORGE_ROOT> [VAULT_ROOT]'); | |
process.exit(1); | |
} | |
const [ , , FORGE_ROOT, VAULT_ROOT ] = process.argv; | |
// Helper to create a folder + README | |
function mkdirWithReadme(root, name, description) { | |
const dir = path.join(root, name); | |
fs.mkdirSync(dir, { recursive: true }); | |
const readmePath = path.join(dir, 'README.md'); | |
const content = `# ${name} | |
${description} | |
`; | |
fs.writeFileSync(readmePath, content); | |
console.log(`✔ ${name} @ ${root}`); | |
} | |
// 1) FORGE schema | |
const forgeSections = [ | |
{ name: 'DEV', desc: 'Code projects & experiments.' }, | |
{ name: 'DOCS', desc: 'Specs, notes, docs & logs.' }, | |
{ name: 'SYSTEM', desc: 'ISOs, installers & portable tools.' }, | |
{ name: 'RITUALS', desc: 'Daily rituals, manifestos & journals.' }, | |
{ name: 'RECIPES', desc: 'Cooking recipes & DIY formulas.' }, | |
{ name: 'RECEIPTS', desc: 'Purchase confirmations & invoices.' }, | |
{ name: 'PRODUCT_MANUALS', desc: 'Manuals, warranties & instructions.' }, | |
{ name: 'TAXES', desc: 'Tax documents sorted by year.' } | |
]; | |
// Sub-folders under FORGE | |
const forgeSubfolders = { | |
DEV: ['PERSONAL','CLIENTS','EXPERIMENTS','WEB-STARTER'], | |
RITUALS: ['DAILY','JOURNAL'], | |
RECIPES: ['COOKING','OTHER'] | |
}; | |
// Tax years 2010 → current | |
const currentYear = new Date().getFullYear(); | |
const taxYears = Array.from({length: currentYear - 2010 + 1}, (_,i) => (2010 + i).toString()); | |
// 2) VAULT schema | |
const vaultSections = [ | |
{ name: 'MUSIC', desc: 'Tracks, stems & guitar recordings.' }, | |
{ name: 'VIDEO', desc: 'Raw footage & edited clips.' }, | |
{ name: 'ART', desc: 'Digital artwork & design assets.' }, | |
{ name: 'MEMORY', desc: 'Photos & family memories.' }, | |
{ name: 'ARCHIVE', desc: 'Completed projects & backups.' }, | |
{ name: 'DREAMS', desc: 'Blueprints & wild future visions.' } | |
]; | |
// Sub-folders under VAULT | |
const vaultSubfolders = { | |
MUSIC: ['TRACKS','STEMS','GUITARS'], | |
VIDEO: ['RAW','EDITS'] | |
}; | |
console.log('\n🔨 Sculpting FORGE schema...'); | |
if (FORGE_ROOT) { | |
forgeSections.forEach(sec => mkdirWithReadme(FORGE_ROOT, sec.name, sec.desc)); | |
// create subfolders | |
Object.entries(forgeSubfolders).forEach(([sec,subs]) => { | |
subs.forEach(sub => { | |
fs.mkdirSync(path.join(FORGE_ROOT, sec, sub), { recursive: true }); | |
}); | |
}); | |
// tax years | |
taxYears.forEach(year => { | |
fs.mkdirSync(path.join(FORGE_ROOT, 'TAXES', year), { recursive: true }); | |
}); | |
console.log(`\n✅ FORGE schema complete at ${FORGE_ROOT}\n`); | |
} else { | |
console.warn('⚠️ No FORGE root provided. Skipping FORGE.'); | |
} | |
console.log('🔒 Sculpting VAULT schema...'); | |
if (VAULT_ROOT) { | |
vaultSections.forEach(sec => mkdirWithReadme(VAULT_ROOT, sec.name, sec.desc)); | |
Object.entries(vaultSubfolders).forEach(([sec,subs]) => { | |
subs.forEach(sub => { | |
fs.mkdirSync(path.join(VAULT_ROOT, sec, sub), { recursive: true }); | |
}); | |
}); | |
console.log(`\n✅ VAULT schema complete at ${VAULT_ROOT}\n`); | |
} else { | |
console.warn('⚠️ No VAULT root provided. Skipping VAULT.'); | |
} | |
console.log('🏗️ All done. Time to BUILD and PRESERVE!'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment