CodeArc
CodeArc is a browser-based frontend toolkit for writing, previewing, converting, and optimizing frontend code in one workspace.
- Frontend editor: HTML, CSS, and JavaScript editing with Monaco, live preview, browser persistence, themes, copy, and project download.
- Tailwind converter: Convert Tailwind markup or a complete HTML document into HTML and compiled standard CSS using the Tailwind v4 compiler.
- Code minifier: Minify HTML, CSS, and JavaScript with copy and download actions.
- Responsive workspace: Tool pages adapt to desktop, tablet, and mobile layouts.
| Tool | Route |
|---|---|
| Home | / |
| Editor | /code-editor |
| Tailwind converter | /tailwind-to-css-convertor |
| Minifier | /code-minifier |
- React 19
- Vite
- React Router
- Tailwind CSS v4
- Monaco Editor
- React Icons
- Netlify Functions
Requirements:
- Node.js 20 or newer recommended
- npm
Install dependencies:
npm installStart the Vite development server:
npm run devThe Vite configuration exposes the Tailwind conversion function locally at:
/.netlify/functions/convert-tailwind
For a full Netlify Functions environment, use the Netlify CLI if it is installed:
netlify devnpm run dev # Start Vite
npm run build # Create the production bundle
npm run preview # Preview the production bundle
npm run lint # Run ESLint
npm test # Run compiler smoke testsThe converter uses the official Tailwind v4 Node compiler rather than browser getComputedStyle() extraction.
It supports:
- Tailwind HTML fragments
- Complete HTML documents
- Body-level utility classes
- Responsive variants such as
md:flex-row - State variants such as
hover:bg-blue-600 - Tailwind CDN script removal from converted HTML
- Original Tailwind units such as
rem,vh, and CSS variables
The conversion endpoint is implemented in:
netlify/functions/convert-tailwind.mjs
Shared compiler logic lives in:
netlify/lib/tailwindCompiler.mjs
The endpoint accepts a JSON POST request:
{
"html": "<button class=\"bg-blue-500 hover:bg-blue-600\">Click</button>"
}and returns:
{
"html": "...cleaned HTML...",
"css": "...compiled Tailwind CSS...",
"candidates": 2
}Input is limited to protect the function from oversized requests.
CodeArc is configured for Netlify. The standard deployment flow is:
- Connect the GitHub repository to Netlify.
- Use
npm run buildas the build command. - Publish the generated
distdirectory. - Let Netlify discover functions under
netlify/functions.
The SPA fallback is configured in netlify.toml. The Tailwind converter must be deployed with the Netlify Function; a static-only upload will not provide the conversion endpoint.
src/
components/ Shared UI and tool components
pages/ Route-level pages
themes/ Monaco editor themes
utils/ Download, minification, and utility logic
data/ Homepage data
netlify/
functions/ Netlify HTTP functions
lib/ Shared server-side compiler logic
test/ Node smoke tests
public/ Brand assets and favicon
Before deploying changes, run:
npm test
npm run lint
npm run build
npm audit --omit=devThe build may report dependency externalization warnings from browser-side minification packages and a bundle-size warning. These are warnings, not build failures.