My own gofred based Go learning exercise. A full app and server written in Go #7
Replies: 1 comment
-
|
This is absolutely incredible to see! 🎉 I’m genuinely impressed with how you built a Go-based app and backend around Gofred, and even extended it with your own components to fit your needs. The way you handled authentication, shared structs, and especially the Google Identity integration (with a custom Go - JS bridge for the popup flow) is such a creative and elegant approach, I love it. It’s also awesome that you went the extra mile to host everything, automate deployments, and even implement your own input widget without forking the library. That’s exactly the kind of experimentation and problem-solving spirit I hoped Gofred would encourage. Thank you so much for sharing your work — this is a great example for anyone learning Go, WebAssembly, and frontend-backend integration the “Go-native” way. 🚀 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My own Go/gofred learning exercise: https://github.com/misleb/mego2
It's a sample project that uses gofred as the client side with a Go service supporting authentication and a simple increment/decrement endpoint just to verify that the auth token generation and verification works. There's a shared package that allows client an server to use the same structs for Users and Tokens.
For fun I wanted to see how I could integrate Google Identity service with a gofred app and it was surprisingly simple. I learned how to make custom bridge between WASM and JS for the Google popup window. Google auth all happens 100% without needing to reload the page/WASM. I'm quite please with this.
The linked deployed demo in the README is probably broken at the moment and the Google Identity service is running in a test most that probably won't allow anyone but my whitelisted Google accounts to work. But you can at least see the popup! It's hosted with heroku so all that setup is also in the repo with none of my private keys/secrets. That's all kept in heroku as environment variables.
On the Gofred side I had to figure out how to implement my own input widget including the ability to set the input "type" attribute to "password." I was a bit surprised that this basic widget wasn't already part of the gofred foundation, but making it myself without forking gofred was a good learning exercise. See: https://github.com/misleb/mego2/blob/main/app/components/basic/input Next step is to implement things like "onkeyup" events and tabbing between input elements outside of a form.
Other things I took a stab at were:
Beta Was this translation helpful? Give feedback.
All reactions