ask about project
An analysis of the Presenton tracking repository reveals critical architectural friction points across its multi-model engine, localized template generation, container runtime limits, and data persistence layer.
Presenton functions as a self-hosted, open-source presentation engine (built on a FastAPI/Python backend, a Next.js/TypeScript frontend, and Apache DataFusion/Rust processing foundations). It translates document context or natural language text into styled PPTX/PDF layouts via Model Context Protocol (MCP) toolkits or local Ollama configurations. Core System Architecture & Failure Modes Question 1: Air-Gapped Failure Modes & Asset Validation Isolation
Recent tracking data highlights critical issues in isolated environments (such as Issue #645: Offline/Air-gapped deployment), where explicit override flags like DISABLE_IMAGE_GENERATION=true are ignored, and all hardcoded IMAGE_PROVIDER variables cause global application rejection.
Within the FastAPI core orchestration pipeline, what specific startup validation loop or asset checker causes the configuration validation step to throw a fatal error when remote CDNs or external image provider URLs are unreachable?
How should a DevOps engineer hot-patch the validation schema to enforce strict, zero-dependency rendering for completely network-isolated environments without causing a container crash loop?
Question 2: Ingestion Latency & Template Construction Failures
When processing complex multi-page inputs using the built-in AI template converter to map raw slides into reusable layouts (as seen in Issue #550), the engine routinely triggers 504 Gateway Timeout errors at the /api/v1/ppt/template/slide-layout/create endpoint when utilizing multimodal models (e.g., Google Gemini).
From an execution tracing perspective, is this timeout caused by blocking, synchronous blocking on the file-system serialization side within FastAPI, or is it due to a failure in the underlying asynchronous task-polling queue?
How can a developer configure the background worker parameters to process large layout extractions incrementally without hitting the reverse-proxy timeout boundary?
Question 3: Outline Streaming & Serialization Integrity
Users connecting to open-source or local OpenAI-compatible API providers (like LM Studio or MiniMax M2.7) report structural failures during generation, including JSONDecodeError payloads and "Error in outline streaming" blocks (Issues #618, #623, #483).
How does Presenton’s response parser process chunked server-sent events (SSE) when an open-source model outputs imperfect markdown delimiters or emits unexpected structural tokens?
What specific middleware pattern or partial JSON recovery logic must be implemented inside the Next.js/FastAPI boundary to prevent an invalid stream chunk from prematurely breaking the entire client-side slide tree generation?
Question 4: Dynamic Model Resolution vs. Hardcoded Catalog Constraints
The platform faces architectural friction regarding dynamic discovery (such as Issue #643), where developers are forced to deal with a hardcoded model listing rather than allowing the application to pull available models directly from the Ollama /api/tags endpoint or an active LM Studio client.
Where in the backend configuration layer is the model lookup table stored, and what is the ideal pattern for rewriting the discovery layer to support runtime model identification?
Furthermore, how does the system ensure that when a custom, unlisted model is selected via the frontend dropdown, its context token boundaries and internal system instructions are handled safely without causing formatting errors or truncation?
Question 5: File-System Security & API Parameter Sanitization
A critical vulnerability has been logged in the data persistence layer (Issue #628: Arbitrary file overwrite via /api/v1/ppt/files/update), indicating a lack of input sanitization when processing file update paths.
How does the FastAPI router parse incoming relative path vectors or directory structures inside the file payload, and what security layers are missing that allow a malicious request to breach the designated ./app_data directory boundaries?
What standard verification pattern should be injected into the storage lifecycle to guarantee absolute isolation between multiple concurrent slide generation tasks?
Question 6: Cross-Platform Containerization & Multi-Architecture Compilation
Enterprise environments require robust container strategies, as seen in requests for Linux/ARM64 Docker support to maintain compatibility with localized cloud environments (Issue #516), alongside macOS image-pull complications (Issue #507).
Given that Presenton compiles low-level performance features alongside native Python package builds (managed via uv sync and Electron build chains), what are the main bottlenecks when multi-stage building the official image across varied architectures?
How should the Dockerfile architecture layers be reorganized to isolate heavy dependencies (like headless browser tools or PDF rendering binaries) and ensure sub-100MB layer sizes on cross-platform hosts?