No description
Find a file
Manish Tanwar 3596826cc4 Fix MSAL auth (redirect mode, initialize), increase PHP timeouts, update CLAUDE.md
- 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>
2026-02-25 17:42:20 +05:30
.claude Update-video format api for reference images 2026-01-28 01:37:17 +05:30
backend Fix MSAL auth (redirect mode, initialize), increase PHP timeouts, update CLAUDE.md 2026-02-25 17:42:20 +05:30
frontend Fix MSAL auth (redirect mode, initialize), increase PHP timeouts, update CLAUDE.md 2026-02-25 17:42:20 +05:30
.gitignore update 2026-01-27 18:36:53 +05:30
.htaccess Deployment files update 2026-01-16 17:40:58 +05:30
CLAUDE.md Fix MSAL auth (redirect mode, initialize), increase PHP timeouts, update CLAUDE.md 2026-02-25 17:42:20 +05:30
deploy.sh Local and Server Deployment 2026-01-19 11:53:17 +05:30
DEPLOYMENT.md Deployment files update 2026-01-16 17:40:58 +05:30
lux-studio-apache.conf Deployment files update 2026-01-16 17:40:58 +05:30
lux-studio-backend.service Deployment files update 2026-01-16 17:40:58 +05:30
MANUAL_DEPLOYMENT_GUIDE.md Image Fix 2026-01-19 18:04:16 +05:30
package-lock.json Deployment files update 2026-01-16 17:40:58 +05:30
README.md Local and Server Deployment 2026-01-19 11:53:17 +05:30
setup.sh update 2026-01-27 18:36:53 +05:30
status.sh update 2026-01-27 18:36:53 +05:30

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)
# 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 .env files from examples
  • Display port configuration and next steps

Manual Installation (Alternative)

  1. Setup Backend
cd backend
composer install
cp .env.example .env
# Edit .env and add your GEMINI_API_KEY
  1. 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_PORT in backend/.env (default: 5015)
  • Frontend Port: Edit FRONTEND_PORT in frontend/.env (default: 3000)
  • Disable SSO: Set VITE_SSO_ENABLED=false in frontend/.env
  • Switch to Production: Comment/uncomment production URLs in .env files

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 guide
  • INSTALL.md - Deployment instructions
  • AI_IMPLEMENTATION_GUIDE.md - Imagen 3 API patterns
  • AUTH_README.md - Azure AD setup guide
  • QUICK_REFERENCE.md - Common patterns

For development guidance, see CLAUDE.md in the root directory.

License

MIT

Security Notes

  • Never commit .env files (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