- main.jsx: always initialize MSAL with initialize() before rendering (MSAL v3 requirement) - main.jsx: always wrap with MsalProvider regardless of SSO toggle - AppContent.jsx: only show login gate when isSSOEnabled() is true - LoginPage.jsx: switch loginPopup → loginRedirect for incognito compatibility - authConfig.js: add navigateToLoginRequestUrl: false - api.php: set_time_limit(120) to prevent Imagen 3 timeout - video_api.php: set_time_limit(300) to prevent Veo polling timeout - CLAUDE.md: fix IndexedDB schema, add AppContent/MSAL pattern, Vite proxy routes, missing packages Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .claude | ||
| backend | ||
| frontend | ||
| .gitignore | ||
| .htaccess | ||
| CLAUDE.md | ||
| deploy.sh | ||
| DEPLOYMENT.md | ||
| lux-studio-apache.conf | ||
| lux-studio-backend.service | ||
| MANUAL_DEPLOYMENT_GUIDE.md | ||
| package-lock.json | ||
| README.md | ||
| setup.sh | ||
| status.sh | ||
Lux Studio - Cinema Studio Pro
AI-powered cinematography suite for professional image and video generation. Combines physics-based prompt engineering with Google's Imagen 3 and Veo 3.1 APIs.
Quick Start
Prerequisites
- Node.js 18+ and npm
- PHP 7.4+
- Composer
- Google Gemini API Key (Get one here)
- Azure AD tenant (for SSO authentication - optional, can be disabled)
Automated Setup (Recommended)
# Clone the repository
git clone <repository-url>
cd cinema-studio-pro
# Run the setup script
./setup.sh
The setup script will:
- Check prerequisites
- Install all dependencies
- Create
.envfiles from examples - Display port configuration and next steps
Manual Installation (Alternative)
- Setup Backend
cd backend
composer install
cp .env.example .env
# Edit .env and add your GEMINI_API_KEY
- Setup Frontend
cd frontend
npm install
cp .env.example .env
# .env is already configured for local development
Running the Application
Terminal 1 - Backend:
cd backend
php -S localhost:5015
Terminal 2 - Frontend:
cd frontend
npm run dev
Access the application:
Open your browser and navigate to: http://localhost:3000
Configuration
Ports and URLs are controlled by .env files:
- Backend Port: Edit
BACKEND_PORTinbackend/.env(default: 5015) - Frontend Port: Edit
FRONTEND_PORTinfrontend/.env(default: 3000) - Disable SSO: Set
VITE_SSO_ENABLED=falseinfrontend/.env - Switch to Production: Comment/uncomment production URLs in
.envfiles
For production deployment, see .env.production files and DEPLOYMENT.md.
Features
Image Generation (Imagen 3)
- Cinematographer's Toolkit: 40+ lighting presets, 8 camera bodies, 10 lens profiles
- Physics-Based Prompts: AI enhances prompts with real camera/lens characteristics
- Reference Images: Style transfer with up to 14 reference images
- Iterative Editing: Refine images with natural language
Video Generation (Veo 3.1)
- Text-to-Video & Image-to-Video: Generate from prompts or reference frames
- AI Prompt Optimizer: Intelligent inference of camera movement and subject action
- Native Audio: Veo 3's built-in audio generation with dialogue support
- Frame Extraction: Pull stills from generated videos
Project Management
- Project-First Workflow: Organize generations into projects
- Local Storage: IndexedDB-based, no server required
- Storyboard Editor: Annotate and organize scenes with drag-to-reorder
- Cross-Tab Usage: Use generated images as video reference frames
Authentication
- MSAL SSO: Microsoft Azure AD authentication
- Toggleable: Can be disabled for development
- Development Credentials: Pre-configured for quick start
- Logout: Easy logout from the application header
Project Structure
cinema-studio-pro/
├── frontend/ # React frontend (port 3000)
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── hooks/ # Custom hooks
│ │ ├── authConfig.js # MSAL configuration
│ │ └── App.jsx
│ ├── .env # Frontend environment variables
│ └── package.json
├── backend/ # PHP backend (port 8000)
│ ├── api.php # Image generation API
│ ├── video_api.php # Video generation API
│ ├── .env # Backend environment variables
│ └── composer.json
├── MDFiles/ # Documentation
└── CLAUDE.md # Development guide for AI assistants
Configuration Files
The application uses .env files for all configuration. Both local and production settings are managed through these files.
Backend (.env) - Local Development
BACKEND_PORT=5015
GEMINI_API_KEY=your-api-key-here
FRONTEND_URL=http://localhost:3000
SSO_ENABLED=false
SSO_TENANT_ID=e519c2e6-bc6d-4fdf-8d9c-923c2f002385
SSO_CLIENT_ID=15c0c4e2-bac0-4564-a3a6-c2717f00a6d9
Frontend (.env) - Local Development
FRONTEND_PORT=3000
BACKEND_PORT=5015
VITE_API_URL=http://localhost:5015
VITE_GEMINI_API_KEY=your-api-key-here
VITE_SSO_ENABLED=true
VITE_SSO_TENANT_ID=e519c2e6-bc6d-4fdf-8d9c-923c2f002385
VITE_SSO_CLIENT_ID=15c0c4e2-bac0-4564-a3a6-c2717f00a6d9
VITE_SSO_REDIRECT_URI=http://localhost:3000
NODE_ENV=development
For Production: See .env.production files in both backend/ and frontend/ directories.
Development
Quick Start Script
./setup.sh # Automated local setup
Frontend Commands
cd frontend
npm run dev # Start development server (port from .env)
npm run build # Build for production
npm run lint # Run linter
npm run preview # Preview production build
Backend Commands
cd backend
composer install # Install dependencies
php -S localhost:5015 # Start development server (use your BACKEND_PORT)
Tech Stack
- Frontend: React 19, Vite, Tailwind CSS, MSAL, IndexedDB
- Backend: PHP 7.4+, Composer
- AI Models: Google Imagen 3, Veo 3.1, Gemini Pro
- Authentication: Microsoft Azure AD (MSAL)
Documentation
Detailed documentation is available in the MDFiles/ directory:
README.md- Original user guideINSTALL.md- Deployment instructionsAI_IMPLEMENTATION_GUIDE.md- Imagen 3 API patternsAUTH_README.md- Azure AD setup guideQUICK_REFERENCE.md- Common patterns
For development guidance, see CLAUDE.md in the root directory.
License
MIT
Security Notes
- Never commit
.envfiles (already in .gitignore) - API keys are sensitive - keep them secure
- HTTPS is required for production SSO
- Images auto-delete after 24 hours on the backend