The Art of Over Engineering
Tags: supabase, slatejs, tauri, programming
Published: 2022-07-01 17:47:00

This blog was originally written [here](https://zacharyp.blog/the-art-of-over-engineering) 👈🏼

*simple answers are for the suckers...*

Is what I kept saying to myself while building out a *..totally unnecessary* tool I would use to do this groundbreaking new form of communication... **Blogging!!** *..hmm what's that? [dev.to](https://dev.to/zacharyp)?? never heard of em.*

## For why?

*I wanted to…* explore something I was wholly unfamiliar with and thought what better way to accomplish that than building a bespoke blogging tool for myself and write about the whole experience using that tool. A win win for the reader and me. They get spicy content , I get “*solutions*” to every “*mistake*” I make in my DMs.

*…everyone learns!*

## The 3 Amigos

[Tauri](https://tauri.app/) - The spicy Electron competitor that allows me to build this program in almost any FE framework I want strapped with a Rust backend, capable of producing lightweight fully compatible versions for all OSs *…even those who have a strange fascination with penguins.*

[Slate.js](https://www.slatejs.org/) - A React based framework for building a rich text editor that lets me cherry pick whatever features I want packaged together in reusable components. *…Like a digital Lego set but for writing*

[Supabase](https://supabase.com/) - An open source database *…and much much more* provider capable of storing all the 1s and 0s responsible for what you’re reading now, and giving me an easy way to go an get them.

![https://res.cloudinary.com/dey85zjmf/image/upload/v1656691180/Art%20of%20over%20Eng./3amigos_bmapz6.png](https://res.cloudinary.com/dey85zjmf/image/upload/v1656691180/Art%20of%20over%20Eng./3amigos_bmapz6.png)

## What did we learn?

That with the power of the almighty Webview via [WRY](https://tauri.app/about/architecture#wry) and [TAO](https://tauri.app/about/architecture#tao)

*These libraries have been absorbed in one fashion or another into the main Tauri repo.*

my Tauri app beats the breaks off of a similar app built on electron *…in theory* when it comes to just about every countable metric. *…I counted at least to 6*

*hold on I have to break out my magnifying glass* 🔎

![https://res.cloudinary.com/dey85zjmf/image/upload/v1656690814/Art%20of%20over%20Eng./EBfilesize_oloyui.png](https://res.cloudinary.com/dey85zjmf/image/upload/v1656690814/Art%20of%20over%20Eng./EBfilesize_oloyui.png)

*The energy it took your brain to read this sentence cost more than this app running at full tilt.*

![https://res.cloudinary.com/dey85zjmf/image/upload/v1656690814/Art%20of%20over%20Eng./EBusage_kw6zhx.png](https://res.cloudinary.com/dey85zjmf/image/upload/v1656690814/Art%20of%20over%20Eng./EBusage_kw6zhx.png)

Almost forgot to give everyone their grain of 🧂, I am flying by stuff at a million miles an hour and leaking details like a sieve as always do your own research.

## Locking it down

I get to yank out all of the `node.env === development{ let me have ALL of the spicy DB commands }`

bs out of the blogs repo and shove all of the API logic centered around posting to the DB into the apps repo.

Next.js does a great job hiding variables but good luck untangling the Rust compiled spaghetti binary and for those that can *…Gather round everyone, on the count of three..*

![https://res.cloudinary.com/dey85zjmf/image/upload/v1656690828/Art%20of%20over%20Eng./nerd_ybmnjc.gif](https://res.cloudinary.com/dey85zjmf/image/upload/v1656690828/Art%20of%20over%20Eng./nerd_ybmnjc.gif)

*Eventually* I will add the ability to delete posts from the app truly isolating all of the spicy variables and API calls from  `{bigShadyTechCompany.name}` who got pissed at me when I showed everyone that you *…yes you* can [bend time using 11ty](https://dev.to/zacharyp/how-fast-could-it-really-get-4m7h) and have not stopped since trying to obtain the keys to my demise. *…but in the mean time SEO score go BrtTtTtTtTt*

> but what about editing!?!
> 

I dont make mistcakes, moving on.

## If it fits it ships

I was able to cram my Slate.js instance **wholesale** into my app and like the 10th anniversary edition of Skyrim    *…yup a decade* running **all** the mods…

![https://res.cloudinary.com/dey85zjmf/image/upload/v1656690820/Art%20of%20over%20Eng./todd-howard-it-just-works_vnw9s7.gif](https://res.cloudinary.com/dey85zjmf/image/upload/v1656690820/Art%20of%20over%20Eng./todd-howard-it-just-works_vnw9s7.gif)

> *but Zach! that would totally not work, what kind of scam are you trying to pull?*
> 

This should be the part where I commend you on your observation skills and agree with you fully **but** the reality of it is after some minor route futzing wouldn’t you know it that S.O.B compiled. *…I was as surprised as everyone else.*

![https://res.cloudinary.com/dey85zjmf/image/upload/v1656690810/Art%20of%20over%20Eng./EBdesktopimage_qzciho.png](https://res.cloudinary.com/dey85zjmf/image/upload/v1656690810/Art%20of%20over%20Eng./EBdesktopimage_qzciho.png)

*…Breaking News! Reading documentation actually works!*

Now that only gets us halfway to the finish line and it is time to see if Supabase would play nice with the other two. I essentially took what I had refactored it to React and to make a short story even shorter it fit..

![https://res.cloudinary.com/dey85zjmf/image/upload/v1656691042/Art%20of%20over%20Eng./jim-carrey-like-a-glove_uagp6o.gif](https://res.cloudinary.com/dey85zjmf/image/upload/v1656691042/Art%20of%20over%20Eng./jim-carrey-like-a-glove_uagp6o.gif)

This speaks to Supabases excellent DX and Tauris ability to turn most FE ingredients into a meal fit for any computers palate. *…Blog Bourgogne!*

## Bring it home

While building this one out I was ready to have heroic stories of fighting my way out of a stack trace a million lines deep using nothing but CLI prompts, the reality *…all be it a much more boring one IMO* was a pretty linear process of build, break and repeat until I was done.

In the end I am left with a clean, easy and safe way to get my message out to the masses *…all hail hypno-blogger* and learned a bunch along the way.

Woo that was a lot of words glad ya made it down here, thanks for hanging out 👋🏼

## Housekeeping

> _Could this have been all handled by a simple ‘npm run dev’ ?_


Duh.

> _Should someone follow this path?_


Maybe not this exact one but take the deeper meaning of it all and run with that.

> _What was the point of all this?_


Telling a story helps me learn better and technical think pieces tend to be boring af.

> _What’s happening with the ole [Zacharyp.dev](http://zacharyp.dev/) 11ty swap??_


Chill out…

> _Do you have a Twitter?_


Kinda off topic don’t ya think… but I [do](https://twitter.com/TweetZachBack)