Skip to content

SymphonyIceAttack/htmlcompiler

Repository files navigation

HTML Compiler Logo

HTML Compiler

Online HTML playground with live preview and modern code editor

WebsiteFeaturesDemoGetting StartedTech StackIssues

🌟 About

HTML Compiler is a modern, feature-rich online HTML editor designed to make web development accessible and enjoyable for everyone. Whether you're a beginner learning your first lines of code or an experienced developer testing a quick idea, we provide a powerful, user-friendly environment to bring your ideas to life.

Visit our website: https://htmlcompiler.top

✨ Features

🎯 Core Functionality

  • Real-time Preview: See your HTML changes instantly with live preview mode
  • Manual Update: Update preview on-demand for better performance control
  • Syntax Highlighting: Powered by CodeMirror 6 for the best editing experience
  • Code Editor: Professional-grade code editor with IntelliSense support

🎨 User Experience

  • Dark & Light Themes: Elegant theme switching with system preference detection
  • Mobile Responsive: Fully responsive design for coding on any device
  • Fullscreen Mode: Distraction-free editing with fullscreen preview
  • Quick Download: Download your HTML files instantly

🔧 Development Features

  • Sandboxed Preview: Secure preview environment with iframe sandboxing
  • Preset Templates: Start quickly with included example HTML templates
  • Clean Interface: Modern, intuitive UI designed for productivity
  • Keyboard Shortcuts: Efficient coding with keyboard navigation

🚀 Demo

Experience HTML Compiler live at https://htmlcompiler.top

HTML Compiler Demo

🛠️ Tech Stack

📋 Getting Started

Prerequisites

  • Node.js 18+ - Latest LTS version recommended
  • pnpm - Fast, disk space efficient package manager

Installation

  1. Clone the repository

    git clone https://github.com/SymphonyIceAttack/htmlcompiler.git
    cd htmlcompiler
  2. Install dependencies

    pnpm install
  3. Start development server

    pnpm dev
  4. Open your browser Navigate to http://localhost:3000

Build for Production

# Build for production
pnpm build

# Start production server
pnpm start

# Build for Cloudflare Workers
pnpm build:worker

# Preview Cloudflare build
pnpm preview

🏗️ Project Structure

html-compiler/
├── app/                    # Next.js App Router
│   ├── page.tsx           # Home page with HTML compiler
│   ├── layout.tsx         # Root layout
│   ├── posts/             # Blog section
│   └── globals.css        # Global styles
├── components/            # React components
│   ├── html-compiler.tsx  # Main editor component
│   ├── blog/              # Blog-related components
│   ├── ui/                # shadcn/ui components
│   └── *.tsx              # Feature components
├── lib/                   # Utilities
│   ├── directus.ts        # CMS client
│   └── utils.ts           # Helper functions
├── public/                # Static assets
├── logo.svg               # Project logo
└── Configuration files...

🎨 Key Components

HtmlCompiler

The main editor component featuring:

  • CodeMirror 6 integration with HTML language support
  • Split-pane layout with adjustable editor/preview ratio
  • Live preview with sandboxed iframe
  • Theme switching and responsive design
  • File download functionality

Blog System

Integrated blog powered by Directus CMS:

  • Server-side rendering for optimal performance
  • Markdown processing with syntax highlighting
  • Automatic table of contents generation
  • Draft mode for content preview

🔧 Available Scripts

  • pnpm dev - Start development server
  • pnpm build - Build for production
  • pnpm start - Start production server
  • pnpm lint - Run Biome linter
  • pnpm format - Format code with Biome
  • pnpm build:worker - Build for Cloudflare Workers
  • pnpm preview - Preview Cloudflare build
  • pnpm deploy - Deploy to Cloudflare Workers

🌍 Deployment

Cloudflare Workers (Recommended)

This project is optimized for Cloudflare Workers deployment:

# Build for Cloudflare
pnpm build:worker

# Preview locally
pnpm preview

# Deploy to Cloudflare
pnpm deploy

Other Platforms

The project can also be deployed on:

  • Vercel - Zero-config deployment
  • Netlify - JAMstack hosting
  • GitHub Pages - Static site hosting

🤝 Contributing

We welcome contributions! Here's how you can help:

Ways to Contribute

  1. 🐛 Bug Reports: Report bugs through GitHub Issues
  2. 💡 Feature Requests: Suggest new features or improvements
  3. 📝 Documentation: Improve documentation and examples
  4. 🔧 Code Contributions: Submit pull requests for bug fixes or features

Development Setup

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Run linting and formatting: pnpm lint && pnpm format
  5. Commit your changes: git commit -m 'Add amazing feature'
  6. Push to the branch: git push origin feature/amazing-feature
  7. Open a Pull Request

Code Style

  • Follow the existing code style
  • Use TypeScript for type safety
  • Run Biome linting before committing
  • Add tests for new features (when test framework is added)
  • Update documentation as needed

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

📞 Support

🗺️ Roadmap

  • Code Snippets Library: Pre-built HTML templates and components
  • Collaborative Editing: Real-time collaboration features
  • Export Options: Export to multiple formats (PDF, image, etc.)
  • Plugin System: Extensible plugin architecture
  • Performance Optimization: Further performance improvements
  • Mobile App: Native mobile application
  • User Accounts: Save and sync projects across devices

Made with ❤️ by SymphonyIceAttack

WebsiteGitHubContact

About

Online HTML playground with live preview and modern code editor

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages