How arashiyama11/dncl_ide works
Project type and purpose
• This is a Kotlin Multiplatform-based Integrated Development Environment (IDE) project for a toy language (“DNCL”), plus accompanying CLI and Language Server components. The goal is to provide:
• Native and web-based IDE clients (ComposeApp for desktop/Android/JS, plus a SwiftUI-based iosApp)
• A command-line REPL and file runner (interpreter/CLI)
• A Language Server (LSP) for editor integrations
File structure
• Top-level modules:
• composeApp – the UI clients (desktop, Android, iOS, Web) built with Compose Multiplatform
• iosApp – a SwiftUI wrapper for iOS
• domain – core business logic: models, use cases, repository interfaces
• editor – code-editor component (text model, LSP client, UI adapters)
• interpreter – DNCL parser/evaluator/REPL for CLI and local execution
• language_server – standalone LSP server implementing DNCL language features
• build scripts, CI workflows, and redistribution packaging (CLI, IDE installers, web assets)
• Each KMP module splits into commonMain + platform-specific source sets (androidMain, desktopMain, wasmJsMain, nativeMain, iosMain).
• Tests accompany each module in a matching commonTest and platform test sets.
README for additional insights
• Describes available deliverables:
IDE installers for desktop/Android, web version (GitHub Pages), CLI binaries (+ JAR), Language Server JAR.
• Usage instructions reveal runtime relationships (IDE uses interpreter for running code locally; editors connect to language_server via stdio).
1. Frontend UI Clients
• ComposeApp (desktop, Android, Web)
• iosApp (SwiftUI)
2. Editor subsystem (the “editor” module)
3. Domain Core (domain models, use cases, repository interfaces)
4. Interpreter subsystem (interpreter module → CLI, REPL)
5. Language Server (language_server module)
6. File System & OS (external service)
• UI Clients ←→ Editor: user interactions (keystrokes, cursor movements) → Editor API → view updates
• Editor → Language Server: LSP requests/responses over stdio or websockets (for Web client)
• UI Clients (IDE) → Domain: state store, settings, file metadata via repository interfaces
• UI Clients (IDE) → Interpreter: trigger Evaluate/ExecuteUseCase → interpreter runs code → returns output
• Domain → Interpreter: ExecuteUseCase invokes interpreter’s evaluate pipeline
• Domain → File System: FileRepositoryImpl persists/loads notebooks and DNCL source
• Language Server → Domain: reuse use cases or own AST/semantic modules to serve LSP features
• C. Architectural patterns & design principles:
• Clean Architecture / Hexagonal:
– domain module defines pure business logic and interfaces
– interpreter and language_server are adapters/providers of behavior
– editor and ComposeApp are delivery mechanisms (UI adapters)
• Module boundaries enforced via Kotlin Multiplatform
• LSP abstraction in “language_server” and LSP client in “editor”
• Compose Multiplatform for UI unification across platforms
• D. Key technologies/frameworks:
• Kotlin Multiplatform (commonMain + platform sources)
• Jetpack Compose Multiplatform (composeApp UI)
• SwiftUI (iosApp)
• Language Server Protocol (language_server + editor/lsp)
• Custom DNCL lexer/parser/evaluator (interpreter)
• Gradle with Kotlin DSL for builds and distribution