Skip to content

gamidirohan/Jiminy---The-Second-Conscience

Β 
Β 

Repository files navigation

πŸ€– Jiminy – The Second Conscience

Electron React TypeScript Tailwind

A powerful desktop application designed to assist developers with technical coding interviews and problem-solving. Features screenshot-based problem analysis, AI-powered solution generation, and real-time speech-to-text capabilities.


✨ Features

πŸ–ΌοΈ Screenshot-Based Problem Analysis

  • Smart Screenshot Capture: Instantly capture coding problems with global hotkeys
  • Multi-Language Support: Support for Python, JavaScript, Java, Go, C++, Swift, Kotlin, Ruby, SQL, and R
  • Problem Extraction: AI-powered extraction of problem statements, constraints, and requirements from screenshots

🧠 AI-Powered Solution Generation

  • Intelligent Code Generation: Generate optimized solutions based on problem analysis
  • Time & Space Complexity Analysis: Detailed algorithmic complexity breakdowns
  • Multiple Solution Approaches: Explore different algorithmic strategies
  • Step-by-Step Explanations: Clear reasoning for each solution approach

🎀 Real-Time Speech-to-Text (STT)

  • Live Transcription: Real-time speech recognition for hands-free interaction
  • Voice Activity Detection: Smart detection of speech vs. silence
  • WebSocket Integration: Low-latency audio streaming and processing
  • Session Management: Persistent transcription sessions with unique identifiers

🎯 Developer Experience

  • Floating Window: Unobtrusive overlay that stays accessible while coding
  • Click-Through Transparency: Interact with applications behind the window
  • Global Keyboard Shortcuts: Quick access without context switching
  • Auto-Updates: Seamless application updates with user notifications

πŸ”„ Workflow Integration

  • Queue Management: Organize and process multiple screenshots
  • Debug Mode: Advanced analysis and debugging assistance
  • Solution History: Track and review previous solutions
  • Export Capabilities: Copy code and explanations to clipboard

πŸš€ Quick Start

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn
  • Git

Installation

  1. Clone the repository

    git clone https://github.com/gamidirohan/Code-Assist-Electron-Frontend.git
    cd Code-Assist-Electron-Frontend
  2. Install dependencies

    npm install
    # or
    yarn install
  3. Start development server

    npm run dev
    # or
    yarn dev
  4. Build for production

    npm run build
    # or
    yarn build

⌨️ Keyboard Shortcuts

Shortcut Action Description
Ctrl/Cmd + B Toggle Window Show/hide the application window
Ctrl/Cmd + H Take Screenshot Capture a screenshot of the current problem
Ctrl/Cmd + Enter Process/Solve Generate solution from captured screenshots
Ctrl/Cmd + Q Quit Application Close the application
Arrow Keys + Ctrl/Cmd Move Window Reposition the application window

πŸ—οΈ Architecture

Tech Stack

  • Frontend: React 18, TypeScript, Tailwind CSS
  • Desktop Shell: Electron with Node.js backend
  • State Management: TanStack Query (React Query)
  • UI Components: Radix UI primitives
  • Audio Processing: Web Audio API with WebSocket streaming
  • Build Tools: Vite, electron-builder

Project Structure

β”œβ”€β”€ electron/                 # Electron main process
β”‚   β”œβ”€β”€ main.ts              # Application entry point
β”‚   β”œβ”€β”€ preload.ts           # Preload scripts
β”‚   β”œβ”€β”€ ProcessingHelper.ts  # Screenshot processing logic
β”‚   └── autoUpdater.ts       # Auto-update functionality
β”œβ”€β”€ src/                     # React application
β”‚   β”œβ”€β”€ components/          # Reusable UI components
β”‚   β”œβ”€β”€ pages/               # Application pages/views
β”‚   β”œβ”€β”€ hooks/               # Custom React hooks
β”‚   β”œβ”€β”€ types/               # TypeScript type definitions
β”‚   └── utils/               # Utility functions
└── dist-electron/           # Compiled Electron files

πŸ”§ Configuration

Environment Setup

The application includes sensible defaults and doesn't require extensive configuration for basic usage.

API Integration

Note: This version includes mock API endpoints. For full functionality, you'll need to implement your own backend service or integrate with existing AI services.

Real-Time Speech-to-Text Setup

The STT feature connects to a WebSocket server at ws://localhost:3000/ws/jiminy/. To enable this feature:

  1. Set up a compatible WebSocket server
  2. Ensure proper audio permissions in your browser/system
  3. Configure the WebSocket URL in src/hooks/useRealtimeSTT.ts

🎯 Usage Guide

Taking Screenshots

  1. Position your coding problem on screen
  2. Press Ctrl/Cmd + H to capture
  3. The screenshot will appear in the queue

Generating Solutions

  1. Ensure you have at least one screenshot captured
  2. Select your preferred programming language
  3. Press Ctrl/Cmd + Enter to process
  4. View the generated solution with complexity analysis

Using Speech-to-Text

  1. Click the microphone icon (when available)
  2. Start speaking your query or problem description
  3. The application will transcribe in real-time
  4. Use voice commands for hands-free operation

Debug Mode

Access advanced debugging and analysis features:

  • Multiple solution approaches
  • Detailed step-by-step breakdowns
  • Error analysis and suggestions
  • Performance optimization tips

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Development Workflow

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Code Style

  • Use TypeScript for all new code
  • Follow the existing code formatting
  • Add tests for new features
  • Update documentation as needed

πŸ“‹ Features Roadmap

Current Features βœ…

  • Screenshot capture and processing
  • Multi-language code generation
  • Real-time speech-to-text
  • Floating window interface
  • Auto-updates

Planned Features 🚧

  • IDE integration plugins
  • Team collaboration features
  • Custom AI model integration
  • Advanced debugging tools
  • Mobile companion app

πŸ› Troubleshooting

Common Issues

Application won't start

  • Ensure Node.js v16+ is installed
  • Clear node_modules and reinstall dependencies
  • Check for port conflicts (default: 3000)

Screenshots not working

  • Verify screen capture permissions
  • Check if other screenshot tools are interfering
  • Restart the application

Speech-to-text not responding

  • Ensure microphone permissions are granted
  • Check WebSocket server connection
  • Verify audio input device is working

Getting Help

  • πŸ“– Check the Wiki for detailed guides
  • πŸ› Report bugs in Issues
  • πŸ’¬ Join our Discussions for questions

πŸ“„ License

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


πŸ™ Acknowledgments


πŸ“Š Project Stats

GitHub stars GitHub forks GitHub issues GitHub pull requests

Made with ❀️ for developers, by developers

Star ⭐ this repository if you find it helpful!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 98.0%
  • Other 2.0%