Show HN: Dropbase AI – A Prompt-Based Python Web App Builder
141 points| jimmyechan | 1 year ago |github.com
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
cryptoz|1 year ago
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|1 year ago
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-...
meiraleal|1 year ago
canadiantim|1 year ago
jimmyechan|1 year ago
alexliu518|1 year ago