Portal Technical Reference
“The court’s rulings are its legacy.”
The Courtroom Portal provides a front-end interface for viewing and exporting deliberation transcripts from the MORNINGSTAR courtroom system.
Features
- Launch script — Interactive launcher: list transcripts, open existing HTML or export .md to HTML, open in browser
- Standalone viewer — Local HTML page for browsing transcripts (best when served over HTTP)
- Export script —
courtroom/portal/export_transcript.pyconverts a single .md transcript to styled HTML (no external deps) - Optional: gitmal — Full static site generation with Dracula theme via
courtroom/portal/generate.py - Personality styling — Dracula theme with color-coded personalities and vote styling
- Print support — Print-friendly styles for physical documentation
Quick Start
Recommended: Use the launch script
From the project root:
./courtroom/portal/launch.shThis will:
- List all
.mdtranscripts incourtroom/transcripts/ - Let you pick one by number
- Open the transcript in your default browser — using existing
.htmlif present, otherwise exporting viacourtroom/portal/export_transcript.pyand then opening
If you get “permission denied”, run chmod +x courtroom/portal/launch.sh once. No other CLI or extra tools required; uses only Bash and Python 3.
Standalone viewer
Open the viewer in your browser (for full transcript loading, serve via HTTP):
# Direct open (file:// — fetch may be restricted for some transcripts)
open courtroom/portal/viewer.html
# Or serve the project and open (recommended)
python3 -m http.server 8080
# Then open http://localhost:8080/courtroom/portal/viewer.htmlGenerate full static site (optional, requires gitmal)
python courtroom/portal/generate.py --theme dracula
# Or with options
python courtroom/portal/generate.py --theme dracula --minify --gzipExporting a single transcript
Without the launch script (e.g. from scripts or CI):
# Export to courtroom/portal/exports/ (default)
python3 courtroom/portal/export_transcript.py courtroom/transcripts/2026-02-15-framework-enhancement-analysis.md
# Custom output path
python3 courtroom/portal/export_transcript.py courtroom/transcripts/2026-02-15-framework-enhancement-analysis.md -o path/to/output.htmlexport_transcript.py uses only the Python standard library (no pip install). Output is Dracula-themed HTML with personality and vote styling.
Transcript filename formats
Per core/case-format.md. Canonical naming:
| Format | Example | Parsed as |
|---|---|---|
Standard YYYY-MM-DD-[matter-slug].md |
2026-02-15-framework-enhancement-analysis.md |
Date: 2026-02-15, Topic: Framework Enhancement Analysis |
Special Interest YYYYMMDD_HHMMSS_special_interest_[subject].md |
20260214_044300_special_interest_api_design.md |
Date: 2026-02-14 04:43, Topic: Special Interest: Api Design |
Legacy YYYYMMDD_HHMMSS_topic.md |
20260214_044300_system_advancement.md |
Date: 2026-02-14 04:43 (grandfathered) |
Place .md transcripts in courtroom/transcripts/. Pre-built .html files in the same directory are opened directly by the launch script (no export step).
Personality Color Scheme (Dracula Theme)
The portal uses the Dracula color palette with personality-specific colors:
| Personality | Color | Hex |
|---|---|---|
| MORNINGSTAR (Judge) | Purple | #bd93f9 |
| ARCHITECT | Cyan | #8be9fd |
| ENGINEER | Green | #50fa7b |
| DEBUGGER | Orange | #ffb86c |
| PROPHET | Pink | #ff79c6 |
| SCRIBE | Gray | #6272a4 |
Vote Styling
| Vote | Color | Hex |
|---|---|---|
| YES | Green | #50fa7b |
| NO | Red | #ff5555 |
| ABSTAIN | Yellow | #f1fa8c |
Directory Structure
From project root, the portal lives at courtroom/portal/:
courtroom/portal/
├── README.md # This file
├── launch.sh # Interactive launcher (recommended entry point)
├── export_transcript.py # Single .md → HTML export (no deps)
├── viewer.html # Standalone transcript viewer
├── dracula.css # Dracula theme stylesheet
├── generate.py # Optional: gitmal wrapper for full static site
├── exports/ # HTML output from launch.sh / export_transcript.py
└── output/ # Generated static site (after running generate.py)
├── index.html
├── transcripts.html
└── courtroom/transcripts/*.html
Standalone Generator Script
The generate.py script can be run directly:
# Generate with defaults (from project root)
python courtroom/portal/generate.py
# With options
python courtroom/portal/generate.py --theme dracula --minify --gzip
# Skip gitmal, only post-process
python courtroom/portal/generate.py --skip-gitmalGenerator Options
| Option | Default | Description |
|---|---|---|
--theme, -t |
dracula |
Code highlighting theme |
--output, -o |
courtroom/portal/output |
Output directory |
--minify |
false |
Minify generated HTML |
--gzip |
false |
Compress generated HTML |
--skip-gitmal |
false |
Only run post-processing |
Gitmal Requirements
The portal generator requires gitmal to be installed:
# Install gitmal
go install github.com/antonmedv/gitmal@latest
# Verify installation
gitmal --helpGitmal generates static HTML pages with: - File trees and commit history - Syntax highlighting with customizable themes - Markdown rendering
Customization
Custom CSS
Edit courtroom/portal/dracula.css to customize the appearance. Key sections:
- Base Colors -
:rootCSS variables - Personality Styling -
.p-*classes - Vote Styling -
.vote-*classes - Print Styles -
@media printsection
Theme Options
Available themes for gitmal (via --theme):
dracula(recommended)githubgithub-darkmonokainordsolarized-dark
Viewing in Full Screen
Via Viewer
- Open
courtroom/portal/viewer.html - Select a transcript
- Click “⛶ Fullscreen” button
Via Keyboard
- Press
F11for native fullscreen - Press
Escapeto exit
Via Exported HTML
Exported HTML files include a fullscreen toggle button in the bottom-right corner.
Print / PDF Export
From Viewer
- Open a transcript in the viewer
- Select “Export” → “Print / PDF”
- Use browser print dialog
From Command Line (macOS)
# Export to HTML first
morningstar export transcript 20260214_044300_system_advancement.md
# Convert to PDF (requires wkhtmltopdf or similar)
wkhtmltopdf courtroom/transcripts/20260214_044300_system_advancement.html output.pdfFrom Quarto
# Export to QMD
morningstar export transcript 20260214_044300_system_advancement.md -f qmd
# Render with Quarto
quarto render deliberation.qmd --to pdfTroubleshooting
“gitmal not found”
Install gitmal:
go install github.com/antonmedv/gitmal@latestEnsure $GOPATH/bin is in your PATH.
“No transcripts found”
Ensure .md files exist in courtroom/transcripts/:
ls courtroom/transcripts/*.mdSupported names per core/case-format.md: Standard YYYY-MM-DD-[matter-slug].md or Special Interest YYYYMMDD_HHMMSS_special_interest_[subject].md (legacy YYYYMMDD_HHMMSS_topic.md grandfathered).
Transcript discovery (manifest)
Run python3 courtroom/portal/generate_manifest.py from the project root to generate courtroom/portal/transcripts_manifest.json. When the viewer is served over HTTP, it will try to load this manifest first and list all transcripts from it; otherwise it falls back to the hardcoded KNOWN_TRANSCRIPTS in viewer.html. Add new transcript filenames to KNOWN_TRANSCRIPTS when using the viewer via file://.
Viewer not loading transcripts
The viewer uses either transcripts_manifest.json (if present and served over HTTP) or the hardcoded list KNOWN_TRANSCRIPTS in viewer.html. For the best experience, serve the project over HTTP and run generate_manifest.py so the viewer discovers transcripts automatically; file:// can block fetch for local files.
CSS not applying
Clear browser cache or hard refresh: - macOS: Cmd+Shift+R - Windows/Linux: Ctrl+Shift+R