-
Notifications
You must be signed in to change notification settings - Fork 69
feat: Add OpenAI API key onboarding and remove unused Assistant feature #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
Claude encountered an error —— View job I'll analyze this and get back to you. |
- Removed Alert component imports that don't exist - Removed toast hook import that doesn't exist - Replaced Alert components with simple styled divs - Replaced toast notifications with browser alerts - Build now completes successfully
Claude encountered an error —— View job I'll analyze this and get back to you. |
- Explicitly set has_completed_onboarding to false during user registration - Update middleware to handle null values defensively - This ensures new users are properly redirected to onboarding flow
Claude encountered an error —— View job I'll analyze this and get back to you. |
- Remove all auth controllers, views, routes, and middleware - Create cache-based API key management service - Update Realtime Agent to check API key from backend - Simplify settings to only API Keys and Appearance - Update documentation to reflect single-user architecture - Fix API key validation flow for desktop usage Co-Authored-By: Claude <[email protected]>
- Delete all Auth test files - Delete Settings test files (Password, Profile) - Update DashboardTest to work without authentication - Add test for realtime-agent accessibility Co-Authored-By: Claude <[email protected]>
Claude encountered an error —— View job I'll analyze this and get back to you. |
@claude review the PR |
Claude encountered an error —— View job I'll analyze this and get back to you. |
@claude review the PR |
Claude finished @vijaythecoder's task —— View job PR Review Complete ✅This is a significant refactoring that successfully removes the Assistant feature and adds OpenAI API key management. Here's my comprehensive review: ✅ StrengthsArchitecture & Cleanup
API Key Management
UI/UX Improvements
|
- Remove unused createSession() method - Remove unused getSalesTools() method with 5 unused tool definitions - Remove /api/realtime/session route - Keep only generateEphemeralKey() method which is actively used Co-Authored-By: Claude <[email protected]>
Claude finished @vijaythecoder's task —— View job PR Review Complete ✅This is a significant refactoring that successfully removes the Assistant feature and adds OpenAI API key management. Here's my comprehensive review: ✅ StrengthsArchitecture & Cleanup
API Key Management
UI/UX Improvements
🚨 Critical IssuesSecurity VulnerabilitiesCritical - API Key Exposure: // app/Http/Controllers/RealtimeController.php:37
'ephemeralKey' => $apiKey, // ❌ Exposing full API key to browser This directly exposes the user's OpenAI API key to client-side JavaScript. This is a major security risk. Recommendations:
Missing Database MigrationThe User model references new fields ( Missing migration needed: Schema::table('users', function (Blueprint $table) {
$table->text('openai_api_key')->nullable();
$table->boolean('has_completed_onboarding')->default(false);
}); Inconsistent ArchitectureThe code has conflicting API key storage approaches:
This architectural inconsistency will cause bugs.
|
Pull Request
Description
BREAKING CHANGES:
Added:
Removed:
Changes:
Technical details:
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.
Type of Change
Please check the type of change your PR introduces:
Testing Performed
Please describe the tests you've run to verify your changes. Provide instructions so reviewers can reproduce.
composer test
)npm run build
)php artisan pint
andnpm run format
)Test Configuration
Manual Testing Steps
Checklist
Please review the following items before submitting your PR:
Code Quality
any
types unless absolutely necessary)Database Changes (if applicable)
database.sqlite
andnativephp.sqlite
)Frontend Changes (if applicable)
Testing
Related Issues
Please link any related issues here using the format
Fixes #issue_number
orRelates to #issue_number
Screenshots (if applicable)
If your changes include UI updates, please add screenshots showing:
Before
After
Dark Mode (if UI changes)
Additional Notes
Add any additional notes, concerns, or discussion points for reviewers.
Reviewer Checklist
For reviewers to complete: