No description
Find a file
DJP 352a4f7ef2 Complete Brandtech Sandbox transformation with secure video system
## Major Changes:
- Fixed spelling from "BRANTECH" to "BRANDTECH"
- Removed all unwanted tiles (Prompt, Image Descriptor, Ideas Sparkplug, IGEN, Chat with Docs, Voice to Text, Document Translator, Smart Crop, SBII, Sharon, Ask People)
- Fixed broken div structure causing layout issues
- Reorganized tiles into proper 4-card rows

## New Video System:
- Created secure GCP bucket integration (optical-brandtech-videos)
- Built Node.js API for presigned URL generation
- Added modal video player for in-browser viewing
- Converted all 24 SharePoint video links to use secure API
- Added video streaming infrastructure with 2-hour URL expiry

## Files Added:
- README.md - Complete installation and setup guide
- video-api/ - Node.js API server for video streaming
- video-link-helper.js - Frontend video handling
- Updated icon paths for proper display

## Current Layout:
Row 1: LLM Chat, Image Generator Advanced, Text to Speech 2.0, Video Query
Row 2: Image Scale, Topaz Video Upscaler 2.0, Vivid Alt Text Generator, Render Mermaid Charts
Row 3: Markdown to HTML Formatter, Video Subtitle Generator, Clipping Magic, Sound Effects

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-16 10:39:43 -04:00
assets Complete Brandtech Sandbox transformation with secure video system 2025-09-16 10:39:43 -04:00
video-api Complete Brandtech Sandbox transformation with secure video system 2025-09-16 10:39:43 -04:00
VIDEOS Complete Brandtech Sandbox transformation with secure video system 2025-09-16 10:39:43 -04:00
.DS_Store Complete Brandtech Sandbox transformation with secure video system 2025-09-16 10:39:43 -04:00
brandtech-video-key.json Complete Brandtech Sandbox transformation with secure video system 2025-09-16 10:39:43 -04:00
cors.json Complete Brandtech Sandbox transformation with secure video system 2025-09-16 10:39:43 -04:00
index.html Complete Brandtech Sandbox transformation with secure video system 2025-09-16 10:39:43 -04:00
README.md Complete Brandtech Sandbox transformation with secure video system 2025-09-16 10:39:43 -04:00
TOPAZ-VIDEO.svg Complete Brandtech Sandbox transformation with secure video system 2025-09-16 10:39:43 -04:00
video-link-helper.js Complete Brandtech Sandbox transformation with secure video system 2025-09-16 10:39:43 -04:00
video-mapping.js Complete Brandtech Sandbox transformation with secure video system 2025-09-16 10:39:43 -04:00

Brandtech Sandbox

A secure AI tools sandbox environment for exploring generative AI capabilities. This repository contains the main landing page and video streaming infrastructure for the Brandtech Sandbox platform.

🚀 Features

  • 12 AI Tools - LLM Chat, Image Generation, Text-to-Speech, Video Processing, and more
  • Secure Video Streaming - Training videos served via Google Cloud Storage with presigned URLs
  • Responsive Design - Works on desktop and mobile devices
  • Dark Mode Support - Toggle between light and dark themes
  • Modal Video Player - Professional in-browser video viewing experience

🛠 Tech Stack

  • Frontend: HTML5, CSS3, JavaScript, Bootstrap 4
  • Video API: Node.js + Express
  • Cloud Storage: Google Cloud Storage (GCS)
  • Authentication: Microsoft Azure AD (currently disabled for build)

📦 Installation

Prerequisites

  • Node.js 16+ and npm
  • Google Cloud SDK (gcloud CLI)
  • Access to Google Cloud Project: optical-brandtech
  • MAMP or similar local web server (for development)

1. Clone and Setup

git clone git@bitbucket.org:zlalani/btg-sandbox-index.git
cd btg-sandbox-index

2. Set Up Google Cloud Storage

# Set your project
export PROJECT_ID="optical-brandtech"
gcloud config set project $PROJECT_ID

# Create the private video bucket
gsutil mb gs://optical-brandtech-videos
gsutil acl set private gs://optical-brandtech-videos

# Create service account for video access
gcloud iam service-accounts create brandtech-video-service \
    --description="Service account for brandtech sandbox video access" \
    --display-name="Brandtech Video Service"

# Grant permissions
gcloud projects add-iam-policy-binding $PROJECT_ID \
    --member="serviceAccount:brandtech-video-service@$PROJECT_ID.iam.gserviceaccount.com" \
    --role="roles/storage.objectViewer"

# Create service account key
gcloud iam service-accounts keys create ./video-api/brandtech-video-key.json \
    --iam-account=brandtech-video-service@$PROJECT_ID.iam.gserviceaccount.com

# Set up CORS for development
cat > cors.json << 'EOF'
[
  {
    "origin": ["http://localhost:*", "http://127.0.0.1:*", "file://"],
    "method": ["GET", "HEAD", "OPTIONS"],
    "responseHeader": ["Content-Type", "Content-Range", "Accept-Ranges"],
    "maxAgeSeconds": 3600
  }
]
EOF

gsutil cors set cors.json gs://optical-brandtech-videos

3. Upload Training Videos

# Download videos from SharePoint first, then upload all at once
gsutil -m cp "/path/to/videos/"*.{mov,mp4} gs://optical-brandtech-videos/

4. Start the Video API Server

cd video-api
npm install
npm start

The API server will run on http://localhost:3001

5. Serve the Frontend

Use MAMP or any web server to serve the main directory. The page should be accessible at your local development URL.

🎬 Video System

How It Works

  1. Secure Storage: Videos are stored in a private GCS bucket
  2. API Endpoint: Node.js server generates presigned URLs (valid for 2 hours)
  3. Modal Player: Videos open in a responsive modal with full controls
  4. No Downloads: Videos stream directly in the browser

Video API Endpoints

  • GET /api/health - Health check
  • GET /api/videos - List all available videos
  • GET /api/video/:videoName - Get presigned URL for specific video

Adding New Videos

  1. Upload video to GCS bucket: gsutil cp video.mov gs://optical-brandtech-videos/
  2. Add mapping in video-api/server.js videoMap object
  3. Add link in HTML with data-video="video-name" attribute
  4. Restart API server

🔧 Available AI Tools

Row 1

  • LLM Chat - Multi-model AI chat interface
  • Image Generator Advanced - Advanced image creation and editing
  • Text to Speech 2.0 - Voice generation from text
  • Video Query - AI-powered video analysis

Row 2

  • Image Scale - AI-powered image upscaling
  • Topaz Video Upscaler 2.0 - Video resolution enhancement
  • Vivid Alt Text Generator - Accessibility text generation
  • Render Mermaid Charts - Diagram and flowchart creation

Row 3

  • Markdown to HTML Formatter - Document formatting
  • Video Subtitle Generator - Automatic subtitle creation
  • Clipping Magic - Background removal from images
  • Sound Effects - AI-generated audio effects

⚠️ Security Notice

IMPORTANT: Authentication is currently DISABLED for build/development purposes.

  • Microsoft Azure AD authentication is commented out
  • All content is publicly accessible
  • Security features are hidden in HTML comments
  • Re-enable authentication before production deployment

To Re-enable Security:

  1. Uncomment MSAL script includes in index.html
  2. Uncomment authentication buttons and login flow
  3. Change #protected-content { display: flex; } back to display: none;
  4. Uncomment authorization.js script reference
  5. Update CORS settings for production domain

🌐 Deployment

Development

  • Use MAMP or similar local server
  • API runs on localhost:3001
  • Videos served via presigned URLs

Production

  • Deploy frontend to web hosting service
  • Deploy API server to cloud platform (Google Cloud Run, etc.)
  • Update CORS settings with production domain
  • Re-enable authentication system
  • Configure proper SSL certificates

📁 Project Structure

├── index.html              # Main landing page
├── assets/                  # Static assets (CSS, JS, images)
│   ├── css/                # Stylesheets
│   ├── js/                 # JavaScript files
│   └── img/                # Icons and images
├── video-api/              # Video streaming API
│   ├── server.js           # Express API server
│   ├── package.json        # Dependencies
│   └── brandtech-video-key.json  # GCS service account key
├── video-link-helper.js    # Frontend video handling
└── README.md              # This file

🤝 Contributing

This is a private sandbox environment. Changes should be tested locally before committing to the repository.

📞 Support

For issues or questions about the Brandtech Sandbox, please contact the development team.


⚠️ This is a development/testing environment - NOT FOR PRODUCTION USE