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


### Watch the Video
![gif_001](https://github.com/yasinarik/personal-project-contents/blob/main/DB%20Designer/001.gif?raw=true)

![gif_002](https://github.com/yasinarik/personal-project-contents/blob/main/DB%20Designer/002.gif?raw=true)

%[https://www.youtube.com/watch?v=UPmVW7IiSNY]

### 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.


