DB Designer: A Relational DB Designer built with Flutter (Desktop)

DB Designer: A Relational DB Designer built with Flutter (Desktop)

I needed a DB designer while creating the main apps of my startup. So I built my own tool for internal usage with Flutter.

Watch the Video



Why did I build this desktop tool?

I was working on my startup project Inspoget and when I was building the backend/business logic side of it, it quickly snapped that I cannot write SQL queries manually because

  • There will be more than 80 tables that consist of lots of fields,
  • I had to see the foreign relationships between fields & tables,
  • I need a single .sql file that I can copy and paste into the Hasura console,
  • The build order of the tables MATTER in an SQL script,
  • The available tools are either not adequate for the job, they require lots of boilerplate to even begin with or the licenses are priced too high

Key Takeaways

  • I used the InteractiveViewer widget and wrote a good controller class that handles camera movements using matrix transformations.

  • I was using the Provider package for managing the app state. This project was the bingo moment for me because I tested the GetX package for the first time in a relatively difficult project. I've been using GetX (only the Rx and Obx part of it) since that day.

  • Using the Rx and Obx helped me so much that I could build and render lots of widgets while having a high performance.

  • The tool can save projects as JSON files and can re-open projects by reading those JSON files.

  • The tool can generate and export the much-needed SQL file for me. These SQL files are exported into some level of folders according to the build order of a table.