This page provides a deep, technical overview of the entire yoAnime system, including both the Standalone Animation Studio and the optional Integrated PowerPoint Mode.
It serves as the “master index” for all deeper documentation pages.
1. Dual‑Mode Application Design
yoAnime Studio operates in two distinct modes:
Standalone Mode
- Pure animation editing
- Lightweight startup
- No runtime dependencies
- Only loads UI, preview engine, export system, and local project registry
- Optional: Starts named pipe server only if enabled by config
Integrated Mode (Optional)
Used when launched by the yoAnime PowerPoint Add‑in:
- Requires handshake via named pipes
- Integrates with PowerPoint windows
- Hosts WebView2 panels interacting with the WPF app
- Controls WPF → PowerPoint parenting
- Monitors PowerPoint process and manages shutdown
- Uses WebSocket bridge for high‑frequency UI updates
2. Single Instance Model
To avoid conflicts:
- A secure, global mutex ensures a single instance
- ACLs allow MSIX/AppContainer sandbox access
- Mutex ownership and disposal are fail‑safe
- A bundled watchdog system prevents races
This makes the app stable when run by users, the Store, or PowerPoint.
3. Startup Pipeline
Phase A — Configuration & Logging Bootstrap
- Loads
appsettings.json - Loads user overrides
- Bootstraps Serilog (global logging)
- Performs DPI tests
- Migrates any legacy user config files
Phase B — Mutex & Single Instance Check
Ensures only one instance exists across:
- Normal EXE
- MSIX packaged install
- Launches from PowerPoint
Phase C — Host Builder (DI Container)
The app sets up a full .NET Generic Host:
- Logging
- Options
- Animation services
- Named Pipe server
- WebSocket server (optional)
- PowerPoint services
- Status updates
- Event bus
- UI services
Phase D — Mode Detection
Determines whether the app is:
- Standalone
- Integrated
- Transitioning from Welcome screen
Phase E — UI Initialization
MainWindow is constructed with:
- Handle retry logic
- Visibility checks
- Window parenting readiness signals
4. Communication Layer
yoAnime uses two secure, local IPC channels:
A) Named Pipes
Used for:
- Add‑in → WPF commands
- Handshake
- Messaging
- Geometry updates
- Task pane readiness events
Security:
- Access rules include:
- Current user SID
- AppContainer SID (for MSIX sandbox)
B) WebSocket Bridge (Loopback Only)
Used for:
- High‑frequency UI updates
- Live shape tracking
- Overlay UI commands
- Heartbeat pings
Security:
- Runs on localhost only
- Token‑based authentication
- Rate limiting (Fixed Window)
- Optional Origin checking
- Dynamic port fallback
5. Window Parenting System (Integrated Mode Only)
One of the most advanced parts of the architecture.
Features:
- Full state machine:
- NotReady
- WaitingMainWindow
- WaitingPowerPoint
- Attempting
- ParentSucceeded
- ParentFailed
- Convergence gate to prevent parenting thrash
- DPI detection on anchor window
- Elevation (UIPI) checks to block invalid parent attempts
- Retry logic with exponential backoff + jitter
- Post‑parent repair (“Parent Integrity Monitor”)
Why this matters:
When integrated, yoAnime Studio’s window becomes a child of PowerPoint’s AppFrame window — seamlessly embedded in the PowerPoint environment.
6. Animation Studio (Standalone Components)
A) Lottie Import Layer
- Reads Lottie JSON
- Extracts metadata
- Computes SHA‑256 hashes
- Validates structure
B) Preview Rendering
- Skia/Skottie real‑time renderer
- High‑DPI optimized
- Frame capture
- Letterboxing and aspect ratio normalization
C) Export Pipeline
- Frame generator (Skia or external renderer)
- Export queue service
- FFmpeg transcoder (MP4, GIF, WebM)
- Concurrent job processing
- Temp directory cleanup
D) Project Management
- Atomic writes
- Corruption detection
- Legacy migrations
7. Resilience, Crash Handling & Shutdown
- Global exception handlers (UI + background + AppDomain)
- Crash artifact writer
- Non‑blocking UI notifications
- Coordinated shutdown with phases
- Final failsafe kill after 10 seconds
- Mutex released safely
- Serilog final flush
8. Configuration System
Supports live reload for:
- Parent integrity checker
- Timeouts
- Launch settings
- WebSocket configuration
- Animation panel settings
- Feature flags
Values are debounced and compared with prior snapshots to avoid noisy restarts.
9. Security Model
Includes:
- UIPI elevation matching
- Named pipe ACLs
- Loopback WebSocket restrictions
- Token‑based auth
- No external network exposure
- Local‑only communication
- No telemetry unless user submits diagnostics
10. Architecture Diagram (Text Version)
+---------------------------+
| yoAnime Add-in |
| (Optional PowerPoint) |
+-------------+-------------+
|
Named Pipes (Secure)
|
+-------------v--------------+
| yoAnime WPF App |
| (yoAnime Studio) |
+-------------+--------------+
|
WebSocket Bridge (Localhost)
|
+-------------v--------------+
| Panels, Overlays, UI |
+-----------------------------+