{"id":32529831,"url":"https://github.com/rajtilak-2020/vox","last_synced_at":"2025-10-28T11:52:35.631Z","repository":{"id":319028870,"uuid":"1077083001","full_name":"rajtilak-2020/Vox","owner":"rajtilak-2020","description":"A web app that converts text to International Standard Morse Code with authentic audio playback and WAV export. Built with React, TypeScript, and Web Audio API.","archived":false,"fork":false,"pushed_at":"2025-10-16T05:18:30.000Z","size":1098,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-17T07:24:46.307Z","etag":null,"topics":["cybersecurity","morsecode","morsecode-encoder","project","webdevelopment"],"latest_commit_sha":null,"homepage":"https://voxsos.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rajtilak-2020.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-15T18:48:00.000Z","updated_at":"2025-10-16T05:31:20.000Z","dependencies_parsed_at":"2025-10-17T20:42:41.512Z","dependency_job_id":null,"html_url":"https://github.com/rajtilak-2020/Vox","commit_stats":null,"previous_names":["rajtilak-2020/vox"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/rajtilak-2020/Vox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajtilak-2020%2FVox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajtilak-2020%2FVox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajtilak-2020%2FVox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajtilak-2020%2FVox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rajtilak-2020","download_url":"https://codeload.github.com/rajtilak-2020/Vox/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajtilak-2020%2FVox/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281433291,"owners_count":26500408,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-28T02:00:06.022Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cybersecurity","morsecode","morsecode-encoder","project","webdevelopment"],"created_at":"2025-10-28T11:52:34.747Z","updated_at":"2025-10-28T11:52:35.624Z","avatar_url":"https://github.com/rajtilak-2020.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \n# Vox - Your Encrypted Thought.\n\n**A web application that converts text to Morse code and generates authentic audio playback**\n\n[![React](https://img.shields.io/badge/React-18.3.1-61DAFB?style=for-the-badge\u0026logo=react\u0026logoColor=white)](https://reactjs.org/)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.5.3-3178C6?style=for-the-badge\u0026logo=typescript\u0026logoColor=white)](https://www.typescriptlang.org/)\n[![Vite](https://img.shields.io/badge/Vite-5.4.2-646CFF?style=for-the-badge\u0026logo=vite\u0026logoColor=white)](https://vitejs.dev/)\n[![License](https://img.shields.io/badge/License-MIT-green?style=for-the-badge)](LICENSE)\n\u003c/div\u003e\n\n---\n\n## 🎯 About The Project\n\n**Vox** is a sophisticated web application that bridges modern communication with classical telegraphy. It converts alphanumeric text (A-Z, 0-9) into International Morse Code and generates high-quality audio representations using the Web Audio API. Built with React and TypeScript, Vox features a premium glassy UI with a black and green color scheme, delivering both aesthetic appeal and functional excellence.\n\n### Why Vox?\n\n- **Educational Tool**: Perfect for learning Morse code\n- **Accessibility**: Convert text to audio for various use cases\n- **Historical Preservation**: Keep the art of Morse code alive\n- **Modern Implementation**: Leverages cutting-edge web technologies\n\n---\n\n## ✨ Features\n\n### Core Functionality\n\n- 🔤 **Real-time Text Conversion** - Instant Morse code translation as you type\n- 🔊 **Authentic Audio Generation** - Web Audio API creates genuine dot and dash tones\n- 💾 **Audio Download** - Export Morse code as WAV files\n- 📋 **One-click Copy** - Copy Morse code to clipboard\n- ✅ **Input Validation** - Smart filtering of valid characters (A-Z, 0-9, spaces)\n- 📚 **Reference Chart** - Interactive Morse code lookup table\n\n### User Experience\n\n- 🎨 **Premium Glassy UI** - Black background with vibrant green accents\n- 💨 **Smooth Animations** - Professional, minimal transitions\n- 📱 **Fully Responsive** - Seamless experience across all devices\n- ♿ **Accessible Design** - WCAG compliant color contrasts\n- ⚡ **Lightning Fast** - Powered by Vite for optimal performance\n\n---\n\n## 🛠 Tech Stack\n\n### Frontend\n\n- **React 18.3.1** - Modern UI library with hooks\n- **TypeScript 5.5.3** - Type-safe JavaScript\n- **Vite 5.4.2** - Next-generation build tool\n- **Tailwind CSS 3.4.1** - Utility-first CSS framework\n- **Lucide React** - Beautiful icon library\n\n### Audio Processing\n\n- **Web Audio API** - Native browser audio generation\n- **Custom WAV Encoder** - PCM audio encoding to WAV format\n\n### Development Tools\n\n- **ESLint** - Code linting and quality\n- **PostCSS** - CSS processing\n- **Autoprefixer** - CSS vendor prefixing\n\n---\n\n## 🏗 Architecture\n\n### System Architecture\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                         Vox Application                      │\n├─────────────────────────────────────────────────────────────┤\n│                                                               │\n│  ┌──────────────┐         ┌──────────────┐                  │\n│  │              │         │              │                   │\n│  │  User Input  │────────▶│  Validation  │                  │\n│  │   (Text)     │         │   (A-Z,0-9)  │                  │\n│  │              │         │              │                   │\n│  └──────────────┘         └───────┬──────┘                  │\n│                                   │                          │\n│                                   ▼                          │\n│                          ┌─────────────────┐                │\n│                          │                 │                │\n│                          │  Morse Encoder  │                │\n│                          │   (Converter)   │                │\n│                          │                 │                │\n│                          └────────┬────────┘                │\n│                                   │                          │\n│                    ┌──────────────┴──────────────┐          │\n│                    ▼                              ▼          │\n│          ┌──────────────────┐          ┌──────────────────┐ │\n│          │                  │          │                  │ │\n│          │  Display Output  │          │  Audio Service   │ │\n│          │  (Morse Code)    │          │  (Web Audio API) │ │\n│          │                  │          │                  │ │\n│          └──────────────────┘          └────────┬─────────┘ │\n│                                                  │           │\n│                                   ┌──────────────┴──────┐   │\n│                                   ▼                     ▼   │\n│                          ┌──────────────┐    ┌──────────────┐\n│                          │              │    │              │\n│                          │  Play Audio  │    │   Download   │\n│                          │   (Browser)  │    │  (WAV File)  │\n│                          │              │    │              │\n│                          └──────────────┘    └──────────────┘\n│                                                               │\n└─────────────────────────────────────────────────────────────┘\n```\n\n### Data Flow Diagram\n\n```\n┌──────────┐\n│  Start   │\n└────┬─────┘\n     │\n     ▼\n┌──────────────────┐\n│ User Types Text  │\n└────┬─────────────┘\n     │\n     ▼\n┌──────────────────┐      ┌─────────────┐\n│ Validate Input   │─────▶│ Show Error  │\n│ (A-Z, 0-9 only)  │  ✗   └─────────────┘\n└────┬─────────────┘\n     │ ✓\n     ▼\n┌──────────────────┐\n│ Convert to Morse │\n│ (Real-time)      │\n└────┬─────────────┘\n     │\n     ▼\n┌──────────────────┐\n│ Display Morse    │\n│ Code Output      │\n└────┬─────────────┘\n     │\n     ├─────────────┐\n     │             │\n     ▼             ▼\n┌──────────┐  ┌──────────┐\n│  Copy to │  │ Generate │\n│ Clipboard│  │  Audio   │\n└──────────┘  └────┬─────┘\n                   │\n           ┌───────┴───────┐\n           │               │\n           ▼               ▼\n     ┌──────────┐    ┌──────────┐\n     │   Play   │    │ Download │\n     │  Audio   │    │   WAV    │\n     └──────────┘    └──────────┘\n```\n\n### Audio Generation Workflow\n\n```\n┌──────────────────┐\n│  Morse String    │\n│  \"... --- ...\"   │\n└────────┬─────────┘\n         │\n         ▼\n┌──────────────────┐\n│  Parse Symbols   │\n│  . = 80ms        │\n│  - = 240ms       │\n│  space = gap     │\n└────────┬─────────┘\n         │\n         ▼\n┌──────────────────────────┐\n│  Web Audio API           │\n│  ┌────────────────────┐  │\n│  │ Create AudioContext│  │\n│  └─────────┬──────────┘  │\n│            ▼              │\n│  ┌────────────────────┐  │\n│  │ Generate Sine Wave │  │\n│  │ Frequency: 600Hz   │  │\n│  └─────────┬──────────┘  │\n│            ▼              │\n│  ┌────────────────────┐  │\n│  │ Apply Envelope     │  │\n│  │ (Attack/Release)   │  │\n│  └─────────┬──────────┘  │\n│            ▼              │\n│  ┌────────────────────┐  │\n│  │ Create AudioBuffer │  │\n│  └─────────┬──────────┘  │\n└────────────┼─────────────┘\n             │\n     ┌───────┴────────┐\n     │                │\n     ▼                ▼\n┌──────────┐    ┌──────────┐\n│   Play   │    │  Encode  │\n│  Buffer  │    │  to WAV  │\n└──────────┘    └────┬─────┘\n                     │\n                     ▼\n                ┌──────────┐\n                │ Download │\n                │   File   │\n                └──────────┘\n```\n\n### Component Architecture\n\n```\nApp.tsx (Root Component)\n│\n├─── State Management\n│    ├─── inputText (string)\n│    ├─── morseCode (string)\n│    ├─── isPlaying (boolean)\n│    ├─── isGenerating (boolean)\n│    ├─── copied (boolean)\n│    └─── error (string)\n│\n├─── Effects\n│    └─── useEffect (Real-time conversion)\n│\n├─── Event Handlers\n│    ├─── handleConvert()\n│    ├─── handlePlay()\n│    ├─── handleDownload()\n│    └─── handleCopy()\n│\n└─── UI Components\n     ├─── Header (Title \u0026 Description)\n     ├─── Input Panel\n     │    ├─── Textarea (User Input)\n     │    └─── Validation Error\n     ├─── Output Panel\n     │    ├─── Morse Display\n     │    └─── Copy Button\n     ├─── Action Buttons\n     │    ├─── Convert Button\n     │    ├─── Play Button\n     │    └─── Download Button\n     ├─── MorseReference.tsx (Reference Chart)\n     └─── Footer (Copyright \u0026 Links)\n```\n\n---\n\n## 🚀 Getting Started\n\n### Prerequisites\n\n- **Node.js** (v18 or higher)\n- **npm** (v9 or higher)\n\n### Installation\n\n1. **Clone the repository**\n\n```bash\ngit clone https://github.com/rajtilak-2020/vox.git\ncd vox\n```\n\n2. **Install dependencies**\n\n```bash\nnpm install\n```\n\n3. **Start development server**\n\n```bash\nnpm run dev\n```\n\n4. **Open your browser**\n\nNavigate to `http://localhost:5173`\n\n### Build for Production\n\n```bash\nnpm run build\n```\n\nThe optimized production build will be in the `dist/` directory.\n\n### Preview Production Build\n\n```bash\nnpm run preview\n```\n\n---\n\n## 💡 Usage\n\n### Basic Conversion\n\n1. Type your message in the input field (A-Z, 0-9, and spaces only)\n2. The Morse code appears automatically in real-time\n3. Click **Convert** to generate audio\n4. Click **Play** to hear your message\n5. Click **Download** to save the audio file\n\n### Advanced Features\n\n#### Copy to Clipboard\n\nClick the **Copy** button next to the output to copy the Morse code to your clipboard.\n\n#### Reference Chart\n\nScroll down to view the complete Morse code reference chart showing all letter and number mappings.\n\n### Example Conversions\n\n| Input Text | Morse Code Output |\n|-----------|-------------------|\n| HELLO | `.... . .-.. .-.. ---` |\n| SOS | `... --- ...` |\n| 123 | `.---- ..--- ...--` |\n| HELLO WORLD | `.... . .-.. .-.. --- / .-- --- .-. .-.. -..` |\n\n---\n\n## 🔍 How It Works\n\n### Morse Code Conversion\n\nThe application uses a mapping table that follows the International Morse Code standard:\n\n```typescript\nconst MORSE_CODE_MAP: Record\u003cstring, string\u003e = {\n  'A': '.-',    'B': '-...',  'C': '-.-.',\n  'D': '-..',   'E': '.',     'F': '..-.',\n  // ... etc\n};\n```\n\n**Conversion Process:**\n\n1. Convert input to uppercase\n2. Split into individual characters\n3. Map each character to Morse code\n4. Join with spaces between letters\n5. Use '/' for word breaks\n\n### Audio Generation\n\n**Timing Standards:**\n\n- **Dot duration**: 80ms\n- **Dash duration**: 240ms (3× dot)\n- **Symbol gap**: 80ms (between dots/dashes)\n- **Letter gap**: 240ms (between letters)\n- **Word gap**: 560ms (between words)\n\n**Audio Parameters:**\n\n- **Frequency**: 600Hz (standard Morse tone)\n- **Sample Rate**: 44.1kHz (CD quality)\n- **Wave Type**: Sine wave\n- **Amplitude**: 0.3 (30% to prevent clipping)\n- **Envelope**: 5ms attack/release for smooth tones\n\n### WAV Encoding\n\nThe application encodes audio to WAV format using:\n\n- **Format**: PCM (Pulse Code Modulation)\n- **Bit Depth**: 16-bit\n- **Channels**: Mono (1 channel)\n- **Sample Rate**: 44,100 Hz\n\n---\n\n## 📁 Project Structure\n\n```\nvox/\n├── public/\n│   └── vite.svg\n├── src/\n│   ├── components/\n│   │   └── MorseReference.tsx      # Morse code reference chart\n│   ├── services/\n│   │   └── audioService.ts         # Web Audio API \u0026 WAV encoding\n│   ├── utils/\n│   │   └── morseCode.ts            # Morse conversion logic\n│   ├── App.tsx                     # Main application component\n│   ├── main.tsx                    # Application entry point\n│   ├── index.css                   # Global styles\n│   └── vite-env.d.ts              # TypeScript definitions\n├── .env                            # Environment variables\n├── .gitignore                      # Git ignore rules\n├── eslint.config.js               # ESLint configuration\n├── index.html                      # HTML entry point\n├── package.json                    # Dependencies \u0026 scripts\n├── postcss.config.js              # PostCSS configuration\n├── tailwind.config.js             # Tailwind CSS configuration\n├── tsconfig.json                   # TypeScript configuration\n├── vite.config.ts                 # Vite configuration\n└── README.md                       # This file\n```\n\n---\n\n## 📚 API Reference\n\n### Morse Code Utilities\n\n#### `textToMorse(text: string): string`\n\nConverts text to Morse code.\n\n**Parameters:**\n- `text` - Input string (A-Z, 0-9, spaces)\n\n**Returns:**\n- Morse code string with spaces between letters and `/` for word breaks\n\n**Example:**\n```typescript\ntextToMorse(\"HELLO\") // Returns: \".... . .-.. .-.. ---\"\n```\n\n#### `validateInput(text: string): boolean`\n\nValidates if input contains only allowed characters.\n\n**Parameters:**\n- `text` - Input string to validate\n\n**Returns:**\n- `true` if valid, `false` otherwise\n\n### Audio Service\n\n#### `generateMorseAudio(morseCode: string): Promise\u003cMorseAudioData\u003e`\n\nGenerates audio buffer from Morse code string.\n\n**Parameters:**\n- `morseCode` - Morse code string (dots, dashes, spaces)\n\n**Returns:**\n- Promise resolving to `{ audioBuffer, audioContext }`\n\n#### `playMorseAudio(audioBuffer: AudioBuffer, audioContext: AudioContext): AudioBufferSourceNode`\n\nPlays the generated Morse code audio.\n\n**Parameters:**\n- `audioBuffer` - Audio buffer to play\n- `audioContext` - Web Audio context\n\n**Returns:**\n- Audio source node for playback control\n\n#### `downloadMorseAudio(audioBuffer: AudioBuffer, filename?: string): void`\n\nDownloads audio as WAV file.\n\n**Parameters:**\n- `audioBuffer` - Audio buffer to encode\n- `filename` - Optional filename (default: \"morse-code.wav\")\n\n---\n\n## 🤝 Contributing\n\nContributions are what make the open-source community amazing! Any contributions you make are **greatly appreciated**.\n\n### How to Contribute\n\n1. **Fork the Project**\n2. **Create your Feature Branch**\n   ```bash\n   git checkout -b feature/AmazingFeature\n   ```\n3. **Commit your Changes**\n   ```bash\n   git commit -m 'Add some AmazingFeature'\n   ```\n4. **Push to the Branch**\n   ```bash\n   git push origin feature/AmazingFeature\n   ```\n5. **Open a Pull Request**\n\n### Development Guidelines\n\n- Follow the existing code style\n- Write meaningful commit messages\n- Add tests for new features\n- Update documentation as needed\n- Keep PRs focused and atomic\n\n---\n\n## 📄 License\n\nDistributed under the MIT License. See `LICENSE` for more information.\n\n---\n\n## 👤 Contact\n\n**K Rajtilak**\n\n- GitHub: [@rajtilak-2020](https://github.com/rajtilak-2020)\n- Project Link: [https://github.com/rajtilak-2020/vox](https://github.com/rajtilak-2020/vox)\n\n---\n\n## 🙏 Acknowledgments\n\n- [React Documentation](https://react.dev/)\n- [Web Audio API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API)\n- [International Morse Code Standard](https://en.wikipedia.org/wiki/Morse_code)\n- [Tailwind CSS](https://tailwindcss.com/)\n- [Lucide Icons](https://lucide.dev/)\n- [Vite](https://vitejs.dev/)\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**Made with ❤️ by [rajtilak-2020](https://github.com/rajtilak-2020)**\n\n⭐ Star this repository if you found it helpful!\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frajtilak-2020%2Fvox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frajtilak-2020%2Fvox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frajtilak-2020%2Fvox/lists"}