Skip to content

Commit 3793306

Browse files
Merge pull request #1 from vijaythecoder/feature/openai-onboarding
feat: Add OpenAI API key onboarding and remove unused Assistant feature
2 parents ec3afdf + c18d14f commit 3793306

File tree

72 files changed

+758
-3389
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+758
-3389
lines changed

CLAUDE.md

Lines changed: 55 additions & 8 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 single-user desktop application using Electron/NativePHP with OpenAI's Realtime API for voice conversations.
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 Realtime API only
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 (Conversations, Realtime, Settings)
95+
- `/Models/` - Eloquent models (Conversation, Transcript, etc.)
96+
- `/Services/` - Business logic (ApiKeyService, 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, 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
@@ -95,8 +112,10 @@ php artisan test --coverage
95112
1. **Inertia.js Integration**: Pages are Vue components loaded via Inertia.js, providing SPA-like experience without API endpoints
96113
2. **Component Library**: UI components in `/resources/js/components/ui/` follow Reka UI patterns
97114
3. **TypeScript**: Strict mode enabled, with path alias `@/` for `/resources/js/`
98-
4. **Authentication**: Built-in Laravel auth with custom Vue components
115+
4. **No Authentication**: Single-user desktop app with no login required
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 (ApiKeyService, TranscriptionService, etc.)
100119

101120
### Important Files
102121

@@ -137,6 +156,9 @@ php artisan db:seed
137156
2. Generate app key: `php artisan key:generate`
138157
3. Create SQLite database: `touch database/database.sqlite`
139158
4. Run migrations: `php artisan migrate`
159+
5. Configure OpenAI API key either:
160+
- In `.env` file: `OPENAI_API_KEY=sk-...`
161+
- Or via Settings > API Keys after launching the app
140162

141163
## Database Migrations
142164

@@ -167,9 +189,34 @@ Example usage:
167189
- For Laravel docs: Use Context7 to get the latest Laravel 12 documentation
168190
- For any other library: First use `mcp__context7__resolve-library-id` to find the library
169191

192+
## Working with Real-time Features
193+
194+
The application uses OpenAI's Realtime API for live transcription:
195+
- Frontend audio capture: `/resources/js/services/audioCaptureService.ts`
196+
- WebSocket client: `/resources/js/services/realtimeClient.ts`
197+
- Backend relay service: `/app/Services/RealtimeRelayService.php`
198+
- Controllers: `/app/Http/Controllers/RealtimeController.php`
199+
200+
## API Key Management
201+
202+
The application uses a simple API key management system:
203+
- API keys are stored in Laravel's cache (not database)
204+
- Configure via Settings > API Keys in the app
205+
- Falls back to `.env` OPENAI_API_KEY if not configured
206+
- Realtime Agent checks for API key on startup
207+
208+
## License & Usage
209+
210+
This project uses MIT License with Commons Clause:
211+
- ✅ Free for personal and internal business use
212+
- ❌ Commercial use (SaaS, resale) requires commercial agreement
213+
- See `COMMONS_CLAUSE.md` for details
214+
170215
## Notes
171216

172217
- ESLint ignores `/resources/js/components/ui/*` (third-party UI components)
173218
- Prettier formats all files in `/resources/` directory
174219
- NativePHP allows running as desktop application
175-
- Concurrently runs multiple processes in development (server, queue, logs, vite)
220+
- Concurrently runs multiple processes in development (server, queue, logs, vite)
221+
- Built primarily for macOS desktop usage
222+
- 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)