I built a framework that lets you write native apps with…
    Neura MarketNeura Market/DeepSeek
    ChatGPTChatGPTClaudeClaudeGeminiGeminiCursorCursorGrokGrokPerplexityPerplexityDeepSeekDeepSeek
    CoPilotCoPilotStable DiffusionStable DiffusionMidjourneyMidjourney
    View All Directories
    OverviewRulesPromptsMCPsAgentsGamesBlogVideosGuidesCoursesCommunityTrending
    DeepSeekBlogI built a framework that lets you write native apps with YAML and Lua
    Back to Blog
    I built a framework that lets you write native apps with YAML and Lua
    swift

    I built a framework that lets you write native apps with YAML and Lua

    Jose Quintero February 23, 2026
    0 views

    I've been doing native mobile development for a while and one thing that always bugged me was the...


    title: I built a framework that lets you write native apps with YAML and Lua published: true tags: swift, kotlin, mobile, opensource

    I've been doing native mobile development for a while and one thing that always bugged me was the tradeoff between cross-platform tools and actual native UI. Flutter and React Native solve the "write once" problem but you're not really getting native components. And writing everything twice in Swift and Kotlin is just exhausting.

    So I built Melody. You define your UI in YAML, write your logic in Lua, and it renders real SwiftUI on Apple platforms and Jetpack Compose on Android. No web views, no bridge, no JS runtime.

    Here's what a full screen looks like:

    screens:
      - id: home
        path: /
        title: Home
        state:
          count: 0
    
        body:
          - component: text
            text: "{{ 'Tapped ' .. state.count .. ' times' }}"
            style:
              fontSize: 24
              fontWeight: bold
    
          - component: button
            label: Tap me
            onTap: |
              state.count = state.count + 1
    

    That's it. Change the YAML, hot reload picks it up over WebSocket, and the app updates instantly.

    Why YAML and Lua?

    YAML handles the layout. It's declarative, easy to read, and easy to diff in git. Lua handles the logic — it's tiny, fast, and embeddable. No npm, no bundler, no node_modules. The whole dev experience is just editing files and saving them.

    What's in the box

    There are 23+ built-in components that map directly to native views — text, buttons, stacks, lists, grids, forms, charts, toggles, pickers, sliders, inputs, and more. Styling is inline in a style block with support for padding, colors, shadows, border radius, animations, etc. You reference theme colors with "theme.colorName" and they resolve automatically including dark mode.

    State is reactive. You assign to state.key in Lua and only the components that reference that key re-render. No diffing, no virtual DOM.

    Networking is built in with melody.fetch() which is non-blocking under the hood using coroutines, so your Lua reads linearly but doesn't freeze the UI. There's also WebSocket support, persistence, cross-screen events, timers, and clipboard access.

    Navigation

    Navigation is path-based with dynamic route params:

    - id: profile
      path: /profile/:id
      onMount: |
        local res = melody.fetch("https://api.example.com/user/" .. params.id)
        if res.ok then state.user = res.data end
    

    Tab bars, sheets, alerts, and full navigation stacks are all supported. Tabs even adapt between sidebar on iPad/Mac and tab bar on iPhone with a single config.

    Custom components

    Custom components work like you'd expect — define once in YAML with props, use them anywhere:

    components:
      UserCard:
        props:
          name: ""
          avatar: ""
        body:
          - component: stack
            direction: horizontal
            style: { spacing: 12, padding: 16 }
            children:
              - component: image
                src: "{{ props.avatar }}"
                style: { width: 48, height: 48, borderRadius: 24 }
              - component: text
                text: "{{ props.name }}"
    

    Plugins

    Plugins let you extend Melody with native code. A plugin is a git repo with Swift and Kotlin implementations that register functions into Lua under their own namespace. You declare them in app.yaml and run melody plugins install. Useful for things like keychain access, analytics, or anything that needs platform APIs.

    Getting started

    Install the CLI with Homebrew, scaffold a project, and run it:

    brew tap josejuanqm/tap
    brew install melody
    melody create MyApp
    cd MyApp
    melody dev
    

    It generates the Xcode project and Android boilerplate for you. The dev server handles hot reload.

    I'm currently using Melody to build a real app so this isn't just a toy — it's been tested against real use cases with networking, auth flows, dynamic lists, and complex navigation.

    It supports iOS, iPadOS, macOS, tvOS, visionOS, and Android.

    Web, Windows, and Linux support is planned and I'd love to work on it if theres traction.

    The repo is here: {% github josejuanqm/melody %}

    Would love to hear any feedback or questions.

    Tags

    swiftkotlinmobileopensource

    Comments

    More Blog

    View all
    Five Gemma-4 models, one accelerator: what porting E2B 31B to AWS Inferentia2 taught megemma

    Five Gemma-4 models, one accelerator: what porting E2B 31B to AWS Inferentia2 taught me

    I ported the whole Gemma-4 family — E2B, E4B, 12B, 31B, and the 26B-A4B MoE — to run on...

    X
    xbill
    Hey DEV, I'm Tobore. Let's actually connect.community

    Hey DEV, I'm Tobore. Let's actually connect.

    Hey DEV, I'm Tobore. Let's actually connect. I've been on here for a while now, mostly writing and...

    L
    Laurina Ayarah
    I burned through thousands of AI tokens. Then a friend did it for freeai

    I burned through thousands of AI tokens. Then a friend did it for free

    (yep, kinda clickbait, just for the funsies 😊) At the beginning of the year, I relaunched my...

    P
    Paulo Henrique
    Claude might be saturating your machineai

    Claude might be saturating your machine

    My laptop was sitting idle with the fan at full tilt. Nothing was running that I knew of. The culprit...

    S
    Sidhant Panda
    Automated GitHub Code Reviews Using Google Geminigithubactions

    Automated GitHub Code Reviews Using Google Gemini

    I Built a Thing! TL;DR — Google Gemini-based Pull Request reviews and Issue Triaging for...

    D
    Darren "Dazbo" Lester
    What is an "agentic harness," actually?ai

    What is an "agentic harness," actually?

    I've been hearing the word "harness" thrown around a lot lately. I assumed it just meant "the IDE" or...

    T
    Tilde A. Thurium

    Stay up to date

    Get the latest DeepSeek prompts, rules, and resources delivered to your inbox weekly.

    Neura Market LogoNeura Market

    Discover the best AI prompts, plugins, and resources for DeepSeek and more.

    Content Types

    • Rules
    • Prompts
    • MCPs
    • Agents
    • Guides

    Platforms

    • ChatGPT Directory
    • Claude Directory
    • Gemini Directory
    • Cursor Directory
    • Grok Directory
    • Perplexity Directory
    • DeepSeek Directory
    • CoPilot Directory
    • Stable Diffusion Directory
    • Midjourney Directory
    • All Directories

    Resources

    • Blog
    • Documentation
    • Help Center
    • Marketplace

    Legal

    • Privacy Policy
    • Terms of Service

    © 2026 Neura Market. All rights reserved.

    |

    Not affiliated with any AI platform vendors.

    Neura Market

    Custom AI Systems & Services

    Our team of experienced AI builders will help build custom AI systems, workflows, and solutions for your business.

    Request custom work

    Ready-made automations for this

    Workflows from the Neura Market marketplace related to this DeepSeek resource

    • Automate Blog Content Creation with Notion MCP, DeepSeek AI, and WordPressn8n · $9.99 · Related topic
    • Generate AI Videos from Scripts with DeepSeek, Synthesia, and Together.ain8n · $24.99 · Related topic
    • Compare Multi-Period Financial Data from Google Sheets with DeepSeek AI Analysisn8n · $14.99 · Related topic
    • PostgreSQL Conversational Agent with Claude & DeepSeek (Multi-KPI, Secure)n8n · $14.99 · Related topic
    Browse all workflows