talk2me/README_TYPESCRIPT.md
Adolfo Delorenzo 05ad940079 Major improvements: TypeScript, animations, notifications, compression, GPU optimization
- Added TypeScript support with type definitions and build process
- Implemented loading animations and visual feedback
- Added push notifications with user preferences
- Implemented audio compression (50-70% bandwidth reduction)
- Added GPU optimization for Whisper (2-3x faster transcription)
- Support for NVIDIA, AMD (ROCm), and Apple Silicon GPUs
- Removed duplicate JavaScript code (15KB reduction)
- Enhanced .gitignore for Node.js and VAPID keys
- Created documentation for TypeScript and GPU support

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-02 21:18:16 -06:00

1.3 KiB

TypeScript Setup for Talk2Me

This project now includes TypeScript support for better type safety and developer experience.

Installation

  1. Install Node.js dependencies:
npm install
  1. Build TypeScript files:
npm run build

Development

For development with automatic recompilation:

npm run watch
# or
npm run dev

Project Structure

  • /static/js/src/ - TypeScript source files
    • app.ts - Main application logic
    • types.ts - Type definitions
  • /static/js/dist/ - Compiled JavaScript files (git-ignored)
  • tsconfig.json - TypeScript configuration
  • package.json - Node.js dependencies and scripts

Available Scripts

  • npm run build - Compile TypeScript to JavaScript
  • npm run watch - Watch for changes and recompile
  • npm run dev - Same as watch
  • npm run clean - Remove compiled files
  • npm run type-check - Type-check without compiling

Type Safety Benefits

The TypeScript implementation provides:

  • Compile-time type checking
  • Better IDE support with autocomplete
  • Explicit interface definitions for API responses
  • Safer refactoring
  • Self-documenting code

Next Steps

After building, the compiled JavaScript will be in /static/js/dist/app.js and will be automatically loaded by the HTML template.