Technical Manual v1.8.8

Video Production
Management Platform

A self-hosted, fully offline platform covering the entire commercial video pipeline — from client discovery through delivery — in one unified system.

Read Documentation
Request a Test Session

1. Overview

What is XteVision Producer and who is it for?

1.1 What is XteVision Producer?

XteVision Producer (formerly VidPro) is a fully offline, self-hosted video production management platform that covers the entire commercial video pipeline — from client discovery through delivery — in one unified system. No external services, no cloud dependency, runs on local hardware.

1.2 Key Capabilities

  • Full pipeline coverage: Pre-Production → Production → Post-Production → Delivery → Client Management
  • Client CRM: Pipeline stages (LEAD→ACTIVE), communication log, contact management
  • Budget engine: 11 line-item categories, contingency %, estimated vs actual, 9-currency conversion
  • Script & shot management: Scene-based screenplay, 12 shot types, 13 camera moves, storyboard
  • Production planning: Multi-day shooting scheduler, crew calls (19 roles), equipment booking, call sheets
  • Schedule & Gantt chart: Real-data interactive timeline with drag-to-resize, dependency arrows, zoom levels
  • Post-production tracker: Edit/Color/Sound/VFX pipeline, review cycles, picture lock
  • Delivery & archive: Mastering specs, platform optimization, QC, archive tracking
  • Invoicing: Estimates, deposits, progress, final invoices with line items, tax, print layout
  • AI Assistant: Configurable chatbot with database querying and weather forecast via tool calling
  • Weather Forecast: Live Open-Meteo integration — geocoding, daily forecast (temp, conditions, sunrise/sunset), locale-aware formatting (EN °F, DE/ZH °C), per-day data for multi-day shoots
  • AI Time Awareness: System prompt auto-injected with current server date/time/timezone for resolving relative dates ("tonight", "tomorrow", "this weekend")
  • Full i18n: English, Deutsch, 中文 — 500+ translation keys per language
  • Workspace backup: Full XLSX export/import with 34 tables and FK-safe ID remapping

1.3 Target Users

  • Primary: Small-to-medium video production companies (2–50 people) producing commercials, branded content, or documentaries
  • Secondary: Independent producers and freelance production coordinators managing multiple projects

1.4 Implementation Status

All 5 phases from the spec are implemented as of v1.8.3 (2026-07-25). The platform includes 49 API routes, 14 project tabs, 3 languages, 40+ database tables, and a redesigned glassmorphic UI with themeable accents. All routes are authenticated and workspace-isolated.

Remaining enhancements (not critical): Invoice PDF export with branding, responsive mobile UI, performance tracking (VTR/CTR), WebSocket real-time collaboration.

2. System Architecture

High-level design and communication flow

2.1 High-Level Architecture

┌─────────────────────────────────────────────────────────────────┐
│                         Browser (Client)                         │
│  ┌───────────────────────────────────────────────────────────┐  │
│  │              Next.js 16 (App Router)                       │  │
│  │  ┌────────┐ ┌──────────┐ ┌────────┐ ┌────────┐ ┌──────┐  │  │
│  │  │ Auth   │ │ Dashboard│ │Project │ │ Budget │ │Script│  │  │
│  │  │        │ │          │ │ Detail │ │        │ │      │  │  │
│  │  └────────┘ └──────────┘ └────────┘ └────────┘ └──────┘  │  │
│  │  ┌────────┐ ┌──────────┐ ┌────────┐ ┌────────┐ ┌──────┐  │  │
│  │  │ Shot   │ │ Shooting │ │Schedule│ │ Post-  │ │Invoice│  │  │
│  │  │ List   │ │ Day      │ │(Gantt) │ │Prod    │ │       │  │  │
│  │  └────────┘ └──────────┘ └────────┘ └────────┘ └──────┘  │  │
│  └───────────────────────────────────────────────────────────┘  │
└──────────────────────────────┬──────────────────────────────────┘
                               │ HTTP/REST API
┌──────────────────────────────┴──────────────────────────────────┐
│                    Next.js API Routes (Server)                    │
│  ┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐ ┌──────────────┐  │
│  │ Auth   │ │Project │ │ Budget │ │ Script │ │ AI Chat      │  │
│  │ Routes │ │ CRUD   │ │ Engine │ │ Editor │ │ + Tool Calls │  │
│  └────────┘ └────────┘ └────────┘ └────────┘ └──────────────┘  │
│  ┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐ ┌──────────────┐  │
│  │Export  │ │Upload  │ │Currency│ │  DB    │ │ Settings     │  │
│  │(XLSX)  │ │(files) │ │(API)   │ │ (pg)   │ │              │  │
│  └────────┘ └────────┘ └────────┘ └────────┘ └──────────────┘  │
└──────────────────────────────┬──────────────────────────────────┘
                               │
                    ┌──────────┴──────────┐
                    │  PostgreSQL 18.4     │
                    │  xtevision_producer  │
                    │  40+ tables, 14 enums │
                    └─────────────────────┘

2.2 Communication Flow

  1. Frontend → Backend: RESTful HTTP requests to Next.js API routes for all CRUD operations
  2. Backend → Database: Raw SQL queries via `pg` (Node.js driver) — parameterized, workspace-scoped
  3. Backend → AI Backend: OpenAI-compatible API calls to MLX, Ollama, LM Studio, or OpenRouter
  4. Frontend → AI: Streaming chat responses via SSE, tool calls for database queries

2.3 Deployment Model

XteVision Producer is designed for self-hosted, fully offline operation:

  • Runs as a standalone Node.js server on your own hardware
  • PostgreSQL on localhost, port 5432, database: xtevision_producer
  • All data stays on your local server — no cloud dependencies

3. Technology Stack

Frontend, backend, and infrastructure technologies

3.1 Frontend Technologies

TechnologyVersionPurpose
Next.js16 (App Router)React framework, SSR/SSG, API routes
Tailwind CSSv4Utility-first styling
TypeScript5.9Type safety
Lucide React-Icon library
next-intlv4Internationalization (EN/DE/ZH)
SheetJS (xlsx)0.18.5Workspace export/import

3.2 Backend & Infrastructure

TechnologyVersionPurpose
Next.js API Routes16REST API server
PostgreSQL18.4Primary database
pglatestNode.js PostgreSQL driver
Bcrypt / crypto.scrypt-Password hashing
ServerAny OSNode.js ≥ 20, PostgreSQL ≥ 14
BuildStandaloneSelf-contained Node.js server
Note: The database layer uses the pure Node.js pg driver (no native binaries), so it runs on any platform. Column names remain camelCase (quoted identifiers in SQL).

4. Installation & Setup

Get XteVision Producer running on your server

4.1 Prerequisites

  • PostgreSQL 18.4 running on the target server
  • Node.js (for running the standalone build)
  • Modern browser (Chrome/Edge/Firefox)
  • AI model server (optional, for AI Assistant features)

4.2 Install (3 steps)

Extract the package, run the one-command setup, and start the app. The setup script creates the database, applies the schema, generates a secure AUTH_SECRET, and writes your .env automatically.

# 1. Extract the package
mkdir -p /opt/xtevision
cd /opt/xtevision
tar zxvf xtevision-producer-build.tar.gz -C deploy/
cd deploy

# 2. One-command setup (creates DB, applies schema, writes .env)
./setup.sh

# 3. Start the app
sudo npm install -g pm2
pm2 start server.js --name xtevision-producer
pm2 save
pm2 startup   # follow the printed instructions to auto-start on boot

You can customise the setup with environment variables, e.g. DB_NAME=myproducer DB_PASS=mysecret APP_PORT=8080 ./setup.sh.

4.3 Access the Application

http://your-server-ip:3000

The app runs on port 3000 by default. To use a different port, set APP_PORT when running setup, or edit PORT in .env and restart.

4.4 First-Time Setup

  1. Register: Create the first admin account via the login/register page
  2. Configure workspace: Set company name, default currency, and locale in Settings
  3. Invite team: Add team members via Settings → Team Management
  4. Create projects: Start with a project brief and client information

4.5 Try the Example Workspace

The package includes Example_Workspace.xlsx — a ready-made demo workspace with 3 imaginary clients and a full project (brief, budget, script, shot list, shooting days, milestones, tasks, invoice, post-production, delivery), plus sample gear, talent, locations, crew, and vendors.

To import it and see the Total Recall feature in action, open Settings → Workspace → Import, select Example_Workspace.xlsx, and confirm. The import remaps all IDs automatically, so the demo data is fully self-contained and safe to import into any workspace. Explore it, then edit or delete the demo entries to make the workspace your own.

5. Application Structure

Directory layout and module organization

5.1 Directory Layout

XteVision-Producer/
├── src/
│   ├── app/
│   │   ├── [locale]/
│   │   │   ├── (main)/             # Authenticated pages
│   │   │   │   ├── dashboard/      # Dashboard stats + quick actions
│   │   │   │   ├── projects/       # Project list + detail (14 tabs)
│   │   │   │   ├── clients/        # Client CRM
│   │   │   │   ├── invoices/       # Invoice CRUD + detail/print
│   │   │   │   ├── crew/           # Crew roster
│   │   │   │   ├── vendors/        # Vendor management
│   │   │   │   ├── casting/        # Talent + locations
│   │   │   │   ├── inventory/      # Studio's & Gear
│   │   │   │   ├── calendar/       # Global calendar
│   │   │   │   └── settings/       # Company, team, profile
│   │   │   └── (auth)/             # Login, register
│   │   └── api/                    # 49 API route files
│   ├── components/                 # Shared UI components
│   │   ├── ui/                     # Button, input, pagination, etc.
│   │   ├── projects/               # Project tabs (14 feature modules)
│   │   ├── layout/                 # Sidebar, topbar
│   │   ├── ai/                     # Chat wizard FAB + modal
│   │   ├── budget/                 # Budget line items
│   │   ├── calendar/               # Calendar components
│   │   └── production/             # Production log components
│   ├── lib/                        # Shared library
│   │   ├── db.ts                   # pg query helper
│   │   ├── auth.ts                 # Session management
│   │   ├── currency.ts             # Currency conversion + formatting
│   │   ├── workspace-export.ts     # XLSX export builder
│   │   └── workspace-import.ts     # XLSX import parser
│   ├── i18n/                       # next-intl routing config
│   └── messages/                   # en.json, de.json, zh.json
├── migrations/                     # SQL migrations (001–013)
├── schema.sql                      # Full PostgreSQL schema
├── public/                         # Static assets, uploads, favicons
└── deploy/                         # Extracted standalone build

5.2 Project Detail Tabs (14)

#TabDescription
1BriefProject intake form: goals, audience, tone, KPIs, brand guidelines
2BudgetLine-item grid with 11 categories, contingency %, multi-currency conversion
3ScriptScene-based screenplay editor with metadata extraction
4Shot List12 shot types, 13 camera moves, 11 lenses, auto-generate from script
5StoryboardVisual grid with image upload, drag-to-reorder, pacing timeline
6Shooting DaysMulti-day planner with crew calls, equipment booking, dependencies
7Call SheetPrintable crew/location/equipment summary from shooting day data
8CalendarProject-scoped monthly view, multi-day shoots span all days
9ScheduleInteractive Gantt chart with real data, drag-to-resize, dependency arrows
10Production LogDaily report, camera log (A–D), DIT checksum, continuity notes
11Post-ProductionEdit/Color/Sound/VFX pipeline, review cycles, picture lock
12DeliveryMastering specs, platform optimization, QC, archive
13Milestones & TasksDue dates, phases, dependencies, priority, completion counters
14CommunicationEmail/Phone/Meeting/Note entries per client, scoped to project

6. Commercial Video Pipeline

The five production phases covered end-to-end

6.1 Phase 1: Pre-Production

Planning and creative foundation for every project.

Sub-stepFeature
Client Discovery & BriefingStructured intake form: goals, audience, tone, KPIs, brand guidelines
Creative Concept & ScriptingScene-based screenplay editor with metadata extraction; auto-generate shot lists
Budget & TimelineInteractive budgeting engine with line-item breakdown, contingency %, multi-currency
Casting & Location ScoutingTalent profiles with rates, location database with permits and insurance
StoryboardingVisual shot list builder with image upload, camera move annotations, pacing timeline
Crew & Vendor AssemblyCrew roster with 19 roles, vendor management, contract storage
SchedulingCall sheet generation, multi-day shoot planning, weather data, dependency tracking

6.2 Phase 2: Production

Execution and on-set management during the shoot.

Sub-stepFeature
Set/Location PrepScouting checklist, permits tracker, power/Wi-Fi/safety verification
Production LogsDaily report, camera log (multi-cam A–D), DIT checksum, continuity notes
On-Set DirectionDirector/1st AD/script supervisor role assignments and task tracking
Capture ManagementCamera logs, lighting/audio setup docs, B-roll tracking, pick-ups
Talent ManagementDirection notes, continuity tracking, call times, wardrobe/props
DIT & Daily BackupCard offload logging, checksum verification, daily dailies tracking
Wrap & InventoryEquipment return tracking, location restore confirmation, asset log

6.3 Phase 3: Post-Production

Editing, polish, and client approval workflow.

Sub-stepFeature
Post-Production TrackerEdit/Color/Sound/VFX pipeline with department notes and status overview
Edit WorkflowNot Started → Rough Cut → Fine Cut → Picture Lock with lock/unlock timestamp
Color GradingCreative look notes, exposure correction logs, brand consistency checklist
Sound Design & MixingFoley/ambience/ADR tracking, music licensing, final mix specs
VFX / Motion GraphicsCompositing/titles/lower thirds/animation task tracking
Client Review CyclesScreenings with feedback tracking, revision rounds, approval status
Final MasteringCodec/resolution/frame rate/loudness standards configuration

6.4 Phase 4: Delivery & Distribution

Platform-ready output and long-term archive.

Sub-stepFeature
Platform OptimizationMulti-select aspect ratios (16:9, 9:16, 1:1, Cinema), subtitle languages
Quality ControlQC pass/fail toggle, delivery date tracking, format verification
Delivery TrackerCodec, resolution, frame rate, loudness standard (-24 LUFS) selection
Archive & StorageArchive path, delivery notes, retention policy tracking

6.5 Phase 5: Client & Project Management

Keeps the pipeline transparent and on-track throughout.

Sub-stepFeature
Client CRMPipeline stages (LEAD→ACTIVE), contact info, communication history
Milestone TrackingDue dates, status (Pending/In Progress/Completed/Blocked), phase assignment
Task ManagementTitle, status, priority (Low→Urgent), assignee, dependency tracking
Communication LogEmail/Phone/Meeting/Note entries per client, scoped to project
Legal Releases5 release types, sign-now with timestamp + document hash, audit trail
InvoicingEstimates/deposits/progress/final, line items, tax, status workflow
SettingsCompany profile, team management, workspace members + roles

7. Core Features

Key platform capabilities

14 Project Tabs

Brief, Budget, Script, Shot List, Storyboard, Shooting Days, Call Sheet, Calendar, Schedule, Production Log, Post-Production, Delivery, Milestones & Tasks, Communication.

Budget Engine

11 line-item categories with contingency %, estimated vs actual, multi-currency conversion via live Frankfurter API rates. 9 currencies supported.

Interactive Schedule

Real-data Gantt chart pulling from ShootingDay, Milestone, and Task tables. Drag-to-move/resize, orthogonal dependency arrows, Month/Week/Day zoom, localStorage-first persistence.

Call Sheet & Invoice Print

Printable call sheets from shooting day data (crew sorted by call time, location, equipment). Invoice print layout hides sidebar/topbar for A4 output.

Weather Forecast

Live Open-Meteo integration with geocoding. Daily forecast (temperature, conditions, sunrise/sunset) for shooting days. Per-day weather data for multi-day shoots. Locale-aware formatting (EN °F, DE/ZH °C). Fetch Weather button on each shooting day.

AI Assistant

Floating chat button with draggable/resizable modal. Configurable backend (MLX, LM Studio, Ollama, Copilot, OpenRouter). Database querying via tool calling.

Trilingual i18n

English, Deutsch, 中文 — 500+ translation keys per language. Full UI translation including DB task names translated on frontend via position-matched arrays.

Workspace Backup (XLSX)

Full workspace export to Excel (.xlsx) with 34 tables in FK-safe order. Import recreates all records with new UUIDs and preserves relationships via ID remapping.

Global Calendar

Aggregates shooting days + milestones across all projects. Color-coded per project. Multi-day events span all days. Clickable events navigate to project tabs.

Workspace Isolation

All 49 API routes authenticated + workspace-scoped. Security audit passed. Session-based auth with crypto.scrypt passwords and signed cookies.

8. Module Details

In-depth feature documentation

8.1 Authentication & Workspace

Custom session-based auth using crypto.scrypt for password hashing and signed session cookies. Each user belongs to a workspace with RBAC roles (Admin, Producer, Crew, Client-Viewer, Accountant).

  • Login/Register: Email/password authentication with session cookies
  • Workspace switching: Multi-workspace support for production companies
  • Team management: Invite members, assign roles via Settings → Team
  • Workspace isolation: All queries filtered by workspaceId

8.2 Dashboard

Overview page with key metrics and quick actions:

  • Stats cards: total projects, active clients, inventory items, upcoming deadlines
  • Shooting days within next 7 days across all projects
  • Quick action links for common tasks

8.3 Client CRM

Full client relationship management with pipeline stages:

  • Pipeline stages: LEAD → QUALIFIED → PROPOSAL → NEGOTIATION → ACTIVE
  • Client CRUD with contact details, company info, communication history
  • Communication log linked to each client
  • Project-edit client fields with upsert logic

8.4 Budget Engine

Interactive budgeting with comprehensive financial controls:

  • 11 categories: CREW, TALENT, GEAR, LOCATION, TRAVEL, POST-PRODUCTION, MUSIC, INSURANCE, LEGAL, CONTINGENCY, MISC
  • Category-driven dropdowns: CREW/TALENT/GEAR selections auto-populate from real DB data with rate and unit pricing
  • Multi-currency: 9 currencies (USD, CNY, EUR, GBP, HKD, CAD, NZD, AUD, SGD) with live Frankfurter API rates
  • Contingency %: Auto-calculated contingency on subtotal
  • Estimated vs actual: Track budget adherence
  • Display-only conversion: Switching currency recalculates totals instantly; original values preserved

8.5 Script Editor

Scene-based screenplay management:

  • Scene CRUD with metadata (characters, props, location, scene number)
  • Status workflow: Draft → In Review → Approved → Locked
  • Auto-generate shot list from script scenes

8.6 Shot List

Comprehensive shot planning with industry-standard options:

  • 12 shot types: Close-Up, Medium, Wide, Extreme Wide, Over-the-Shoulder, POV, Two-Shot, Insert, Cutaway, Tracking, Crane, Aerial
  • 13 camera moves: Pan, Tilt, Dolly In/Out, Truck Left/Right, Pedestal Up/Down, Zoom In/Out, Rack Focus, Handheld, Steadicam, Gimbal
  • 11 lenses: 18mm, 24mm, 35mm, 50mm, 85mm, 100mm, 135mm, 200mm, 24-70mm, 70-200mm, 100-400mm
  • Auto-generate template from script scenes
  • Client-side pagination (10/25/50/100)

8.7 Storyboard

Visual shot planning with image uploads:

  • Visual grid with drag-to-reorder
  • Server-side image upload (file-based, not base64) — fixes body size limits
  • Pacing timeline overview
  • Scene number badge ("Sc N") displayed in info section
  • Shot list ↔ storyboard sync: sceneId preserved across saves

8.8 Shooting Day Planner

Multi-day production planning with full resource management:

  • Multi-day support: startDate + endDate (migration 010), auto-increment dates
  • 19 crew roles: Director, DP, 1st AD, 2nd AD, Sound Mixer, Gaffer, Key Grip, Production Designer, Script Supervisor, Makeup, Wardrobe, BTS, stills, Data Wrangler, DIT, Set PA, Production Coordinator, Craft Service, Medic
  • Crew dropdown: Select from crew roster with auto-fill role
  • Equipment booking: Per-shooting-day gear reservation from inventory
  • Scene assignment: Link scenes to shooting days for planning
  • Dependency tracking: "Depends On" dropdown for shooting day ordering
  • Calendar integration: Multi-day shoots span all days in range

8.9 Call Sheet

Printable production document generated from shooting day data:

  • Crew members sorted by call time
  • Location details, equipment list, scene schedule
  • Print CSS hides sidebar/topbar for clean output

8.10 Calendar & Schedule

Two complementary views for production timeline management:

Calendar

  • Project-scoped monthly view + global calendar aggregating all projects
  • Multi-day shooting events span all days in range
  • Color-coded per project in global view
  • Clickable events → navigate to Shooting Days/Schedule tab
  • Aggregates milestones across projects

Schedule (Gantt Chart)

  • Real-data driven: pulls from ShootingDay, Milestone, and Task tables
  • Drag-to-move/resize bars with date persistence (PATCH API)
  • Month/Week/Day zoom levels
  • Orthogonal 90° dependency arrows with right-click context menu
  • localStorage-first persistence ensures arrows survive tab switches
  • Collapsed phase summary bars show hidden event ranges
  • Double-click any event to navigate to its edit tab

8.11 Production Logs

On-set documentation with 4 sub-sections:

  • Daily Report: General production notes per day
  • Camera Log: Multi-cam tracking (A–D) with media details
  • DIT Log: Checksum verification, card offload tracking
  • Continuity Notes: Script continuity tracking

8.12 Post-Production Tracker

End-to-end post-production pipeline:

  • Edit Workflow: Not Started → Rough Cut → Fine Cut → Picture Lock
  • Lock/unlock with timestamp tracking
  • Color Grading: Creative look notes, brand consistency checks
  • Sound Design: Foley/ambience/ADR tracking, music licensing
  • VFX: Compositing, titles, lower thirds, animation task tracking
  • Client Review Cycles: Revision rounds with status and feedback

8.13 Delivery Tracker

Final output specifications and distribution:

  • Codec, resolution, frame rate, loudness standard selection (-24 LUFS broadcast)
  • Platform optimization: multi-select aspect ratios (16:9, 9:16, 1:1, Cinema)
  • Subtitle languages configuration
  • QC pass/fail toggle with delivery date tracking
  • Archive path and delivery notes

8.14 Milestones & Tasks

Project management with dependency tracking:

  • Milestones: Due dates, status (Pending/In Progress/Completed/Blocked), phase assignment
  • Tasks: Title, status, priority (Low→Urgent), due date, assignee, phase
  • Dependency tracking for both milestones and tasks
  • Completion counters per phase
  • Client-side pagination

8.15 Communication Log

  • Email/Phone/Meeting/Note entries per client
  • Scoped to individual projects
  • Client-side pagination

8.16 Legal Releases

  • 5 release types: Talent, Location, Music, Photo, General
  • Sign-now with timestamp + document hash audit trail
  • Client-side pagination

8.17 Invoicing

  • Invoice types: Estimate, Deposit, Progress, Final
  • Line items with tax handling
  • Status workflow: DRAFT → SENT → PAID
  • Detail view with print layout (A4, hides sidebar/topbar)
  • Multi-currency support

8.18 Crew, Vendors, Casting & Locations

Crew

  • Roster with roles, rates, contact info
  • CRUD with edit/delete
  • Linked to shooting day crew calls
  • Currency-aware rate display

Vendors

  • Vendor management with contact details
  • CRUD operations

Casting (Talent)

  • Talent profiles with rates, roles
  • Fee input with currency symbol
  • CRUD operations

Locations

  • Location database with permits, insurance tracking
  • Contact persons, address details
  • CRUD operations

8.19 Studio's & Gear (Inventory)

  • 12 equipment categories: Cameras, Recording Media, Audio Gear, Lenses, Drones, Dolly & Tracking, Sliders, Gimbals, Lighting, Grip & Rigging, Location-Specific, Misc
  • Condition tracking (New/Good/Fair/Poor)
  • Per-shooting-day equipment booking
  • Inline edit/delete per item
  • Client-side pagination

8.20 Settings

  • Company Profile: Company name, default currency, locale
  • Team Management: Workspace members with roles, invite flow
  • User Profile: Name, email, password, locale
  • Backup & Restore: XLSX export/import (admin/producer only)
  • AI Configuration: Backend URL, model, system prompt

9. AI Integration

Configurable AI Assistant with database querying

9.1 AI Chat Wizard

Floating AI Assistant available on all pages:

  • FAB button: Fixed bottom-right position, visible on all pages
  • Draggable modal: Grab header to reposition on desktop
  • Resizable modal: Bottom-right corner handle, 360×400 min size
  • Configurable backend: MLX, LM Studio, Ollama, Copilot, OpenRouter
  • Custom system prompt: Set per workspace in Settings
  • Powered-by footer: Displays current backend + model
  • Reset chat: Refresh icon to clear conversation

9.2 AI Database Tool Calling

The AI Wizard can query the workspace PostgreSQL database directly:

  • OpenAI-compatible tools: Uses tools/tool_calls protocol
  • query_database tool: SELECT-only with safety checks — blocked DDL/DML
  • 200-row limit: Prevents excessive data retrieval
  • 10-second timeout: Prevents long-running queries
  • Full DB schema awareness: System prompt auto-enhanced with 43 table schemas
  • Workspace isolation: Queries auto-inject workspaceId as parameter
  • Max 10 rounds: Prevents infinite tool-calling loops
Example queries: "What's the project status?", "How many crew are booked for next week?", "Show me gear bookings for this month."

9.3 AI Weather Tool Calling

The AI Wizard can fetch live weather forecasts via the Open-Meteo API:

  • get_weather_forecast tool: Geocodes city names to coordinates, fetches daily forecast
  • Returns: Temperature (max/min), weather conditions, sunrise/sunset times
  • Locale-aware formatting: EN in °F with 12-hour time, DE/ZH in °C with 24-hour time
  • Relative date resolution: System prompt includes current server time — AI resolves "tonight", "tomorrow", "this weekend" correctly
  • Source attribution: Every response includes "Data: Open-Meteo (api.open-meteo.com)" and the technical API endpoint URL
  • Data source: Free open-data REST API, no API key required
Example queries: "Will it rain tonight in Kunshan?", "What's the weather for our shoot in Shanghai this weekend?", "What's the temperature tomorrow in Berlin?"

9.4 Supported AI Backends

BackendDefault URLPortNotes
MLXyour-ai-server-ip5010Apple Silicon, best privacy
LM Studioyour-ai-server-ip1234Local GGUF models
Ollamayour-ai-server-ip11434Popular local models
Copilotyour-ai-server-ip5015GitHub Copilot bridge
OpenRouteropenrouter.ai443Third-party gateway

10. Deployment

Run and manage the platform on your server

10.1 Requirements

  • Node.js v20+
  • PostgreSQL v14+
  • pm2 (optional but recommended) — sudo npm install -g pm2

10.2 Start the App

cd /opt/xtevision/deploy
pm2 start server.js --name xtevision-producer
pm2 save
pm2 startup   # follow the printed instructions to auto-start on boot

Without pm2, run ./start.sh directly, or keep it running in the background with nohup ./start.sh > app.log 2>&1 &.

10.3 Environment Variables

VariableValueDescription
DATABASE_URLpostgresql://producer:<password>@localhost:5432/xtevision_producer?schema=publicPostgreSQL connection (dedicated producer user)
PORT3000Server port
HOSTNAME0.0.0.0Listen on all interfaces
AUTH_SECRET64-char hexSession signing secret (auto-generated by setup)
NEXT_PUBLIC_APP_NAMEXteVision ProducerApplication name
NEXT_PUBLIC_DEFAULT_LOCALEenDefault language

These are written to .env automatically by setup.sh. Edit .env to change them, then restart the app.

10.4 Upgrading to a New Version

pm2 stop xtevision-producer
cp .env /tmp/xv-env.bak
cp -r uploads /tmp/xv-uploads.bak
rm -fr deploy && mkdir deploy
tar zxvf xtevision-producer-build.tar.gz -C deploy/
cp /tmp/xv-env.bak deploy/.env
cp -r /tmp/xv-uploads.bak deploy/uploads
pm2 start xtevision-producer

Then apply any new database migrations included in the package:

cd deploy
for f in migrations/*.sql; do
  echo "Applying $f"
  psql "$(grep DATABASE_URL .env | cut -d'=' -f2- | tr -d '"')" -f "$f"
done

11. API Reference

Complete REST API endpoint inventory

11.1 Route Overview

All 49 API routes are authenticated and workspace-scoped. Every route calls requireAuth() and filters queries by workspaceId.

CategoryRoutesMethods
Auth/api/auth/login, /register, /logout, /me, /workspacePOST, GET
Dashboard/api/dashboard/statsGET
Projects/api/projects, /api/projects/[id]GET, POST, PUT, DELETE
Clients/api/clients, /api/clients/[id]GET, POST, PUT, DELETE
Budget/api/projects/[id]/budgetGET, PUT
Script/api/projects/[id]/scenes, .../[sceneId]GET, POST, PUT, DELETE
Shot List/api/projects/[id]/shotsGET, PUT
Storyboard/api/projects/[id]/storyboard, .../storyboard-uploadGET, PUT, POST
Shooting Days/api/projects/[id]/shooting-daysGET, PUT
Call Sheet/api/projects/[id]/call-sheetGET
Calendar/api/projects/[id]/calendar, /api/calendar/globalGET
Schedule/api/projects/[id]/ganttGET, PATCH
Production Log/api/projects/[id]/production-logGET, PUT
Post-Production/api/projects/[id]/post-productionGET, PUT
Delivery/api/projects/[id]/deliveryGET, PUT
Milestones/api/projects/[id]/milestonesGET, PUT
Tasks/api/projects/[id]/tasksGET, PUT
Communication/api/projects/[id]/communicationGET, PUT
Legal Releases/api/projects/[id]/legal-releasesGET, PUT
Invoices/api/invoices, /api/invoices/[id]GET, POST, PUT, DELETE
Crew/api/crewGET, POST, PUT, DELETE
Vendors/api/vendorsGET, POST, PUT, DELETE
Casting/Talent/api/casting/talentGET, POST, PUT, DELETE
Locations/api/casting/locationsGET, POST, PUT, DELETE
Inventory/api/inventory, /api/inventory/[id]GET, POST, PUT, DELETE
Equipment Booking/api/projects/[id]/equipment-bookingGET, PUT
Settings/api/settings, /api/settings/teamGET, PUT
AI Chat/api/ai/chatGET, POST
Weather Forecast/api/weather/forecast?location=...&startDate=...&endDate=...GET
Currency/api/currency/ratesGET
Uploads/api/uploads/[...path]GET
Workspace/api/workspaces/[id], /api/workspaces/[id]/exportGET, PUT, DELETE
Workspace Import/api/workspaces/importPOST

12. Changelog

Version history and release notes

v1.8.3 — 2026-07-25

  • Glassmorphic UI Redesign: Complete visual overhaul inspired by DRYL Components — translucent glass surfaces, backdrop blur, themeable accent gradients (7 presets + custom colors).
  • Theme System: Settings → Theme tab with accent color picker (Nebula, Ember, Verdant, Mono, Ocean, Cherry, Midnight), custom hex colors, and light/dark/system mode toggle. Persisted in localStorage.
  • Aurora Ambient Glow: Slow-drifting accent-colored background orbs (violet + cyan) visible through glass surfaces.
  • Compact Form Fields: All inputs, selects, textareas, and buttons reduced to 12px with tighter padding for a high-density, professional look.
  • Help Manual: Help icon now opens the manual in a new browser tab instead of an inline modal, avoiding Safari positioning issues with fixed overlays.
  • Shooting Days Foldable: Each shooting day card is now collapsible (click header to toggle), matching the Script and Shot List pattern.
  • Settings Tabs Scrollable: Tab bar now scrolls horizontally on narrow screens — Theme tab accessible on iPhone.
  • Version bump: v1.0.2 → v1.8.3

v1.0.2 — 2026-07-15

  • AI Chat — Time Awareness: System prompt auto-injected with current server date/time/timezone. AI now resolves relative dates ("tonight", "tomorrow", "this weekend") for weather queries and deadlines.
  • Weather Source Attribution: Every weather response includes "Data: Open-Meteo (api.open-meteo.com)" and the technical API endpoint URL. Calendar view shows "Weather: Open-Meteo" footer.
  • Per-Day Weather Data: Multi-day shooting days store per-day forecasts in new weatherData JSONB column (migration 024). Calendar now shows correct weather for each individual date, not just the first day's data.
  • Weather Tool Calling: AI Wizard can fetch live weather forecasts via get_weather_forecast tool. Geocoding + locale-aware formatting with source attribution.
  • Help Manual: Top bar help icon (?) opens the Technical Manual in a full-screen modal. Manual copy served from public/XteVision_Producer_Manual.html.
  • Database user change: Migrated from postgres to dedicated producer role (migration 023).
  • Weather Documentation: Added weather forecast and AI weather tool calling to docs/overview.md and docs/how-to.md.
  • Version bump: v1.0.1 → v1.0.2

v1.0.1 — 2026-07-11

  • Workspace Backup (XLSX Export/Import): Full workspace export to Excel (.xlsx) with 34 tables in FK-safe order. Import recreates all records with new UUIDs, preserves relationships via ID remapping, and creates placeholder user accounts for workspace members. Accessible via Settings → Backup & Restore.
  • New dependency: xlsx (SheetJS) — pure JS, architecture-agnostic
  • New routes: GET /api/workspaces/[id]/export, POST /api/workspaces/import

v0.9.0 — 2026-07-10

  • Live Currency Conversion: Budget page converts all line items on-the-fly using live Frankfurter API rates. 9 currencies (USD, CNY, EUR, GBP, HKD, CAD, NZD, AUD, SGD). Centralized src/lib/currency.ts. Display-only conversion — original values preserved.
  • New route: GET /api/currency/rates with 6-hour server-side caching
  • Settings page currency dropdown extended to 9 currencies
  • Crew, Casting, and Inventory pages use centralized currency formatting

v0.7.0 — 2026-07-09

  • AI Database Tool Calling: AI Wizard queries PostgreSQL via query_database tool. SELECT-only, 200-row limit, 10s timeout, full DB schema awareness, workspace-isolated.
  • Schedule (Gantt Chart): Renamed from "Gantt Chart" to "Schedule". Real-data from ShootingDay/Milestone/Task. Drag-to-move/resize, dependency arrows, zoom levels, localStorage-first persistence.
  • Multi-day shooting days: startDate + endDate support, auto-increment dates, calendar multi-day span.
  • Dependency tracking: Milestones, Tasks, Shooting Days all support dependsOn.
  • Client-side pagination: Added to 10 tabs (Script, Shot List, Storyboard, Shooting Days, Production Log, Milestones & Tasks, Communication Log, Releases, Studio's & Gear, Invoices).
  • Storyboard image fix: server-side file upload replaces base64 storage.
  • Shot list ↔ storyboard sync: sceneId preserved, scene number badge displayed.

v0.5.0 — 2026-07-07

  • Branding overhaul: XteVision logo, app renamed to "Producer", version + copyright footer.
  • Gantt Chart: Interactive timeline with 4 phases, 29 default tasks, dependency chains, SVG arrows.
  • Full CRUD: Project edit/delete modal, inventory inline edit/delete, workspace danger zone delete.
  • Inventory renamed to "Studio's & Gear".
  • Calendar linking: shooting days clickable → navigate to Schedule tab.

v0.4.0 — 2026-07-05

  • All 5 phases complete — full pipeline from briefing to delivery.
  • Post-Production tracker, Delivery tracker, Milestones & Tasks, Communication log, Legal releases.
  • Global calendar, dashboard deadlines, crew dropdown, invoice print CSS.
  • Security audit: fixed 7 handlers with missing workspace isolation.
  • ~120 new i18n keys across EN/DE/ZH.

v0.3.0 — 2026-07-05

  • Production Log (4 sub-sections), Storyboard view, Equipment booking, Crew call sheet, Scene assignment.
  • Migrations 006–008 for shot images, scene planning, production phase.

v0.2.5 — 2026-07-04

  • Invoicing system, Crew & Vendor management, Casting & Locations, Inventory management, Settings page.

v0.2.0 — 2026-07-03

  • Prisma removed, replaced with pg (raw SQL). Session-based auth with crypto.scrypt.
  • Auth data migration for existing workspace records.

v0.1.5 — 2026-07-02

  • Shot list generator, Shooting day planner, Calendar view, Client CRM, i18n complete (EN/DE/ZH).

v0.1.0 — 2026-07-01

  • Project scaffolding (Next.js 16, Tailwind v4, TypeScript 5.9), Auth system, Dashboard, Project management, Budget engine, Script editor, Database schema, Cross-build pipeline.

v0.0.0 — 2026-07-01

  • Initial project scaffold created from spec-first workflow. Spec document: vidpro-spec.md covering all 5 production phases.

13. Troubleshooting

Common issues and solutions

13.1 Server Won't Start

  • Issue: EADDRINUSE error on the configured port
  • Solution: Kill the existing process with kill $(lsof -ti:3000) (use your port), or change PORT in .env.

13.2 Database Connection Failed

  • Issue: "Connection refused" to PostgreSQL
  • Solution: Verify PostgreSQL is running: systemctl status postgresql. Check DATABASE_URL in .env. Ensure the xtevision_producer database exists. Re-run ./setup.sh to fix the role/database.

13.3 Data Not Visible After Auth

  • Issue: All pages show empty after login
  • Solution: Each account gets its own workspace. If you expected to see data, make sure you are logged into the correct workspace (switch via the workspace menu).

13.4 pm2 Not Found

  • Issue: Command 'pm2' not found
  • Solution: Install it with sudo npm install -g pm2. If npm is unavailable, run the app directly with ./start.sh or nohup ./start.sh > app.log 2>&1 &.

13.5 Storyboard Images Not Showing

  • Issue: Images missing after save
  • Solution: Verify the uploads/<projectId>/ directory exists and has write permissions. Check the upload API route is working.

13.6 AI Chat Not Responding

  • Issue: "Connection refused" or no response from AI
  • Solution: Ensure the AI backend server is running on the configured host/port. Verify backend URL and model settings in Settings → AI Configuration.

13.7 Currency Rates Not Loading

  • Issue: Budget spinner never resolves
  • Solution: Check internet connectivity (Frankfurter API requires internet). The server-side 6-hour cache serves stale rates on fetch failure.