[HN Gopher] Show HN: Dropbase AI - A Prompt-Based Python Web App...
       ___________________________________________________________________
        
       Show HN: Dropbase AI - A Prompt-Based Python Web App Builder
        
       Hey HN,  Dropbase is an AI-based Python web app builder.  To build
       this, we had to make significant changes from our original launch:
       https://news.ycombinator.com/item?id=38534920. Now, any web app can
       be entirely defined using just two files: `properties.json` for the
       UI and `main.py` for the backend logic, which makes it
       significantly easier for GPT to work with.  In the latest version,
       developers can use natural language prompts to build apps. But
       instead of generating a black-box app or promising an AI software
       engineer we just generate simple Python code that is easily
       interpreted by our internal web framework. This allows developers
       to:  (1) See and understand the generated app code. We regenerate
       the `main.py` file and highlight changes in a diff viewer, allowing
       developers to understand what exactly was changed.  (2) Edit the
       app code: Developers can correct any errors, occasional
       hallucinations, or edit code to handle specific use cases. Once
       they like the code, they can commit changes and immediately preview
       the app.  Incidentally, if you've tried Anthropic's Artifacts to
       create "apps", our experience will feel familiar. Dropbase AI is
       like Claude Artifacts, but for fully functional apps: you can
       connect to your database, make external API calls, and deploy to
       servers.  Our goal is to create a universal, prompt-based app
       builder that's highly customizable. Code should always be
       accessible and developers should be in control. We believe most
       apps will be built or prototyped this way, and we're taking the
       first steps towards that goal.  A fun fact is that model
       improvements were critical here: we could not achieve the
       consistent results we needed with any LLM prior to GPT-4o and
       Claude 3.5 Sonnet. In the future, we'll allow users to modify the
       code to call their local GPT/LLM deployment via Ollama, rather than
       relying on OpenAI or Anthropic calls.  If you're building admin
       panels, database editors, back-office tools, billing/customer
       dashboards, and internal dev tools that can fetch data and trigger
       actions across any database, internal/external service or API,
       please give Dropbase a shot!  We're excited to get your thoughts
       and questions!  Demos:  - Here's a demo video:
       https://youtu.be/RaxHOjhy3hY  - We also introduced Charts (beta) in
       this version based on suggestions from cjohnson318 in our previous
       HN post: https://youtu.be/YWtdD7THTxE  Useful links:  - Repo here:
       https://github.com/DropbaseHQ/dropbase. To setup locally, follow
       the quickstart guide in our docs  - Docs: https://docs.dropbase.io
       - Homepage: https://dropbase.io
        
       Author : jimmyechan
       Score  : 71 points
       Date   : 2024-07-12 17:08 UTC (5 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | cryptoz wrote:
       | Ooooh, this is interesting. I think I'm building something quite
       | similar! May I ask, how do you solve the code modification
       | problem? In your demo video it shows the AI prompt is modifying
       | code, not just generating it first-time, but I am curious how you
       | do it. Are you using diffs?
       | 
       | I wrote about my approach here using ASTs:
       | https://www.codeplusequalsai.com/static/blog/prompting_llms_...
       | 
       | You wrote in your post that you 'regenerate' a file - is that how
       | you do it? Is it reliable? How does that work on big files? Does
       | it fail at reproducing the rest of the file that should remain
       | unchanged sometimes?
       | 
       | Thanks for answering any of these! Great project!
        
         | jimmyechan wrote:
         | Thank you! I read your blog post and checked out your project!
         | If I understood it correctly, you're trying to build a software
         | engineering team in a box. Basically from first issue, to code,
         | to live apps. Very interesting approach adding the
         | collaboration angle! ASTs are neat but I'd imagine it could get
         | hard to manage with more complex code.
         | 
         | In our case, we regenerate the `main.py` file each time. One of
         | the hacks we did was to start with boilerplate code, which is
         | why you see it modifying the code as opposed to generating from
         | scratch the first time. We also feed the model with some
         | context/rules on app building using our web framework, so the
         | output is more bounded.
         | 
         | We haven't tested it on really big files yet, though I'd
         | imagine it could be a problem later. At the moment, we don't
         | generate HTML, JS/TS, or React code from scratch so our files
         | tend to be relatively smaller than if we did. Our UI is defined
         | via the `properties.json` file, which abstracts much of the
         | underlying code, therefore keeping the files small. It's much
         | easier for LLMs to generate json and map it to UI behavior,
         | than generate of the client code needed to do all of it.
         | 
         | We don't have issues with the LLMs changing function/method
         | code, but it occasionally implements one of boilerplate methods
         | we didn't explicitly ask for. In those cases, a developer has
         | to remove that code manually, which is why showing code diff is
         | critical.
         | 
         | Many other hacks come down to lots of prompt engineering!
         | Something along the lines of "Only implement or modify a
         | method/function corresponding to a user's prompt. Leave all
         | others intact"
         | 
         | Happy to chat more!
         | 
         | Also you might find this blog post we wrote interesting:
         | https://www.dropbase.io/post/an-internal-tools-builder-that-...
        
           | cryptoz wrote:
           | Aha, thanks for that detailed answer! Really fascinating to
           | hear others' approaches to this area of building simple but
           | full apps with LLMs. I'll definitely be following your
           | progress, curious to see where this goes. And I will read
           | your blog post this afternoon!
        
           | fao_ wrote:
           | It seems to me the more killer product here is the "Writing
           | two files to build a webapp", and you could comfortably rip
           | out ChatGPT and market to a wider audience?
        
             | jimmyechan wrote:
             | I like your take on that! I hadn't thought about it that
             | way before but "Writing two files to build a webapp" indeed
             | sounds quite intriguing. And we could extend that idea to
             | "...and deploy it with 1 click" or some version of that.
             | 
             | I'm curious about what audience you have in mind and what
             | kind of apps would you be interested in building this way?
             | Would love to hear more of your thoughts!
             | 
             | Edit: I should add that our main motivation for integrating
             | GPT is that we had to introduce some new concepts to make
             | this experience work, which increased the app-building
             | learning curve. We thought having GPT generate code and
             | highlighting diffs would be a neat way to teach users how
             | to develop apps without reading a lot of documentation.
        
         | meiraleal wrote:
         | hi cryptoz! I'm curious to read about your approach but it
         | seems I'm not the only one, your website went offline.
        
           | cryptoz wrote:
           | Hm, might be a DNS issue, not sure. I'll look into it,
           | thanks!
        
             | codetrotter wrote:
             | Loaded fine for me who just clicked it a few minutes ago
        
       ___________________________________________________________________
       (page generated 2024-07-12 23:00 UTC)