A browser-based code protection, minification, obfuscation, formatting, and supported code restoration utility by MRS Engineers BD.
CodeGuard is an open-source, client-side code utility designed specifically for website owners, frontend engineers, Blogger theme developers, and authors of standalone HTML applications.
It provides format-aware code processing pipelines for:
- HTML Documents: Whitespace compression, comment removal, inline style and script minification, and self-extracting container encapsulation.
- JavaScript Files: Industrial identifier mangling (
_0x...), string lookup table rotation, hexadecimal character escape transformations, and syntax minification. - CSS Stylesheets: High-density stylesheet minification with strict preservation of CSS custom properties (
--var), media queries, keyframes, and browser vendor prefixes. - Blogger XML Themes: Strict XML validation via
DOMParser, CDATA skin style minification, and format-safe preservation of Blogger namespaces (xmlns:b,xmlns:expr),<b:widget>, and<b:includable>sections. - Restore & Beautify: Code beautification, indentation formatting (2/4 spaces), hexadecimal (
\xHH) and unicode (\uHHHH) string de-escaping, and string array table resolution.
- Framework: React 19 + TypeScript
- Bundler & Tooling: Vite 8 +
@tailwindcss/vite - Styling: Tailwind CSS v4 (Cybersecurity Dark & Crisp Light themes)
- Formatting Engine:
js-beautify - Icons: Lucide React
- Deployment: GitHub Pages via GitHub Actions (
dist/directory)
- GitHub Repository: https://github.com/mdrajidul99/code-guard
- Live Production URL: https://code-guard.2bd.net/
- Vite Base Path:
/code-guard/
- Node.js 18+ or 20+
- npm 9+
Clone the repository and install dependencies:
git clone https://github.com/mdrajidul99/code-guard.git
cd code-guard
npm installRun the Vite development server:
npm run devOpen http://localhost:3000 (or the URL provided in the console).
Compile the application into the production distribution directory (dist/):
npm run buildVerify that dist/index.html and compiled assets in dist/assets/ are generated.
npm run previewThe repository includes .github/workflows/deploy.yml for zero-configuration, automated deployments on pushes to main.
To enable deployment to GitHub Pages:
- Open your repository on GitHub:
https://github.com/mdrajidul99/code-guard - Navigate to Settings → Pages (under Code and automation).
- Under Build and deployment → Source, select GitHub Actions (do not select "Deploy from a branch").
- Push your changes to the
mainbranch or manually trigger the workflow from the Actions tab usingworkflow_dispatch. - The workflow builds the production bundle and deploys
dist/directly tohttps://code-guard.2bd.net/.
CodeGuard helps make supported source code harder to read and reuse casually. Browser-delivered HTML, CSS, and JavaScript can still be inspected. No client-side transformation guarantees complete secrecy.
- Client-Side Reality: Web browsers must decode and execute HTML, CSS, and JavaScript to render them. Any user with browser Developer Tools can inspect DOM elements and network calls.
- Backend Recommendation: Never embed private API keys, payment secrets, or server database credentials inside client-side files. Sensitive business logic should remain on an authenticated server.
- Backups: Code minification and identifier mangling are irreversible transformations that permanently discard comments and human-readable variable names. Always maintain backups of your original source files.
- Developer / Company: MRS Engineers BD
- Contact Email: mrs.engineers.bd26@gmail.com
- Issue Tracker: https://github.com/mdrajidul99/code-guard/issues
© 2026 CodeGuard. Engineered with integrity by MRS Engineers BD.