Skip to content

Commit 2418338

Browse files
committed
feat: Add OpenAI API key onboarding and remove unused Assistant feature
BREAKING CHANGES: - Removed Assistant feature (Whisper-based transcription) - Removed chat functionality - Application now focuses exclusively on Realtime Agent Added: - User-specific OpenAI API key management - Onboarding flow for new users to configure API keys - Settings page for managing API keys - Secure API key storage (encrypted in database) Removed: - Assistant page and all related components - AudioRecorder component - AssistantController and AIService - Whisper transcription endpoints - Chat functionality - Assistant-specific database tables (context_snapshots, conversations) Changes: - Dashboard now highlights Realtime Agent as the primary feature - Updated navigation to remove Assistant references - All OpenAI interactions now use user's personal API key - Improved security by removing API key from browser in production Technical details: - Added migration for openai_api_key and has_completed_onboarding fields - Created EnsureOnboardingCompleted middleware - Added OnboardingController for API key setup flow - Created migration to drop unused Assistant tables - Cleaned up routes and removed unused endpoints The application now provides a cleaner, more focused experience centered on the Realtime Agent feature with WebSocket-based voice conversations and real-time sales coaching.
1 parent 3e307ad commit 2418338

38 files changed

+923
-1577
lines changed

CLAUDE.md

Lines changed: 51 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
44

5+
## Project Overview
6+
7+
Clueless is an AI-powered meeting assistant that provides real-time transcription, intelligent analysis, and action item extraction from conversations. It's built as a desktop application using Electron/NativePHP with support for multiple AI providers (OpenAI, Anthropic, Gemini).
8+
59
## Tech Stack
610

711
- **Backend**: Laravel 12.0 (PHP 8.2+)
@@ -10,7 +14,9 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
1014
- **Build**: Vite 6
1115
- **Desktop**: NativePHP/Electron
1216
- **Testing**: Pest PHP
13-
- **Database**: SQLite (default)
17+
- **Database**: SQLite (dual database setup)
18+
- **Real-time**: OpenAI Realtime API, WebSockets
19+
- **AI Integration**: OpenAI PHP, multiple provider support
1420

1521
## Development Commands
1622

@@ -69,22 +75,33 @@ php artisan test tests/Feature/DashboardTest.php
6975

7076
# Run tests with coverage (if configured)
7177
php artisan test --coverage
78+
79+
# Run tests in parallel
80+
php artisan test --parallel
81+
82+
# Run only unit tests
83+
php artisan test --testsuite=Unit
84+
85+
# Run only feature tests
86+
php artisan test --testsuite=Feature
7287
```
7388

7489
## Project Architecture
7590

7691
### Directory Structure
7792

7893
- `/app/` - Laravel backend logic
79-
- `/Http/Controllers/` - Request handlers (Auth, Settings)
80-
- `/Models/` - Eloquent models
94+
- `/Http/Controllers/` - Request handlers (Auth, Conversations, Realtime, Settings)
95+
- `/Models/` - Eloquent models (User, Conversation, Transcript, etc.)
96+
- `/Services/` - Business logic (AIService, RealtimeRelayService, TranscriptionService)
8197
- `/Providers/` - Service providers
8298
- `/resources/js/` - Vue frontend application
8399
- `/components/` - Reusable Vue components
84-
- `/components/ui/` - UI component library (shadcn/ui-inspired)
100+
- `/components/ui/` - UI component library (Reka UI based, shadcn/ui-inspired)
85101
- `/pages/` - Inertia.js page components
86-
- `/layouts/` - Layout components
87-
- `/composables/` - Vue composables (e.g., useAppearance)
102+
- `/layouts/` - Layout components (App, Auth, Settings)
103+
- `/composables/` - Vue composables (useAppearance, useRealtime, etc.)
104+
- `/services/` - Frontend services (audioCaptureService, realtimeClient)
88105
- `/types/` - TypeScript type definitions
89106
- `/routes/` - Application routing (web.php)
90107
- `/database/` - Migrations, factories, seeders
@@ -97,6 +114,8 @@ php artisan test --coverage
97114
3. **TypeScript**: Strict mode enabled, with path alias `@/` for `/resources/js/`
98115
4. **Authentication**: Built-in Laravel auth with custom Vue components
99116
5. **Theme Support**: Dark/light mode via `useAppearance` composable
117+
6. **Real-time Features**: WebSocket connections for live transcription using OpenAI Realtime API
118+
7. **Service Architecture**: Core business logic separated into service classes (AIService, TranscriptionService, etc.)
100119

101120
### Important Files
102121

@@ -167,9 +186,34 @@ Example usage:
167186
- For Laravel docs: Use Context7 to get the latest Laravel 12 documentation
168187
- For any other library: First use `mcp__context7__resolve-library-id` to find the library
169188

189+
## Working with Real-time Features
190+
191+
The application uses OpenAI's Realtime API for live transcription:
192+
- Frontend audio capture: `/resources/js/services/audioCaptureService.ts`
193+
- WebSocket client: `/resources/js/services/realtimeClient.ts`
194+
- Backend relay service: `/app/Services/RealtimeRelayService.php`
195+
- Controllers: `/app/Http/Controllers/RealtimeController.php`
196+
197+
## AI Provider Integration
198+
199+
Multiple AI providers are supported through environment configuration:
200+
- OpenAI (GPT-4, Realtime API)
201+
- Anthropic (Claude)
202+
- Google (Gemini)
203+
- Configuration: Update `.env` with appropriate API keys
204+
205+
## License & Usage
206+
207+
This project uses MIT License with Commons Clause:
208+
- ✅ Free for personal and internal business use
209+
- ❌ Commercial use (SaaS, resale) requires commercial agreement
210+
- See `COMMONS_CLAUSE.md` for details
211+
170212
## Notes
171213

172214
- ESLint ignores `/resources/js/components/ui/*` (third-party UI components)
173215
- Prettier formats all files in `/resources/` directory
174216
- NativePHP allows running as desktop application
175-
- Concurrently runs multiple processes in development (server, queue, logs, vite)
217+
- Concurrently runs multiple processes in development (server, queue, logs, vite)
218+
- Built primarily for macOS desktop usage
219+
- Uses Pusher for additional real-time features

app/Console/Commands/NativeConfigCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public function handle()
2727
{
2828
// Return empty JSON to satisfy NativePHP expectations
2929
echo json_encode([]);
30+
3031
return 0;
3132
}
32-
}
33+
}

app/Console/Commands/NativePhpIniCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public function handle()
3232
'post_max_size' => '50M',
3333
];
3434
echo json_encode($settings);
35+
3536
return 0;
3637
}
37-
}
38+
}

app/Http/Controllers/AssistantController.php

Lines changed: 0 additions & 217 deletions
This file was deleted.

0 commit comments

Comments
 (0)