Context
While deploying the BrightMinds — Kids English + Coding microsite, I discovered that browsers expose the full source code of static sites by default. This raised the question: can we make HTML less readable to discourage casual code copying without overhauling the stack?
Threats
- Readable HTML/CSS/JS made the front-end structure easy to copy
 - Public GitHub repository revealed the site’s design and logic
 - No performance optimization beyond simple static hosting
 - Risk of developers confusing minification with true security
 
Approach
- Introduced HTML, CSS, and JS minification using html-minifier-terser, clean-css-cli, and terser
 - Automated the process with npm scripts and GitHub Actions (npm run build)
 - Configured Vercel to deploy only the optimized /dist directory
 - Compared minification vs. obfuscation vs. server-side rendering for practicality and performance
 - Educated the team on why minification improves speed but not confidentiality
 
Outcome
Reduced source file size by ~70%, improving mobile load times and slightly obscuring structure. The project maintained lightweight static performance while reinforcing DevSecOps awareness that true protection relies on server-side secrecy, not hiding HTML.
Lessons Learned
Minification boosts efficiency, not privacy. Security in web projects depends on keeping sensitive logic off the client and treating minification as an optimization layer, not a defense mechanism.