feat: Complete Phase 5C and Phase 5D documentation, including performance metrics, SEO optimization, and advanced features implementation
docs: Add production deployment success documentation for Azure Static Web App docs: Create Quick Start guide for project setup and deployment instructions docs: Update README.md to include new documentation links and structure docs: Enhance User Manual with detailed portal access, roles, and AI assistance features scripts: Implement architecture diagram export script using Mermaid CLI scripts: Create script to auto-generate documentation index for easier navigation chore: Remove unused update-doc-index script
This commit is contained in:
30
scripts/export-architecture.mjs
Normal file
30
scripts/export-architecture.mjs
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* Export Mermaid architecture diagram to PNG/SVG.
|
||||
* Requires: @mermaid-js/mermaid-cli (mmdc)
|
||||
* Usage:
|
||||
* node scripts/export-architecture.mjs --format png
|
||||
* node scripts/export-architecture.mjs --format svg
|
||||
*/
|
||||
import { execSync } from 'child_process'
|
||||
import { existsSync } from 'fs'
|
||||
import { join } from 'path'
|
||||
|
||||
const args = process.argv.slice(2)
|
||||
const formatArg = args.find(a => a.startsWith('--format=')) || '--format=png'
|
||||
const format = formatArg.split('=')[1]
|
||||
const diagram = join(process.cwd(), 'docs', 'ArchitectureDiagram.mmd')
|
||||
const outFile = join(process.cwd(), 'docs', `ArchitectureDiagram.${format}`)
|
||||
|
||||
if (!existsSync(diagram)) {
|
||||
console.error('Diagram source not found:', diagram)
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
try {
|
||||
execSync(`npx mmdc -i "${diagram}" -o "${outFile}"`, { stdio: 'inherit' })
|
||||
console.log(`Exported diagram to ${outFile}`)
|
||||
} catch (e) {
|
||||
console.error('Mermaid export failed. Ensure @mermaid-js/mermaid-cli is installed.')
|
||||
process.exit(1)
|
||||
}
|
||||
55
scripts/generate-doc-index.mjs
Normal file
55
scripts/generate-doc-index.mjs
Normal file
@@ -0,0 +1,55 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* Auto-generate docs/README.md index.
|
||||
* Scans docs directory for .md files (excluding README.md) and categorizes by simple heuristics.
|
||||
*/
|
||||
import { readdirSync, readFileSync, writeFileSync } from 'fs'
|
||||
import { join } from 'path'
|
||||
|
||||
const DOCS_DIR = join(process.cwd(), 'docs')
|
||||
const OUTPUT = join(DOCS_DIR, 'README.md')
|
||||
|
||||
// Basic categorization keywords
|
||||
const categories = [
|
||||
{ name: 'Getting Started', match: [/quickstart/i, /usermanual/i] },
|
||||
{ name: 'Architecture & Engineering', match: [/architecture/i, /implementation/i, /diagram/i] },
|
||||
{ name: 'Delivery & Reports', match: [/completion/i, /deployment/, /update/, /phases_all/i, /production_deployment/ ] },
|
||||
{ name: 'Performance & Optimization', match: [/performance/i, /seo/i] },
|
||||
{ name: 'Change History', match: [/changelog/i] },
|
||||
{ name: 'AI & Advanced Features', match: [/ai/i] }
|
||||
]
|
||||
|
||||
function categorize(file) {
|
||||
const lower = file.toLowerCase()
|
||||
for (const cat of categories) {
|
||||
if (cat.match.some(r => r.test(lower))) return cat.name
|
||||
}
|
||||
return 'Other'
|
||||
}
|
||||
|
||||
function build() {
|
||||
const files = readdirSync(DOCS_DIR)
|
||||
.filter(f => f.endsWith('.md') && f !== 'README.md')
|
||||
.sort()
|
||||
|
||||
const byCategory = {}
|
||||
for (const f of files) {
|
||||
const cat = categorize(f)
|
||||
byCategory[cat] = byCategory[cat] || []
|
||||
byCategory[cat].push(f)
|
||||
}
|
||||
|
||||
const quickLinks = files.map(f => `- [${f.replace(/_/g,' ')}](./${f})`).join('\n')
|
||||
|
||||
let body = '# Documentation Index\n\n(Generated by scripts/generate-doc-index.mjs)\n\n## Quick Links\n' + quickLinks + '\n\n'
|
||||
|
||||
for (const cat of Object.keys(byCategory).sort()) {
|
||||
body += `### ${cat}\n` + byCategory[cat].map(f => `- ${f}`).join('\n') + '\n\n'
|
||||
}
|
||||
|
||||
body += '---\nLast regenerated: ' + new Date().toISOString() + '\n'
|
||||
writeFileSync(OUTPUT, body)
|
||||
console.log('docs/README.md regenerated.')
|
||||
}
|
||||
|
||||
build()
|
||||
0
scripts/update-doc-index.mjs
Normal file
0
scripts/update-doc-index.mjs
Normal file
Reference in New Issue
Block a user