OnyxMunk/text-transformer
T3XT TR4N5F0RM3R ๐ฎ
<div align="center">
Your one-stop tool for text conversions โก
Demo โข Features โข Installation โข Documentation โข Contributing
</div>
๐ Overview
Text Transformer is a modern, cyberpunk-themed web application for converting text into various formats. Built with React and featuring a sleek, animated interface, it supports multiple conversion types with bidirectional transformation capabilities.
โจ Features
๐ Converters
- Morse Code - Convert text to/from Morse code with proper spacing
- Leet Speak - Transform text to/from 1337 5P34K
- Binary - Encode/decode text to binary representation
- Base64 - Standard Base64 encoding/decoding with Unicode support
- Hexadecimal - Convert text to/from hexadecimal notation
- Emoji - Text to emoji conversion (experimental)
- TinyLlama - AI-powered text generation using TinyLlama model
- MusicGen - AI music generation from text prompts and audio uploads
๐ฏ Core Features
- โ Bidirectional Conversion - Swap between input/output formats instantly
- โ Compounded Messages - Chain multiple conversions together
- โ Error Handling - Graceful error messages for invalid inputs
- โ Copy to Clipboard - One-click copying of results
- โ Responsive Design - Works on desktop, tablet, and mobile
- โ Accessibility - ARIA labels and keyboard navigation
- โ Cyberpunk UI - Animated, modern interface with neon aesthetics
๐ Installation
Prerequisites
- Node.js 16+
- npm or yarn
Quick Start
# Clone the repository
git clone https://github.com/kwizzlesurp10-ctrl/converter.git
cd converter
# Install dependencies
npm install
# Start development server
npm run dev
# Open http://localhost:5173 in your browserBuild for Production
# Build the project
npm run build
# Preview production build
npm run previewRun with Docker (HF Space image)
Run the pre-built image from Hugging Face (TinyLlama/HF Inference needs a token):
docker run -it -p 7860:7860 --platform=linux/amd64 \
-e VITE_HF_TOKEN="YOUR_VALUE_HERE" \
registry.hf.space/onyxmunk-text-transformer:latestReplace YOUR_VALUE_HERE with a Hugging Face token (or use --env-file .env if you have VITE_HF_TOKEN in .env). Then open http://localhost:7860.
On Windows you can run .\run-docker.ps1; it will use VITE_HF_TOKEN from your environment or from a .env file in the project root.
Deploy to Firebase
# Install Firebase CLI
npm install -g firebase-tools
# Login to Firebase
firebase login
# Deploy
firebase deploy๐ธ Demo
Main Interface
Compounded Message Feature
Error Handling
MusicGen Audio Generator
๐จ Tech Stack
- Frontend Framework: React 18.3.1
- Build Tool: Vite 7.2.4
- Styling: Tailwind CSS 3.4.18
- Testing: Vitest + Playwright
- Hosting: Firebase Hosting
- Icons/Emojis: OpenMoji 16.0.0
๐งช Testing
# Run unit tests
npm run test
# Run tests in watch mode
npm run test:watch
# Build and verify
npm run build๐ต MusicGen Setup (Optional)
The MusicGen converter requires a separate backend service to generate music. To use this feature:
Backend Requirements
- A MusicGen API service running on
http://localhost:8000 - The service should expose a
/api/musicgen/generateendpoint
Expected API Format
POST /api/musicgen/generate
{
"prompt": "upbeat electronic dance music",
"duration": 8,
"melody": "data:audio/wav;base64,..." // optional
}
Response:
{
"audio": "data:audio/wav;base64,...",
"description": "Generated music description"
}Setup Options
- Use Meta's MusicGen: Follow the official MusicGen repository to set up the model
- Use Replicate API: Integrate with Replicate's hosted MusicGen model
- Use Hugging Face: Deploy using Hugging Face Inference API
Without the backend service, the MusicGen tab will display connection errors, but all other converters will work normally.
๐ Project Structure
converter/
โโโ src/
โ โโโ components/ # Converter components
โ โ โโโ MorseCodeConverter.jsx
โ โ โโโ BinaryConverter.jsx
โ โ โโโ LeetConverter.jsx
โ โ โโโ Base64Converter.jsx
โ โ โโโ HexConverter.jsx
โ โ โโโ EmojiConverter.jsx
โ โ โโโ TinyLlamaConverter.jsx
โ โ โโโ MusicGenConverter.jsx
โ โโโ hooks/ # Custom React hooks
โ โ โโโ useConverter.js # Shared converter logic
โ โโโ App.jsx # Main application component
โ โโโ main.jsx # Entry point
โ โโโ index.css # Global styles and animations
โโโ docs/ # Comprehensive documentation
โโโ public/ # Static assets
โโโ firebase.json # Firebase configuration
โโโ vite.config.js # Vite configuration
โโโ tailwind.config.js # Tailwind configuration๐ Documentation
Comprehensive documentation is available in the docs/ directory:
- [Architecture Overview](docs/architecture-enhancement-proposal.md) - System design and enhancement roadmap
- [Quick Start Guide](docs/quick-start-guide.md) - Developer onboarding
- [Role-Based Summary](docs/role-based-enhancement-summary.md) - Team structure and responsibilities
- [Contributing Guide](CONTRIBUTING.md) - How to contribute
๐ค Contributing
We welcome contributions! Please see our Contributing Guide for details.
Quick Contribution Steps
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests if applicable
- Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
๐บ๏ธ Roadmap
See our complete roadmap for planned features.
Phase 1 (In Progress)
- [x] Core converters (Morse, Leet, Binary, Base64, Hex)
- [x] Compounded message feature
- [x] Error handling
- [x] Accessibility improvements
- [ ] Additional converters (Upside Down, Zalgo, Markdown)
Phase 2 (Planned)
- [ ] User authentication
- [ ] Shareable links
- [ ] Conversion history
- [ ] Undo/redo functionality
Phase 3 (Future)
- [ ] Text-to-Speech
- [ ] Gamification features
- [ ] Custom character mappings
- [ ] Dark/Light theme toggle
๐ Known Issues
- Browser view tab is experimental
- Emoji converter has limited character support
๐ License
This project is open source and available under the MIT License.
๐จโ๐ป Author
kwizzlesurp10-ctrl
- GitHub: @kwizzlesurp10-ctrl
๐ Acknowledgments
- React team for the amazing framework
- Tailwind CSS for the utility-first CSS framework
- OpenMoji for emoji support
- All contributors and users
๐ Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
<div align="center">
Made with โค๏ธ and โก by the Text Transformer team
If you find this project useful, please consider giving it a โญ on GitHub!
</div>
