GitHunt
VA

Vaporjawn/Klingon-Translator

React web app that translates between English and Klingon with a Star Trek-themed interface. Features text-to-speech, multiple Star Trek themes, and is perfect for fans learning the Klingon language.

๐Ÿ–– Klingon Universal Translator

Screenshot 2025-09-27 at 11 43 01

A fully functional Star Trek-themed Klingon โ‡„ English translator built with modern web technologies. This application provides a Google Translate-inspired interface with authentic Star Trek visual design and comprehensive translation capabilities.

CI/CD Pipeline
License: MIT
Contributions Welcome
PRs Welcome
Open Source Love

Star Trek Theme
TypeScript
React
Vite
Material UI

โญ Star this repository if you find it useful! Help us reach more Star Trek fans and developers.

๐Ÿ“ˆ Project Status

  • โœ… Active Development - Regularly maintained and updated
  • ๐Ÿš€ Production Ready - Stable release with comprehensive testing
  • ๐ŸŽฏ Open Source - MIT License, contributions welcome
  • ๐ŸŒ Live Demo - klingon-translator.pages.dev (Coming Soon)
  • ๐Ÿ“Š GitHub Pages - Automated deployment via GitHub Actions

โœจ Features

๐ŸŒŸ Core Translation Features

  • Bidirectional Translation: English โ‡„ Klingon with intelligent fuzzy matching
  • Real-time Translation: Auto-translate with 500ms delay for smooth UX
  • Phonetic Pronunciations: Authentic Klingon pronunciations for all translations
  • Confidence Scoring: Translation confidence indicators based on similarity algorithms
  • Translation History: Maintains last 20 translations for reference

๐ŸŽจ Star Trek-Themed UI

  • 5 Authentic Star Trek Themes: TOS, TNG, DS9, Voyager, and Discovery color schemes
  • Google Translate-Inspired Layout: Familiar, intuitive interface design
  • Smooth Animations: Framer Motion animations with Star Trek-inspired effects
  • Responsive Design: Works perfectly on desktop, tablet, and mobile devices
  • Gradient Effects: Subtle Star Trek-inspired background gradients and glowing elements

๐Ÿ”Š Audio Features

  • Text-to-Speech: Native browser speech synthesis for both languages
  • Star Trek Sound Effects: Authentic beeps and chimes during translation
  • Voice Customization: Deeper, slower voice settings for Klingon pronunciation
  • Audio Controls: Play, pause, and control audio output

๐ŸŽฏ Technical Excellence

  • Enterprise-Grade Architecture: Modular, maintainable TypeScript codebase
  • Type Safety: 100% TypeScript with strict mode enabled
  • Modern React Patterns: Hooks, custom hooks, and functional components
  • Performance Optimized: Lazy loading, memoization, and efficient re-renders
  • Error Handling: Comprehensive error boundaries and user feedback

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 18+ and npm
  • Modern browser with Speech Synthesis API support

Installation

  1. Clone the repository

    git clone https://github.com/your-username/klingon-translator.git
    cd klingon-translator
  2. Install dependencies

    npm install
  3. Start development server

    npm run dev
  4. Open your browser

    http://localhost:5173
    

Build for Production

npm run build
npm run preview  # Preview production build

๐Ÿ› ๏ธ Technology Stack

Core Technologies

  • โš›๏ธ React 19.1.1 - Modern React with latest features
  • ๐Ÿ“˜ TypeScript - Type-safe development with strict mode
  • โšก Vite 7.1.12 - Lightning-fast build tool with experimental rolldown
  • ๐ŸŽจ Material-UI v6 - Complete Material Design component library
  • ๐ŸŽฌ Framer Motion - Smooth, performant animations

Architecture Highlights

  • ๐Ÿ—๏ธ Enterprise Project Structure - Organized by feature modules
  • ๐ŸŽฏ Custom Hooks - Reusable translation and speech logic
  • ๐ŸŽจ Theme System - 5 Star Trek variant themes with complete customization
  • ๐Ÿ“Š Translation Engine - Advanced fuzzy matching with Levenshtein distance
  • ๐Ÿ”Š Audio Services - Web Speech API integration with Star Trek effects

๐Ÿ“– Usage Guide

Basic Translation

  1. Select Languages: Choose source and target languages from dropdowns
  2. Enter Text: Type or paste text in the input area
  3. Auto-Translate: Translation appears automatically after 500ms
  4. Manual Translate: Use the floating action button for immediate translation

Language Swapping

  • Click the swap icon (๐Ÿ”„) between language selectors
  • Instantly reverses translation direction and swaps text

Audio Features

  • ๐Ÿ”Š Listen: Click volume icons to hear pronunciations
  • ๐ŸŽต Sound Effects: Enjoy Star Trek-inspired translation sounds
  • โธ๏ธ Control: Audio stops automatically or can be manually controlled

Advanced Features

  • ๐Ÿ“ฑ Mobile Responsive: Works seamlessly on all device sizes
  • โŒจ๏ธ Keyboard Shortcuts: Efficient keyboard navigation
  • ๐ŸŽจ Theme Variants: Experience different Star Trek eras (TNG default)
  • ๐Ÿ“ Translation History: Access your recent translations

๐Ÿ“š Klingon Dictionary

Our translator includes 50+ authentic Klingon words and phrases:

Essential Phrases

  • Qapla' - Success! / Goodbye
  • nuqneH - What do you want? (greeting)
  • yIjah - Beam me up
  • Heghlu'meH QaQ jajvam - Today is a good day to die

Common Words

  • jup - friend
  • jagh - enemy
  • nugh - society
  • wo' - empire
  • DIch - true/certain

Battle Terms

  • yoDlu' - battle stations
  • HIv - attack
  • Hub - defend
  • SeHwI' - controller

And many more! The dictionary includes phonetic pronunciations, parts of speech, and example usage for each entry.

๐ŸŽจ Star Trek Theme Variants

๐ŸŒŸ Available Themes

  1. TOS (The Original Series) - Classic 1960s gold and red
  2. TNG (The Next Generation) - Modern blue and gold (default)
  3. DS9 (Deep Space Nine) - Deep space purples and teals
  4. VOY (Voyager) - Exploration blues and silvers
  5. DISCO (Discovery) - Contemporary copper and blue

Theme Features

  • Authentic Color Palettes - Based on actual Star Trek UI designs
  • Component Overrides - Custom Material-UI styling for each theme
  • Gradient Backgrounds - Subtle animated backgrounds
  • Glow Effects - Futuristic lighting effects on interactive elements

๐Ÿ—๏ธ Project Architecture

src/
โ”œโ”€โ”€ components/           # React components
โ”‚   โ””โ”€โ”€ TranslatorInterface.tsx
โ”œโ”€โ”€ hooks/               # Custom React hooks
โ”‚   โ””โ”€โ”€ useTranslation.ts
โ”œโ”€โ”€ services/            # Business logic services
โ”‚   โ”œโ”€โ”€ translationService.ts
โ”‚   โ””โ”€โ”€ speechService.ts
โ”œโ”€โ”€ theme/               # Star Trek theme system
โ”‚   โ””โ”€โ”€ starTrekTheme.ts
โ”œโ”€โ”€ data/                # Static data
โ”‚   โ””โ”€โ”€ klingonDictionary.ts
โ”œโ”€โ”€ types/               # TypeScript definitions
โ”‚   โ””โ”€โ”€ index.ts
โ””โ”€โ”€ utils/               # Utility functions

Key Components

  • TranslatorInterface: Main UI component with Google Translate-like layout
  • useTranslation: Hook managing translation state and logic
  • useSpeech: Hook handling audio synthesis and playback
  • TranslationService: Core translation engine with fuzzy matching
  • SpeechService: Text-to-speech with Star Trek sound effects
  • StarTrekTheme: Complete theme system with 5 variant themes

๐Ÿ”ง Development

Scripts

npm run dev        # Start development server
npm run build      # Build for production
npm run preview    # Preview production build
npm run lint       # Run ESLint
npm run type-check # TypeScript type checking

Code Quality

  • ESLint + Prettier - Consistent code formatting
  • TypeScript Strict Mode - Maximum type safety
  • Performance Monitoring - Bundle size analysis
  • Modern React Patterns - Hooks, functional components

๐Ÿ—บ๏ธ Project Roadmap

๐Ÿš€ Version 1.0 (Current)

  • โœ… Core translation functionality
  • โœ… Star Trek themed UI with 5 theme variants
  • โœ… Text-to-Speech with pronunciation
  • โœ… Google Translate-inspired interface
  • โœ… Responsive design for all devices
  • โœ… Translation confidence scoring
  • โœ… Sound effects and animations

๐ŸŽฏ Version 1.1 (Next Release)

  • ๐Ÿ”„ Enhanced Dictionary - Expand to 100+ Klingon terms
  • ๐Ÿ”„ Grammar Analysis - Basic Klingon grammar checking
  • ๐Ÿ”„ Phrase Builder - Common phrase construction assistant
  • ๐Ÿ”„ Voice Recognition - Speech-to-text for both languages
  • ๐Ÿ”„ Offline Mode - Progressive Web App capabilities
  • ๐Ÿ”„ Keyboard Shortcuts - Advanced accessibility features

๐ŸŒŸ Version 1.2 (Future)

  • ๐Ÿ“‹ Translation History - Persistent storage and export
  • ๐ŸŽจ Custom Themes - User-created theme variants
  • ๐Ÿ“ฑ Mobile App - React Native companion app
  • ๐Ÿค– AI Translation - Machine learning improvements
  • ๐ŸŒ Multi-Language - Support for additional alien languages
  • ๐Ÿ‘ฅ Community Dictionary - User-contributed translations

๐Ÿ”ฎ Long Term Vision

  • ๐ŸŽฎ Language Learning Game - Interactive Klingon lessons
  • ๐Ÿ—ฃ๏ธ Conversation Mode - Real-time voice translation
  • ๐Ÿ“š Cultural Context - Star Trek universe integration
  • ๐ŸŽญ Character Voices - Voice synthesis with Star Trek characters
  • ๐ŸŒ Federation Languages - Vulcan, Romulan, and more

๐Ÿค Contributing

We welcome contributions from Star Trek fans and developers alike! Here's how to get started:

๐Ÿš€ Quick Contribution Guide

  1. โญ Star this repository to show your support
  2. ๐Ÿด Fork the repository
  3. ๐ŸŒฟ Create a feature branch: git checkout -b feature/amazing-feature
  4. ๐Ÿ“ Read our Contributing Guidelines for detailed instructions
  5. โœจ Make your changes following our coding standards
  6. ๐Ÿงช Add tests for new functionality
  7. ๐Ÿ’พ Commit changes: git commit -m 'Add amazing feature'
  8. ๐Ÿ“ค Push to branch: git push origin feature/amazing-feature
  9. ๐Ÿ”ƒ Open a Pull Request using our PR template

๐ŸŽฏ What We're Looking For

  • ๐ŸŒŸ Dictionary Contributions - Add new Klingon words and phrases
  • ๐ŸŽจ UI/UX Improvements - Enhance the Star Trek experience
  • ๐Ÿ”Š Audio Enhancements - Better pronunciation and sound effects
  • ๐Ÿ“ฑ Accessibility Features - Make it work for everyone
  • ๐Ÿงช Testing - Unit tests, integration tests, E2E tests
  • ๐Ÿ“– Documentation - Code comments, README improvements
  • ๐Ÿ› Bug Fixes - Help us maintain quality
  • ๐Ÿ”ง Performance Optimizations - Keep it fast and smooth

๐Ÿ‘ฅ Recognition

All contributors are recognized in our Contributors Hall of Fame and in release notes!

๐Ÿ›ก๏ธ Code of Conduct

By participating, you agree to abide by our Code of Conduct. We're committed to making this a welcoming space for all Star Trek fans and developers.

๐Ÿ“‹ Contribution Guidelines

  • ๐Ÿ“˜ TypeScript Required - Follow strict mode requirements
  • ๐ŸŽจ Code Style - Maintain existing patterns and use Prettier
  • ๐Ÿงช Testing - Add appropriate tests for new features
  • ๐Ÿ“ Documentation - Update docs for significant changes
  • โœ… Quality Gates - Ensure all builds pass before submitting
  • ๐Ÿ” Security - Follow our security policy for vulnerabilities

๐Ÿ“ License

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

๏ฟฝโ€๐Ÿ’ป Author

Created by vaporjawn

This project was built with passion for Star Trek and modern web development technologies. Feel free to reach out for questions, suggestions, or collaboration opportunities!

๏ฟฝ๐Ÿ–– Acknowledgments

  • Star Trek Universe - For inspiring this project and the Klingon language
  • Klingon Language Institute - For maintaining authentic Klingon linguistics
  • Material-UI Team - For the excellent component library
  • React Community - For the amazing ecosystem and tools
  • Vite Team - For the incredibly fast development experience

Live Long and Prosper ๐Ÿ––

May this translator serve you well on your journey through the final frontier.

Copyright ยฉ 2025 vaporjawn. All rights reserved.