Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
2ea2bac
Fixing Solutions.tsx frontend for solution view
gamidirohan Mar 13, 2025
98f2e5d
Fixed partial Solutions.tsx, Code, Time Complexity, and Space Complec…
gamidirohan Mar 13, 2025
b3444ef
Fixed Solutions.tsx, Explanation, Code, Time Complexity, and Space Co…
gamidirohan Mar 13, 2025
03422fd
Update README.md
gamidirohan Mar 13, 2025
2585f11
Updated LanguageSelector.tsx
gamidirohan Mar 13, 2025
ec57522
Idk what but I made some minor changes
gamidirohan Mar 19, 2025
4e1f977
Merge branch 'master' of https://github.com/gamidirohan/Code-Assist-E…
gamidirohan Mar 19, 2025
98a2e77
Updated Language Selector
gamidirohan Mar 20, 2025
b45c921
Added additional features to zoom in and out, increase and decrease t…
gamidirohan Mar 25, 2025
ba3f224
minimal changes
gamidirohan Mar 25, 2025
b992682
Need to update the Debug.tsx file's lines 112-118 to actually return …
gamidirohan Mar 25, 2025
0bec79d
Now displays Complexity Explanations
gamidirohan Mar 29, 2025
5732252
Changes is Debug.tsx
gamidirohan Mar 29, 2025
3aa2bd3
Add scrolling without visible scrollbars for better UI experience
gamidirohan May 3, 2025
7aa68c0
Enable click-through for transparent areas of the window
gamidirohan May 3, 2025
e4c387f
Update README with improvements and additional features
gamidirohan May 3, 2025
3afb713
Fix UI interaction issues by removing click-through for better usability
gamidirohan May 3, 2025
d94da8b
Implement dynamic click-through for transparent areas while keeping U…
gamidirohan May 3, 2025
552ea1e
Fix window interaction by making window size match content exactly
gamidirohan May 3, 2025
56e3704
Add copy button to code sections for easy code copying
gamidirohan May 3, 2025
86e7a2e
Add copy button to code sections for better user experience
gamidirohan May 3, 2025
3e3cf34
Merge branch 'master' of https://github.com/gamidirohan/Code-Assist-E…
gamidirohan May 3, 2025
c50d7e3
Fix window resizing issues by improving dimension handling
gamidirohan May 3, 2025
af0b5b1
All working, only issue is language dropdown doesn't work when code r…
gamidirohan Jun 17, 2025
51ed3b9
feat: Transform app into floating conversational co-pilot window
gamidirohan Jun 17, 2025
07fcd89
fix: Resolve window scaling and movement issues
gamidirohan Jun 18, 2025
7ce56f5
fix: Optimize ResizeObserver to prevent infinite resize loops
gamidirohan Jun 18, 2025
9aa65b4
Added Screenshot preview but Ctrl Enter isn't working tho
gamidirohan Jun 18, 2025
0ffa1be
Refactor code mode UI: merge into App.tsx, fix scrollbars, add conver…
gamidirohan Jun 18, 2025
092cea5
Completed: Code extraction from old to new implementation; modificati…
gamidirohan Jun 19, 2025
48253bb
Fix window transparency and enhance CodePage display
gamidirohan Jun 19, 2025
58c8911
feat: implement real-time speech-to-text with VAD
gamidirohan Jun 22, 2025
9699c10
Extract, Generate end points are working. Debug to be Fixed. Realtime…
gamidirohan Jul 30, 2025
2e029f8
Updated README.md file
gamidirohan Aug 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ release
dist
.env
.env.*
myenv/
**/.DS_Store
**/.vscode
**/.idea
Expand Down
70 changes: 70 additions & 0 deletions FLOATING_WINDOW_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Conversational Co-Pilot - Floating Window

This project has been transformed from a screenshot-based Jiminy – The Second Conscience to a clean floating conversational co-pilot application.

## What We've Done

### ✅ Completed Changes

1. **Hidden Screenshot Functionality**
- Screenshot queues are now hidden but kept functional in the background
- Screenshot commands and UI elements are hidden from view
- All backend screenshot functionality remains intact

2. **Added Floating Navigation Dock**
- Beautiful animated floating dock with relevant co-pilot controls
- Icons for Voice Input, Mute, AI Assistant, Conversations, Reset, and Settings
- Smooth animations and hover effects
- Positioned at the bottom center of the window

3. **Redesigned UI for Conversational Co-Pilot**
- Clean, modern interface with glass-morphism design
- Placeholder areas for:
- MY SPEECH (voice input detection)
- OTHER SPEECH (voice detection from others)
- AI SUGGESTIONS (AI-generated suggestions)
- AI RESPONSE AREA (where AI responses will appear)

4. **Updated Window Styling**
- Added gradient background
- Improved spacing and layout
- Made the interface more suitable for a floating window

### 🎛️ Controls

- **Ctrl+B** (Windows) or **Cmd+B** (Mac): Toggle window visibility
- **Floating Dock**: Navigation and controls (currently placeholders)

### 🏗️ Next Steps (As per TASKS.md)

The foundation is now ready for implementing the actual conversational co-pilot features:

1. **Audio Capture Implementation**
- Microphone audio capture
- System audio loopback capture
- Integration with Silero VAD for voice activity detection

2. **WebSocket Integration**
- Connect to FastAPI backend
- Real-time audio streaming
- Bi-directional communication for transcripts and AI responses

3. **AI Integration**
- Faster-Whisper for speech-to-text
- DeepSeek LLM for AI responses
- ChromaDB for RAG (Retrieval-Augmented Generation)

4. **Real-time Features**
- Live speech transcription
- Question detection
- Contextual AI suggestions
- Streaming AI responses

### 🎨 Design Features

- **Glass-morphism UI**: Semi-transparent panels with backdrop blur
- **Floating Dock**: Animated navigation with smooth hover effects
- **Responsive Layout**: Adapts to different window sizes
- **Dark Theme**: Modern dark interface suitable for a floating window

The application now provides a clean, professional floating window interface ready for conversational AI features while keeping all existing functionality intact in the background.
260 changes: 225 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,69 +1,259 @@
# Interview Coder
# 🤖 Jiminy – The Second Conscience

Interview Coder is a desktop application designed to help users with technical coding interviews. It allows users to take screenshots of coding problems, process them using AI, and get solutions.
<div align="center">
<img src="https://img.shields.io/badge/Built_with-Electron-47848F?style=for-the-badge&logo=electron&logoColor=white" alt="Electron">
<img src="https://img.shields.io/badge/React-20232A?style=for-the-badge&logo=react&logoColor=61DAFB" alt="React">
<img src="https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge&logo=typescript&logoColor=white" alt="TypeScript">
<img src="https://img.shields.io/badge/Tailwind_CSS-38B2AC?style=for-the-badge&logo=tailwind-css&logoColor=white" alt="Tailwind">
</div>

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
---

- Take screenshots of coding problems
- Process screenshots to extract problem statements
- Generate solutions in your preferred programming language
- View time and space complexity analysis
- Toggle window visibility with keyboard shortcuts
- Move the window around the screen with keyboard shortcuts
## ✨ Features

## Keyboard Shortcuts
### 🖼️ 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

- **Cmd/Ctrl + B**: Toggle window visibility
- **Cmd/Ctrl + Q**: Quit the application
- **Cmd/Ctrl + H**: Take a screenshot
- **Cmd/Ctrl + Enter**: Process screenshots
- **Arrow keys with Cmd/Ctrl**: Move window around the screen
### 🧠 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

## Running the Application
### 🎤 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
- **Node.js** (v16 or higher)
- **npm** or **yarn**
- **Git**

### Installation

1. Clone the repository:
```
git clone https://github.com/yourusername/interview-coder.git
cd interview-coder
1. **Clone the repository**
```bash
git clone https://github.com/gamidirohan/Code-Assist-Electron-Frontend.git
cd Code-Assist-Electron-Frontend
```

2. Install dependencies:
```
2. **Install dependencies**
```bash
npm install
# or
yarn
yarn install
```

3. Run the application in development mode:
```
3. **Start development server**
```bash
npm run dev
# or
yarn dev
```

4. Build the application for production:
```
4. **Build for production**
```bash
npm run build
# or
yarn build
```

## API Integration
---

## ⌨️ 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](CONTRIBUTING.md) 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](../../wiki) for detailed guides
- 🐛 Report bugs in [Issues](../../issues)
- 💬 Join our [Discussions](../../discussions) for questions

---

## 📄 License

This project is licensed under the **ISC License** - see the [LICENSE](LICENSE) file for details.

---

## 🙏 Acknowledgments

This version of the application still requires an API connection to process screenshots and generate solutions. You'll need to set up your own API service or modify the code to use a different solution generation method.
- Built with [Electron](https://electronjs.org/)
- UI components from [Radix UI](https://radix-ui.com/)
- Speech processing powered by Web Audio API
- Icons from [Lucide React](https://lucide.dev/)

## Disclaimer
---

This modified version is for educational purposes only. The original Interview Coder application is a commercial product with subscription requirements.
## 📊 Project Stats

## License
![GitHub stars](https://img.shields.io/github/stars/gamidirohan/Code-Assist-Electron-Frontend?style=social)
![GitHub forks](https://img.shields.io/github/forks/gamidirohan/Code-Assist-Electron-Frontend?style=social)
![GitHub issues](https://img.shields.io/github/issues/gamidirohan/Code-Assist-Electron-Frontend)
![GitHub pull requests](https://img.shields.io/github/issues-pr/gamidirohan/Code-Assist-Electron-Frontend)

This project is licensed under the ISC License.
<div align="center">
<p>Made with ❤️ for developers, by developers</p>
<p><strong>Star ⭐ this repository if you find it helpful!</strong></p>
</div>
Loading