This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Binary Code Translator is a static web application that provides free online tools for converting between different number bases and text formats. It's designed as a Multi-Page Application (MPA) for SEO optimization, running entirely client-side with no backend dependencies.
Since this is a static site with no build process:
# Serve the site locally (any static server works)
python -m http.server 8000
# or
npx serve .
# or simply open index.html directly in browser- Copy all files to any static hosting service (GitHub Pages, Netlify, Vercel)
- No build step required - files are deployment-ready
index.html- Main text ↔ binary converter (primary landing page)text-to-binary.html- Dedicated text to binary conversionbinary-to-text.html- Binary to text conversionbinary-to-decimal.html- Binary to decimal conversionbinary-to-hex.html- Binary to hexadecimal conversionascii-to-binary.html- ASCII to binary conversion
css/style.css- Unified stylesheet with CSS variables, dark mode supportjs/ui-controller.js- Core conversion logic using ES6+ classesjs/enhanced-ui.js- Additional features (FAQ, examples, animations)
- Data Attributes: Pages use
data-modeto configure converter behavior - Real-time Updates: Input events trigger instant conversion with debouncing
- LocalStorage: Conversion history persists in browser storage
- Progressive Enhancement: Basic functionality works without JavaScript
- Handles bidirectional conversions between text, binary, decimal, hex, ASCII
- Auto-detects input format and converts accordingly
- Manages UI state, error handling, and file operations
- CSS custom properties for theming
- Mobile-first responsive design
- Dark/light mode via
prefers-color-scheme - Monospace fonts (JetBrains Mono) for code display
- Each page has unique meta tags and structured data
- Canonical tags prevent duplicate content issues
- sitemap.xml lists all converter pages
- robots.txt for search engine crawling
- Create new HTML page following existing template
- Set appropriate
data-modeattribute - Add unique title/meta tags for SEO
- Update sitemap.xml and navigation
- Update ui-controller.js classes and methods
- Ensure error handling provides clear visual feedback
- Test with various input formats and edge cases
- Use CSS variables for consistent theming
- Maintain mobile responsiveness
- Test both light and dark modes
- No external dependencies or frameworks
- All processing must be client-side only
- Maintain 100+ Lighthouse performance scores
- Ensure accessibility with semantic HTML and keyboard navigation