chahuadev's picture
Upload 51 files
f462b1c verified
metadata
license: other
language:
  - en
tags:
  - code-analysis
  - static-analysis
  - javascript
  - electron
  - emoji-cleaner
  - junk-sweeper
  - plugin-management
  - desktop-app
  - electron-app
  - security

Chahua Markdown Video Studio

Chahua Markdown Video Studio Version Electron

Author every slide, timing, and presentation configuration in markdown—preview and export videos without leaving your deck.

Chahua Markdown Video Studio turns a single markdown file into a cinematic video. Frontmatter drives presentation presets, export settings, and security-sensitive metadata while the renderer timeline stays perfectly in sync between preview and export.


Why Markdown-First?

  • Single source of truth for content, timings, transitions, narration cues, and assets.
  • Deterministic timeline JSON shared by the renderer and upcoming headless export pipeline.
  • Presentation presets round-trip through frontmatter so writers and designers stay aligned.
  • Actionable diagnostics inside the Markdown tab highlight validation issues in context.

Key Capabilities

  • Markdown editor with live sync and diagnostics (Sync Markdown button).
  • Timeline tab showing per-slide durations, timecodes, and tracked assets.
  • Export tab for resolution, FPS, and quality settings backed by frontmatter.
  • Presentation settings panel (transitioning from static templates) that writes preset choices back into the deck and restyles the preview.
  • Secure preload bridge (security-core.js) enforcing filesystem, hashing, and rate limits.

Current focus is WebM preview/export. Legacy GIF export returns after the shared timeline engine stabilises.


Table of Contents


Quick Start

# Clone the repository
git clone https://github.com/chahuadev/chahuadev-markdown-presenter.git

# Enter the project
cd chahuadev-markdown-presenter

# Install dependencies
npm install

# Launch the app
npm start

Optional scripts:

npm run dev    # Verbose logging
npm run build  # Package the Electron app

Markdown Authoring Workflow

  1. Open the app with npm start.
  2. Markdown tab
    • Paste or edit your deck in the editor.
    • Use Load Sample Deck for a guided example.
    • Click Sync Markdown to parse slides, refresh the timeline, and update the stage text.
  3. Timeline tab
    • Review total duration and per-slide timings.
    • Confirm asset checklist items (images, audio) and resolve pending markers.
  4. Presentation Settings tab
    • Select a preset; the choice updates frontmatter (presentation.preset with a template fallback) and restyles the stage.
    • Presentation Settings is the recommended system going forward; the legacy template field remains only so decks from earlier versions still render correctly.
  5. Export tab
    • Adjust video.resolution, video.fps, and video.quality. Values sync back to frontmatter.
  6. Preview / Export
    • Preview Timeline plays the parsed deck against the live stage.
    • Export Video records a WebM through the native VideoRenderer and saves it securely.

Markdown Format Cheatsheet

---
presentation:
   preset: professional
   fonts:
      heading: "'Montserrat', 'Arial', sans-serif"
   colors:
      accent: "#60a5fa"
   animations:
      slideTransition: slide
template: professional  # legacy fallback for older builds
video:
  resolution: 1920x1080
  fps: 60
  quality: 0.95
---

# Introduction
subtitle: Markdown Video Studio
duration: 4

Welcome to the Markdown-first workflow.

---

# Feature Highlights
duration: 6

- Native WebM encoding with MediaRecorder API
- Real-time preview and timeline visualization
- Frontmatter configuration sync
- Truly offline-first architecture

![Feature Demo](assets/image/screenshot.png)

---

# Conclusion
subtitle: Built with Electron + Canvas
duration: 5

Thank you for watching!

Slide Syntax:

  • Each slide separated by ---
  • # Title - Main heading (required)
  • subtitle: text - Optional subtitle
  • duration: N - Slide duration in seconds (default: 5)
  • Standard Markdown: lists, bold, italic, images

Frontmatter Options:

  • presentation.preset: default, professional, minimal, creative
  • presentation.fonts.heading|body|code: Any supported font token from presentation-config.js
  • presentation.colors.primary|accent|background: Hex colors (e.g. #3b82f6)
  • presentation.animations.slideTransition: fade, slide, none
  • video.resolution: 1920x1080, 1280x720, 3840x2160
  • video.fps: 30, 60
  • video.quality: 0.8 - 1.0
  • template: Legacy fallback key while presets fully replace template cards

Extended directives for transitions and narration cues are outlined in docs/EN/MARKDOWN_VIDEO_PLAN.md.


Application Layout

  • Stage (left panel): live preview of intro, timeline snapshot, and outro styled by the active preset.
  • Markdown: editor, diagnostics panel, summary card, and quick actions (load sample, import from disk, open workspace folder).
  • Timeline: total runtime, per-slide breakdown, and asset checklist with availability status.
  • Export: video configuration controls bound to frontmatter.
  • Presentation Settings: preset gallery with font/color/animation controls that keep markdown frontmatter in sync.

Documentation

  • MARKDOWN_VIDEO_PLAN: English / ไทย – Roadmap covering presentation presets, safe zones, and native exporter milestones.
  • CHANGELOG: English / ไทย – Release history and upcoming feature checkpoints.
  • CONTRIBUTING: English / ไทย – Contribution workflow, coding standards, and review expectations.
  • CODE_OF_CONDUCT: English / ไทย – Community guidelines for respectful collaboration.

Project Structure


Security Posture

  • security-core.js blocks path traversal, enforces extension and size limits, validates hashes, and rate-limits operations.
  • The Security button surfaces telemetry (operation count, uptime, cache stats, rate limit entries).
  • Renderer access to the filesystem and export locations flows exclusively through vetted IPC handlers.

Development Notes

  • The legacy code-upload scene workflow has been retired; markdown is now the authoritative input.
  • src/renderer/js/app.js and src/shared/markdown-parser.js are under active development—follow progress in docs/EN|TH/MARKDOWN_VIDEO_PLAN.md under Immediate Sprint Focus.
  • src/renderer/js/presentation-config.js unifies preset management while templates.js remains only for backwards compatibility.
  • Current export method: Native WebM recording using Canvas API + MediaRecorder (no external dependencies).
  • Upcoming milestones: Enhanced timeline engine, schema validation with actionable diagnostics, and OS-native MP4/GIF exporters scoped in the roadmap documents.

Contributing

  1. Fork the repository.
  2. Create a feature branch (git checkout -b feature/markdown-parser-upgrade).
  3. Update or add tests when touching the parser, renderer, or security layers.
  4. Submit a pull request summarising how your change advances the markdown-first roadmap.

Please read the roadmap documents in docs/EN or docs/TH before proposing major architectural shifts.


Credits & Contact

Chahua Development Co., Ltd.

Stars, feedback, and roadmap suggestions are always appreciated!


Transform markdown into motion.