Build a Markdown Editor with Compose Desktop: File Access | Tutorial #5

20views
1likes
0
11:18
T
Taught by Celeste AI - AI Coding Coach
View on YouTube
Description
Build a complete Markdown Editor with Compose Desktop! Learn file I/O, JFileChooser dialogs, kotlinx.serialization for JSON config, and persistent app settings — all in about 160 lines of Kotlin. What You'll Learn: - File.readText() and File.writeText() for simple file I/O - JFileChooser with FileNameExtensionFilter for open/save dialogs - kotlinx.serialization @Serializable annotation for data classes - JSON config persistence with Json { prettyPrint = true } - object declaration (singleton) for a shared FileManager - System.getProperty("user.home") for cross-platform paths - OutlinedTextField with monospace font for code editing - Material 3 dark theme with darkColorScheme() Source code: https://github.com/GoCelesteAI/kotlin_markdown_editor Timestamps: 0:00 - Introduction 0:15 - Preview: What We're Building 0:45 - Project Setup (Gradle, Serialization Plugin) 2:12 - Data Model (Colors, AppState, EditorState) 3:05 - File Operations (FileManager, JFileChooser) 4:21 - UI Components (TopBar, EditorPane) 6:32 - Main & Compile 8:48 - App Demo (Open, Edit, Save, Verify) 9:48 - Recap & Key Takeaways 10:48 - Thanks for Watching Key Takeaways: 1. File I/O — readText() and writeText() for simple file access 2. JFileChooser — Swing's file picker works seamlessly in Compose Desktop 3. Serialization — kotlinx.serialization converts data classes to JSON and back 4. Config Persistence — Save app settings to a JSON file on disk 5. Path Handling — System.getProperty("user.home") for cross-platform paths If you found this helpful, please like and subscribe for more Kotlin Desktop tutorials! #kotlin #compose #desktop #material3 #fileio #serialization #json #jfilechooser #tutorial #programming
Back to tutorials

Duration

11:18

Published

February 7, 2026

Added to Codegiz

March 15, 2026

Open in YouTube