An intelligent AI coding companion by Hacktoolkit.
- Product: Hexa ⟡
- Tagline: "Code illuminated."
- Colors:
- Electric Teal:
#00F5D4 - Space Black:
#0D0D0D - Cyber Violet:
#7F00FF - Warm White:
#F5F5F5
- Electric Teal:
- Fonts: JetBrains Mono (code/UI), Inter (body)
- Framework: Next.js 14 (Pages Router)
- Language: TypeScript
- Styling: TailwindCSS
- AI Engine: Transformers.js (Hugging Face models in browser)
- Syntax Highlighting: react-syntax-highlighter
- Deployment: GitHub Pages (static export)
hexa.hacktoolkit.com/
├── src/
│ ├── pages/
│ │ ├── _app.tsx # App wrapper with global styles
│ │ ├── _document.tsx # HTML document structure
│ │ ├── index.tsx # Main page with split-screen layout
│ │ ├── terms.tsx # Terms of Service page
│ │ └── privacy.tsx # Privacy Policy page
│ ├── components/
│ │ ├── Header.tsx # Header with logo and theme toggle
│ │ ├── Footer.tsx # Footer component
│ │ ├── ChatPanel.tsx # Chat interface with AI interaction
│ │ ├── CodeEditor.tsx # Syntax-highlighted code editor
│ │ ├── ProviderSwitcher.tsx # AI provider selection
│ │ └── PricingModal.tsx # Stripe pricing modal
│ ├── lib/
│ │ ├── aiApi.ts # Unified AI API abstraction layer
│ │ ├── mockApi.ts # Mock AI responses for testing
│ │ ├── transformersApi.ts # Local browser AI using Transformers.js
│ │ └── useTheme.ts # Theme management hook
│ ├── config/
│ │ └── stripe.ts # Stripe checkout URLs (public, checked in)
│ └── styles/
│ └── globals.css # Global styles and Tailwind imports
├── public/ # Static assets
├── out/ # Build output (git-ignored)
├── docs/ # Deployed build (GitHub Pages)
├── CNAME # Custom domain for GitHub Pages
├── Makefile # Build and deploy automation
├── next.config.js # Next.js configuration with static export
├── tailwind.config.ts # Tailwind configuration with brand colors
├── tsconfig.json # TypeScript configuration
├── README.md # This file
├── TESTING.md # Testing guide
└── DEBUG_CHAT_FLOW.md # Debugging guide
# Install dependencies
make install
# Start development server
make devOpen http://localhost:3000 in your browser.
make help # Display all available commands
make install # Install dependencies
make dev # Start Next.js development server
make run # Build and run production server
make clean # Clean previous builds
make build # Build for production (generates docs/)
make deploy # Build and deploy to GitHub Pagesnpm install
npm run devThe project uses a Makefile for consistent builds and deployments, similar to www.hacktoolkit.com:
# Build the static site
make buildThis will:
- Clean previous builds
- Install dependencies
- Build Next.js static export to
out/ - Copy
CNAMEfile toout/ - Create
.nojekyllfile inout/
# Build and deploy in one command
make deployThis will:
- Run the build process
- Move
out/directory todocs/ - Commit the
docs/directory - Push to the master branch
GitHub Pages is configured to serve from the docs/ directory on the master branch.
⌘+Enter/Ctrl+Enter- Send message in chat⌘+K/Ctrl+K- Toggle command paletteEsc- Close modals
- ✅ Split-screen layout (Chat + Code Editor)
- ✅ Dark/Light theme toggle with localStorage persistence
- ✅ Syntax highlighting for multiple languages (Python, TypeScript, Rust, etc.)
- ✅ Keyboard-centric interaction
- ✅ Responsive design
- ✅ Command palette (⌘+K)
- ✅ Static export for GitHub Pages
- ✅ Local AI: Transformers.js integration (runs in browser)
- ✅ Mock AI: Offline demo mode with pre-coded responses
- ✅ Multiple Providers: Pluggable AI backend system
- ✅ Smart Fallback: Automatically falls back to mock mode on errors
- ✅ Language Detection: Automatically detects target programming language
- ✅ Status Indicators: Real-time AI model loading/ready status
You can switch providers anytime via Settings (⌘+K).
- ✅ Instant responses for demos
- ✅ Works offline
- ✅ Pre-coded examples for common tasks
- ✅ No setup required
- Best for: Trying Hexa, demos, offline use
- Runs entirely in your browser
- No backend required
- Privacy-first (all processing local)
- Uses Xenova/CodeGen-350M model (~350MB download on first use)
- Status indicator shows loading/ready state
- Progress updates in browser console
- Best for: Privacy-conscious users, offline AI after initial download
- Note: First-time load may take 3-7 minutes depending on connection
- Django/FastAPI integration ready
- See
docs/BACKEND_API.mdfor implementation guide - Production-grade AI (GPT-4, Claude, etc.)
- Best for: Production deployments, best quality responses
- Press
⌘+K(Mac) orCtrl+K(Windows/Linux) - Click on Transformers provider
- Open browser console (F12) to see download progress
- Wait for model download (~350MB, one-time, 3-7 minutes)
- Console will show:
✅ Model initialized successfully - Status will show: "🤖 AI Ready"
Note: Downloads from huggingface.co - check your network if it fails!
- WebSocket streaming for real-time AI responses
- Add more keyboard shortcuts
- Add code execution capability
- Multi-file editor support
- User authentication
- Save/load conversation history
- Model selection UI
- Fine-tuned models for specific languages
This is a Hacktoolkit project. For contributions, please follow our coding standards and submit PRs.
© 2025 Hacktoolkit — Built with Hexa ⟡
Website: hexa.hacktoolkit.com Parent Brand: hacktoolkit.com