A web-based seating assignment tool that automatically assigns seats to orders using a best-available algorithm with orphan seat prevention.
🔗 Live Application: https://hongyanhuang.github.io/seating-agent/
- 🎟️ Upload CSV file with orders
- 🪑 Multiple seating plan input methods (paste JSON or upload multiple files)
- ✅ Duplicate seat detection across all seating plans
- 🎯 Best-available algorithm (assigns largest orders first)
- 🚫 Orphan seat prevention (never leaves exactly 1 seat in a row)
- 📊 Export processed CSV with seat assignments
- 💾 Download remaining seats as JSON
- 🔒 100% client-side processing (no data leaves your browser)
- 🛠️ Built-in XLSX/CSV to JSON converter tool
- Click or drag-and-drop your CSV file containing orders
- Preview the first 5 rows to verify the data
- Select which column contains the ticket quantity by clicking the radio button
CSV Requirements:
- Must have a header row
- Include a column with ticket quantities (numbers)
- Can contain any additional columns (customer info, order ID, etc.)
You have two options:
Paste your seating plan JSON directly into the textarea.
Format:
[
["A-1--2---1", "A-1--2---2", "A-1--2---3"],
["B-1--3---1", "B-1--3---2"]
]Rules:
- Each inner array = one group of consecutive seats
- Seat format:
ZONE-SECTION--ROW---SEAT- Example:
A-1--2---3means Zone A, Section 1, Row 2, Seat 3
- Example:
- Select "Upload Files" mode
- Click "Choose File" to upload one or more JSON files
- Upload files from different folders as needed (can upload multiple times)
- Review the uploaded files list:
- Files are numbered (#1, #2, #3...) showing merge order
- Each file shows seat count
- Click × to remove individual files
- Click Clear All to start over
- When ready, click "Upload Finished - Merge & Validate"
- Files will be merged in order: File #1 + File #2 + File #3...
Why use multiple files?
- Different zones/sections in separate files
- Easier management of large venues
- Combine files from different sources
Click "Use the Transformer Tool →" in Step 2 to access the built-in converter:
- Upload your XLSX or CSV file with seating data
- Select data orientation (by row or by column)
- Drag to select which columns/rows contain:
- Header row/column
- Where data starts
- Row ID column/row
- Zone, Section, and Seat number columns/rows
- Download individual JSON files (named automatically as
Zone_X_Section_Y.json) - Upload the JSON files back to the main page
Duplicate Detection:
- System automatically detects duplicate seats
- Same seat cannot appear multiple times (even across different files/rows)
- Invalid files are highlighted in red with error messages
- Click "Process Seat Assignments"
- Review the results:
- ✅ Successfully assigned orders
- ❌ Unassigned orders (if any)
- 📊 Remaining available seats
- Download options:
- Download Processed CSV: Original CSV + new seat columns
- Download Remaining Seats (JSON): Unassigned seats for future use
Your original CSV will have these new columns added:
raw_data: JSON array of assigned seatszone1, section1, row1, seat1: First ticket detailszone2, section2, row2, seat2: Second ticket details- ... (continues based on maximum order quantity)
Example: If Order #1 requested 3 tickets and was assigned seats A-1--2---1, A-1--2---2, A-1--2---3:
raw_data: ["A-1--2---1","A-1--2---2","A-1--2---3"]
zone1: A section1: 1 row1: 2 seat1: 1
zone2: A section2: 1 row2: 2 seat2: 2
zone3: A section3: 1 row3: 2 seat3: 3
Unassigned orders will have empty values for all seat columns.
The system uses a best-available algorithm with orphan seat prevention:
- Sort orders by quantity (largest first)
- Larger groups are harder to seat, so they get priority
- For each order:
- Find the first row with enough consecutive available seats
- Check: Would this assignment leave exactly 1 seat in the row?
- If YES → Skip this row (orphan prevention), try next row
- If NO → Assign the seats and mark them as used
- Repeat until all orders are processed
Orphan Seat Prevention Example:
- Row has 5 available seats:
[1, 2, 3, 4, 5] - Order requests 4 seats
- Assignment would leave exactly 1 seat → SKIP this row
- Try next row instead
This ensures no single seats are left stranded, maximizing the usability of remaining seats.
- ✅ 100% client-side processing - All calculations happen in your browser
- ✅ No data uploaded to servers - Your CSV and seating data never leave your computer
- ✅ No tracking or analytics - Completely private
- ✅ Works offline - Once loaded, works without internet (except CDN resources)
Works on all modern browsers:
- Chrome/Edge ✅
- Firefox ✅
- Safari ✅
- Any browser with JavaScript enabled
Main tool for assigning seats to orders
Convert XLSX/CSV seating data to JSON format
- Supports both row-based and column-based data layouts
- Drag-and-drop column/row selection
- Handles "Kill" seats (excluded from output)
- Groups consecutive seats automatically
- Downloads with custom filenames
Made by HY Huang while travelling in 🏛️, 🇬🇷