Commit graph

31 commits

Author SHA1 Message Date
DJP
b909d7e19a Clean up repository structure and archive legacy docs
- Move 12+ outdated documentation files to docs-archive/
- Keep main directory clean with only essential files
- Add archive README explaining the move
- Main README.md is now the single source of truth for installation
- Focus on Docker deployment as primary method

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-10 16:24:39 -04:00
DJP
29021e39b1 Complete README.md overhaul for Docker deployment
- Replace outdated 2024 architecture with modern Docker setup
- Lead with 5-minute Quick Start guide
- Focus on production-ready Docker deployment
- Clear installation instructions at top level
- Remove old Make.com/webhook references
- Add admin features, security info, and management commands
- Professional, enterprise-focused presentation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-10 16:24:17 -04:00
DJP
73fc91f138 Fix Docker deployment and chat functionality
- Add volume cleanup to simple-setup.sh to prevent database password issues
- Fix chat API sendStreamingMessage to include Authorization header and userId
- Ensure fresh database initialization on every deployment
- Chat should now work properly with authentication

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-10 16:15:41 -04:00
DJP
d52ab105b9 Update login page to show correct admin credentials
- Change demo credentials from daveporter@oliver.agency to admin@oliver.agency
- Update password to admin123 to match Docker deployment

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-10 16:00:55 -04:00
DJP
d4f4e8a798 Complete Docker deployment improvements for plug-and-play setup
- Remove problematic .env files that override Docker environment variables
- Add automatic database initialization script (init-database.js)
- Create admin@oliver.agency user automatically with admin123 password
- Auto-run database migrations and seeding on first startup
- Update setup scripts to display admin credentials
- Add comprehensive Docker deployment README
- Make deployment truly plug-and-play: git clone → cd docker → ./simple-setup.sh

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-10 15:48:46 -04:00
DJP
d172b7fc09 Fix Docker database connection issues
- Update database.js to support individual environment variables for Docker
- Create .env file template with required environment variables
- Fix backend container database host configuration
- Add connection logging for debugging

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-10 09:41:09 -04:00
DJP
e041fb99f5 🔧 Fix line endings in simple-setup.sh 2025-09-10 09:19:16 -04:00
DJP
58dda931fa 🎯 Add simple-setup.sh with clear visible prompts
- Create ultra-reliable setup script with visible questions
- Fix terminal input/output issues that caused invisible prompts
- Simple step-by-step process with clear feedback
- Only asks essential questions (domain, port, OpenAI key)
- Shows what user selected after each input
- Bulletproof terminal handling without fancy formatting
2025-09-10 09:18:36 -04:00
DJP
cb29c9d1cf 🔧 Fix line endings in quick-setup.sh script
- Convert CRLF to LF line endings for Unix compatibility
- Script now works on macOS, Linux, and WSL environments
2025-09-09 18:37:17 -04:00
DJP
ce5cc4c098 🚀 Add quick-setup.sh script with better input handling
- Create simplified setup script with immediate feedback
- Fix input handling with proper terminal redirection (</dev/tty)
- Add progress indicators and clear step-by-step process
- Streamlined configuration with sensible defaults
- Better error handling and user experience
2025-09-09 18:34:52 -04:00
DJP
ae371e2415 Add Docker Compose v2 compatibility
- Support both docker-compose (v1) and docker compose (v2) commands
- Auto-detect available Docker Compose version
- Enhanced requirement checking with better version detection
- Update all scripts to use dynamic Docker Compose command
- Fixes compatibility with modern Docker Desktop installations
2025-09-09 18:16:47 -04:00
DJP
e61d472d68 🔧 Fix line endings in shell scripts for cross-platform compatibility
- Convert CRLF to LF line endings in all shell scripts
- Ensure all scripts are executable
- Fixes 'bad interpreter' error on Unix systems
- Scripts now work on macOS, Linux, and WSL
2025-09-09 18:13:22 -04:00
DJP
a8e201dc52 🐳 Complete Docker deployment system with interactive setup
 Production-Ready Containerization:
- Multi-stage frontend build (Vue.js + Nginx)
- Optimized backend container (Node.js + Alpine)
- PostgreSQL 15 with persistent storage and health checks
- Custom Docker network for secure service communication

 Interactive Setup Wizard (setup.sh):
- Beautiful CLI interface with colors and progress indicators
- Automatic secure password and JWT secret generation
- Complete environment configuration with validation
- Domain, SSL, Azure AD, and OpenAI API setup
- One-command deployment with immediate startup option

 Production Security & Performance:
- Nginx reverse proxy with rate limiting and security headers
- HTTPS/SSL support with custom certificate mounting
- CORS protection and request validation
- Non-root container execution for all services
- Health checks and monitoring for reliability

 Management & Operations:
- Comprehensive deploy.sh script with all common operations
- Database backup and restore capabilities
- Service logs management and troubleshooting tools
- Docker Compose orchestration with dependency management
- Development vs production environment support

 Enterprise Features:
- Azure AD SSO integration with hybrid authentication
- OpenAI API configuration and secure key management
- Multi-environment support (localhost vs production)
- Comprehensive documentation and troubleshooting guides
- Resource optimization and performance tuning

🏗️ Architecture:
- Frontend: Vue.js + Vite → Nginx (port 80/443)
- Backend: Node.js + Express (internal port 3000)
- Database: PostgreSQL 15 (internal port 5432)
- Networking: Isolated Docker bridge network
- Storage: Named volumes for data persistence

🚀 Deployment Commands:
- ./setup.sh - Interactive deployment wizard
- ./scripts/deploy.sh [start|stop|build|logs|status]
- docker-compose up -d --build
- Automatic migrations and admin user creation

🔒 Security Hardening:
- Rate limiting on API endpoints (10 req/s) and auth (5 req/min)
- Security headers (X-Frame-Options, CSP, HSTS)
- CORS validation and origin checking
- SSL/TLS encryption support
- Container isolation and minimal attack surface

📚 Complete Documentation:
- Comprehensive README with architecture overview
- Troubleshooting guide with common issues
- Development vs production configuration
- Performance tuning and scaling recommendations

🎯 One-Command Production Deployment:
Everything needed to deploy Ideas Generator 2025 in production
with enterprise security, monitoring, and Azure AD SSO integration.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-09 18:00:29 -04:00
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
574e390be1 Update brand color from orange to yellow across entire application
- Change main brand color from #e6a335 to #ffc407 (new yellow)
- Update hover/darker variant from #d1932b to #e6b006
- Update all RGBA color values to match new yellow (255, 196, 7)
- Apply color changes across all components:
  - Navigation bar and branding
  - Buttons and interactive elements
  - Form inputs and focus states
  - Charts and data visualization
  - Status indicators and badges
  - Admin dashboard styling
  - Chat interface elements
  - Login and authentication pages

Total updates: 40+ color references updated across 6 files

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-09 11:50:10 -04:00
DJP
2b71c0efd4 Final user management system polish and visual improvements
- Add visual access level indicators in navigation bar
- Include user access info display (Limited vs Full Access)
- Add comprehensive admin dashboard permission badges
- Style user role information with proper color coding
- Complete frontend integration for permission system
- Finalize all visual indicators and status displays

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-05 10:16:16 -04:00
Dave Porter
2e9b55df00 README.md edited online with Bitbucket 2025-09-05 14:13:06 +00:00
DJP
af57e5b6a4 Complete user permission system with full frontend integration
- Implement user-based agent filtering in assistants API
- Add userId parameter to agent requests for permission filtering
- Integrate permission filtering across home page and chat interface
- Add visual indicators showing user access levels in admin dashboard
- Display user access info in main navigation (Limited vs Full Access)
- Create comprehensive permission badges and status indicators
- Test and validate permission system with multiple user types
- Ensure admin users bypass all filtering restrictions
- Add proper fallback behavior when user data unavailable

Features completed:
 User role management (user/admin)
 Agent access control (All agents vs specific selection)
 API filtering based on user permissions
 Visual permission indicators throughout interface
 Admin panel for managing user permissions
 Frontend integration with localStorage user management
 Comprehensive testing and validation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-05 09:23:48 -04:00
DJP
a772e53840 Improve user management UX with clean list layout and search
- Replace grid layout with clean line-by-line agent list
- Add search functionality for agent selection with real-time filtering
- Implement professional list items with agent names and descriptions
- Add proper hover effects and spacing for better interactivity
- Include description truncation to keep interface compact
- Clear search query when modal opens/closes for better UX
- Style search input with brand colors and focus states

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-05 09:12:04 -04:00
DJP
21c8174bf9 Implement comprehensive user management system
- Create edit user modal with role and agent access controls
- Add agent selection interface with "All Agents" vs specific agent selection
- Implement user status toggle functionality with API integration
- Update backend users API to handle allowedAgents preferences
- Add comprehensive user management with admin controls
- Create test users with different access levels (admin, limited, inactive)
- Add responsive agent selection grid with checkbox interface
- Update data models to support user-agent permission mapping
- Integrate real users API replacing mock data

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-05 08:54:24 -04:00
DJP
9c15db80cf Add comprehensive installation guide
- Complete step-by-step deployment instructions
- Prerequisites and system requirements
- Database setup and configuration
- Environment variables configuration
- Development and production deployment options
- Docker and traditional server deployment
- Troubleshooting common issues
- Maintenance and scaling considerations
- Security best practices and SSL setup

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-04 15:54:17 -04:00
DJP
da797bd1c2 Complete UI improvements and agent management overhaul
- Convert agent management from card view to searchable table layout
- Add search functionality filtering by name, description, category, and model
- Implement proper agent deletion with confirmation dialogs and API integration
- Fix chat input positioning to stay pinned at viewport bottom
- Enable independent scrolling for chat history sidebar and messages
- Increase chat input height for better multi-line text editing
- Add responsive padding to home page preventing edge overflow
- Fix conversation item layout to keep delete buttons visible
- Add text truncation for long agent names and conversation titles
- Clean database removing CREATOR-BOT- prefix from agent names

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-04 15:44:20 -04:00
DJP
77d053381a Major UI improvements and agent management enhancements
- Convert agent management from cards to searchable table view with search functionality
- Add proper delete functionality for agents with confirmation dialogs
- Fix chat input positioning to stay pinned at bottom with independent scrolling
- Improve chat history layout to prevent delete buttons from being pushed off screen
- Add padding to home page to prevent cards from hitting edges
- Clean up database by removing CREATOR-BOT- prefix from 28 agent names
- Enhance responsive layouts across admin dashboard and chat interface
- Fix usage trends analytics API with proper assistant relationship filtering

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-04 15:43:28 -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
DJP
aec2fe691c Day 1: Complete foundation setup for Ideas Generator 2025
- Created complete project structure (server/, admin/, docs/)
- Initialized Node.js project with all required dependencies
- Configured PostgreSQL database connection
- Implemented basic Express server with security middleware
- Added health check and API placeholder endpoints
- Set up environment configuration with development flags
- Verified all components working and endpoints responding

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-03 09:16:45 -04:00
DJP
f67b8517ed Complete Implementation Plan - Context Window Friendly Documentation
## Implementation Guides Created
- `IMPLEMENTATION_GUIDE.md`: Complete 5-week step-by-step development plan
- `WEEK_BY_WEEK_PLAN.md`: High-level weekly goals and success criteria
- `QUICK_START_CHECKLIST.md`: Day 1 immediate action items and setup

## Context Window Strategy
Each document designed to be self-contained for multi-session development:
- Daily deliverables with specific file structures
- Continuation prompts for context window transitions
- Success criteria and verification steps
- Complete code examples and configurations

## Week 1 Foundation Plan
- Day 1: Project structure, environment, basic server
- Day 2: PostgreSQL schema, Sequelize models, database connection
- Day 3: OpenAI Responses API integration, assistant manager
- Day 4: Core chat endpoint, conversation management
- Day 5: Frontend integration, basic UI functional

## Key Architecture Decisions Documented
- PostgreSQL over MongoDB for relational data structure
- OpenAI Responses API replacing deprecated Assistants API
- Dynamic assistant configuration system with admin interface
- 48 specialized AI assistants (1 SMART Goals + 47 Creator Bots)
- 95% API efficiency improvement target

## Ready for Implementation
All documentation provides specific commands, code examples, and verification steps.
Each context window continuation includes full project context and current status.

Next: Execute QUICK_START_CHECKLIST.md Day 1 tasks to begin development.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-03 09:00:28 -04:00
DJP
5ec08ac641 Complete Migration Analysis & Documentation - OpenAI Assistants to Responses API
## Major Analysis Completed
- Analyzed Make.com workflow blueprint (368KB+ complexity)
- Extracted 48 specialized AI assistant configurations from CSV export
- Designed comprehensive migration strategy from deprecated Assistants API to Responses API

## Key Discoveries
- System contains 1 SMART Goals assistant + 47 Creator Bot specialists
- Each bot represents a proven creative advertising technique
- Current architecture: 8+ API calls per message, complex threading
- New architecture: Single API call with 95% complexity reduction

## Documentation Created
- `BACKEND_ARCHITECTURE.md`: Complete Make.com workflow technical analysis
- `COMPLETE_ASSISTANT_CONFIGURATIONS.md`: All 48 assistant system prompts
- `RESPONSES_API_MIGRATION_PLAN.md`: Technical migration strategy
- `FEATURE_PARITY_MAPPING.md`: Detailed feature comparison & implementation
- `FINAL_MIGRATION_SUMMARY.md`: Executive summary & business impact
- `SECURITY_COMPONENTS.md`: Authentication components to disable for development
- `UPDATED_TRANSITION_PLAN.md`: 5-week implementation timeline

## Source Files
- `I-gen.blueprint.json`: Original Make.com workflow export (368KB)
- `I-gen-assistant-instructions.csv`: All assistant system instructions

## Business Impact
- 48 specialized creative AI personalities (significant IP value)
- 60% cost reduction through API efficiency
- Enhanced capabilities: web search, conversation forking, real-time streaming
- Dynamic assistant management system designed
- PostgreSQL architecture recommended for production scale

## Technical Architecture
- Migration from OpenAI Assistants API → Responses API (future-proof)
- Dynamic system prompts with tone-of-voice integration
- Admin interface for assistant management (create/update/test)
- Production-ready database schema with partitioning
- Comprehensive caching and performance optimization

Ready for Phase 1 implementation: Local backend setup with Responses API integration.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-03 08:56:14 -04:00
michael
d8c09aad99 initial commit 2025-09-02 15:35:59 -05:00