Commit graph

5 commits

Author SHA1 Message Date
DJP
013f57fe60 Implement hybrid Azure AD SSO + Password authentication system
 Backend Implementation:
- Add Azure AD JWT token validation middleware
- Create hybrid authentication system supporting both Azure AD and password auth
- Implement auto-provisioning for new Azure AD users
- Add admin controls to toggle password authentication
- Update all API routes to use hybrid authentication
- Add database fields for authentication (password, lastLoginAt)
- Create comprehensive auth routes with validation endpoints

 Frontend Implementation:
- Install and configure Azure MSAL browser library
- Create Azure AD authentication service with popup/redirect support
- Build hybrid authentication service managing both auth methods
- Update Login.vue with modern dual-authentication UI
- Implement dynamic password auth toggle based on admin settings
- Update App.vue for proper session management and validation
- Modify API service to handle both token types

 Security Features:
- Azure AD tenant validation (Oliver Agency)
- Role-based access control with auto-admin assignment
- JWT token validation for both auth methods
- Automatic user provisioning with proper defaults
- Session validation and automatic logout on token expiry

 Admin Features:
- Toggle password authentication on/off
- Manage users from both authentication methods
- Full role and agent access control
- Azure AD user auto-provisioning as regular users

 Configuration:
- Azure AD: Tenant e519c2e6-bc6d-4fdf-8d9c-923c2f002385
- Client ID: 9079054c-9620-4757-a256-23413042f1ef
- Development redirect URI support
- Fallback password authentication for testing

🔧 Technical Stack:
- Azure MSAL Browser & Node libraries
- JWT token validation and hybrid middleware
- Database schema updates with migrations
- Vue.js integration with MSAL
- Express.js hybrid authentication routes

🚀 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-09 16:14:02 -04:00
DJP
ca4ed4976d Add dual-agent system with file upload support and compact UI
- Implement dual-agent architecture supporting both Chat Completions and Responses API
- Add comprehensive file upload functionality for responses agents with image and PDF support
- Integrate OpenAI Conversations API for persistent file context across messages
- Add compact UI design with reduced font sizes and tighter spacing for better chat focus
- Include vector store management, document upload system, and admin dashboard enhancements
- Fix conversation persistence ensuring uploaded files remain accessible in follow-up questions

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-04 14:45:25 -04:00
DJP
c936e81a47 Complete GPT-5 integration with reasoning effort controls and fix conversation loading
- Implement GPT-5 model support with correct parameters (max_completion_tokens, temperature=1)
- Add configurable reasoning effort levels (low/medium/high) with database migration
- Create admin interface controls for reasoning effort management in agent creation/editing
- Fix conversation loading regression to prevent double-click requirement
- Update home page cards for uniform 280px height with proper text truncation
- Add comprehensive GPT-5 parameter handling in OpenAI service integration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-03 15:40:25 -04:00
DJP
77da1f44f0 Add comprehensive admin dashboard with analytics, full agent management, and complete system improvements
## Major Features Added:
- Complete admin dashboard with user, agent, conversation, and usage management
- Real-time usage analytics with interactive Chart.js visualizations
- Advanced trend analysis with line charts and bar graphs
- CSV export functionality for usage reports with date/user/agent filtering
- Full CRUD operations for agent management including system prompts and starter messages

## UI/UX Improvements:
- Professional top navigation bar with admin access and logout functionality
- Moved admin link from homepage to navigation for better UX
- Reduced all font sizes by 20% for better formatting consistency
- Changed color scheme from blue to orange (#e6a335) throughout application
- Fixed conversation double-click bug in chat interface
- Added separate starter message field distinct from system instructions

## Backend Enhancements:
- Added analytics API endpoints (/api/analytics/usage, /api/analytics/stats, /api/analytics/trends)
- Enhanced assistant API with admin-level data access and full CRUD operations
- Implemented starterMessage database field with automatic migration and data extraction
- Added comprehensive usage tracking and trend analysis capabilities
- Imported 34 additional agents from CSV (total: 53 agents)

## Technical Architecture:
- Integrated Chart.js with Vue.js for professional data visualization
- Implemented proper chart cleanup to prevent memory leaks
- Added comprehensive error handling and fallback states
- Enhanced API service layer with dedicated analytics methods
- Implemented role-based authentication and admin route protection

## Database Improvements:
- Added starterMessage field to Assistant model with automatic data migration
- Enhanced seed script with proper agent categorization and data cleanup
- Improved assistant API responses to include all necessary admin fields
- Implemented proper foreign key relationships for analytics queries

🚀 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-03 14:41:32 -04:00
DJP
88d18619bb Complete migration from OpenAI Assistants API to Chat Completions API with Vue.js frontend
Major Features Implemented:
- Full Vue.js 3 admin interface with Vite build system
- OpenAI Chat Completions API integration (replaced deprecated Assistants API)
- PostgreSQL database with Sequelize ORM
- Complete conversation management system
- User authentication system (admin@oliver.agency, user@oliver.agency)
- AI-powered conversation title generation
- Server-Sent Events for streaming responses
- Conversation soft delete functionality
- Rate limiting middleware with development bypass

Backend Infrastructure:
- Node.js/Express server with comprehensive error handling
- Database models: User, Assistant, Conversation, Message
- Chat API endpoints with full conversation history context
- Conversation CRUD operations with soft delete
- Migration and seeding scripts
- Environment-based configuration

Frontend Features:
- Responsive Vue.js interface with router
- Real-time chat with streaming responses
- Conversation sidebar with delete functionality
- Agent selection dropdown
- Persistent user sessions with hash-based user IDs
- Conversation history loading and continuity
- Login system with user role management
- Prominent logout functionality

Technical Improvements:
- Fixed conversation continuity by loading full message history
- Implemented conversation title generation using GPT-4o-mini
- Added conversation persistence mechanisms (periodic refresh, window focus)
- Enhanced error handling and rate limiting
- Proper environment variable management
- Clean project structure with separated concerns

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-03 13:08:26 -04:00