woah wild statement mate. I hope you have facts to back it up. Coz I have many friends working in startups that are making their APIs specially in go @@spoodermen2530
@@spoodermen2530 professional dev isn't moving away from Go. The last 5 years or so I've seen more of the companies I work with moving towards Go. Typically upgrading their tech stack from node backend and/or Python to Go. During my last job search as well (few months ago), I saw more Go roles than I've seen in the past.
Really enjoying working with this framework. Found the structure easy to navigate and read. One note was that I did find that storing the "sessionID:userID" encoding in the cookie to be a bit redundant and everything works the same removing the userID. I don't personally prefer storing the userID in the cookie anyway. Overall, will definitely recommend this repo for ppl interested in trying this stack.
Go is life on easy mode. It’s crazy how good it is. lol at people still using Python honestly. I understand the appeal of Django and it’s great, but Python is ass garbage
I would honestly do this, probably without tailwind (not a fan of inline styles tbh), and with some vanilla JS for responsiveness. Simple but effective!
Great work with this content and a general thumbs WAY UP to this stack! I've been tinkering with go/templ/tailwind/htmx and really liking it. I've been using echo instead of chi but any go web framework will work depending on your needs (or just native net/http even)... also just noting I've seen reference to a GoTHAM stack as well with is essentially GoTTH plus a database layer which is mariaDB.
When I made this I had only worked with Chi but I've since worked with Echo and it's pretty good. I like that the handlers return errors. I did end up adding an SQLlite database to this repo
You could have a components folder for atomic and reusable components, then create a routes folder for screen views. Would fit modern frontend ways of working.
I tried to make the components folder but couldn't get it to work. I didn't spend much time on it though to be honest. I like the individual handlers for routes, but it's probably just because that's what I'm used to
I managed to get things setup quite nicely, but I am also not experienced with Go in general so don't know what the gotchas are when structuring a project. I had the intensions to create a routes folder that colocated the handlers and screen templates together. Then a components and layouts folder separate which works alright so far. My assumption was that the handlers drive the main routes so why not co locate them, then components folder is atomic. @@TomDoesTech
Why are you using jwt rather than session? As HTMX creator says, session based authentication is more suitable for HTMX, because HTMX is meant to be a monolithic and server central architecture.
Looks very good. Can't wait to try this on a side project. What I'd love to see is a CLI tool similar to Create-T3-App (Create-GOTTH-App?) that generates all the files needed and also allows the user to choose what database they want to use, whether they want auth, etc.
Great Stuff Tom! I have a question with regards to the CSP Middleware, I managed to run the program with no errors but it's not rendering the styles on the website, I haven't changed a thing except the sha256 that I used coming from the console when an error is detected when sha isn't declared. It also shows the css file on the sources tab. I still don't get it why it's not working though, any Idea why this occurs?
Great video! There's a problem with the 'Content-Security-Policy' with Safari though: "Refused to execute a script because its hash, its nonce, or 'unsafe-inline' does not appear in the script-src directive of the Content Security Policy." "Refused to apply a stylesheet because its hash, its nonce, or 'unsafe-inline' does not appear in the style-src directive of the Content Security Policy." I've not found how to fix this yet. Any idea?
can you make a video about step by step how to set up this source code. I tried to set up from scratch but having trouble with air (same file config as yours), when i ctrl+c to terminate the server, it's still running even though it works fine with go run command. Any idea ?
I get that if it panics and I ctrl+c, never been able to find a solution to it. Other than that, it works fine. I'm not sure what your issue is, it should just work.
Bro I am a beginner, many of the things go above my head but I want to start with only HTMX+GO and I am interested in it. Could u please guide me or something...some tutorials or a basic project or something? pls
Ha! Hey Tom. Not a big deal but I commented because I stared at the thumbnail for a little while trying to figure out how you got GoTTH... no biggy at all
I can't wait for you to create a full tutorial with this stack, building an app as an example.
So you can learn how to build it and then release your own tutorial?
He only creates TODO apps. no real software developer.
@@MCropperedso he can feel productive while not exerting any effort 😂
Or you can create your own app and learn a whole lot more than any tutorial could teach you
Been using the same for about a year now. It gets harder and harder to back to the old stacks as time progresses. I love this stack.
I really appreciate you taking the time to walk through the file structure. Nice video.
Same can't wait for a full tutorial
Omg, I cant wait to switch to that stack. 90% of my projects could be done so much faster. Thanks for the introduction!
I can't wait to try out the stack! I like it already and I'm definitely giving it a star ⭐
Good to see everyone switching to Go ❤❤
"everyone" no. Infact Most people are moving away from go.
woah wild statement mate. I hope you have facts to back it up. Coz I have many friends working in startups that are making their APIs specially in go
@@spoodermen2530
@@spoodermen2530 professional dev isn't moving away from Go. The last 5 years or so I've seen more of the companies I work with moving towards Go. Typically upgrading their tech stack from node backend and/or Python to Go. During my last job search as well (few months ago), I saw more Go roles than I've seen in the past.
@@spoodermen2530 moving where?
@@aleksandrpetrov3938 python, JS, C#, rust
Thanks for creating, making available, and explaining, this excellent work.
A nice balance of basic tutorial and advice on best practices.
Really enjoying working with this framework. Found the structure easy to navigate and read. One note was that I did find that storing the "sessionID:userID" encoding in the cookie to be a bit redundant and everything works the same removing the userID. I don't personally prefer storing the userID in the cookie anyway. Overall, will definitely recommend this repo for ppl interested in trying this stack.
I can't thank you enough for this. Keep up this amazing content.🙏
Go is life on easy mode. It’s crazy how good it is. lol at people still using Python honestly. I understand the appeal of Django and it’s great, but Python is ass garbage
Love this what are we looking at for deployment?
I love the acronym
25:30 you can actually use templ generate -watch there, or use air for regenerating templates too
It does that now
Great stuff Tom!
I would honestly do this, probably without tailwind (not a fan of inline styles tbh), and with some vanilla JS for responsiveness. Simple but effective!
looks amazing, thanks a lot for your work!
nice one tom, loving this.
More go stuff pls!
Great work with this content and a general thumbs WAY UP to this stack! I've been tinkering with go/templ/tailwind/htmx and really liking it. I've been using echo instead of chi but any go web framework will work depending on your needs (or just native net/http even)... also just noting I've seen reference to a GoTHAM stack as well with is essentially GoTTH plus a database layer which is mariaDB.
When I made this I had only worked with Chi but I've since worked with Echo and it's pretty good. I like that the handlers return errors.
I did end up adding an SQLlite database to this repo
Pretty bold of you not to at least wear a black shirt while presenting the GoTTH stack.
You could have a components folder for atomic and reusable components, then create a routes folder for screen views. Would fit modern frontend ways of working.
I tried to make the components folder but couldn't get it to work. I didn't spend much time on it though to be honest. I like the individual handlers for routes, but it's probably just because that's what I'm used to
I managed to get things setup quite nicely, but I am also not experienced with Go in general so don't know what the gotchas are when structuring a project. I had the intensions to create a routes folder that colocated the handlers and screen templates together. Then a components and layouts folder separate which works alright so far. My assumption was that the handlers drive the main routes so why not co locate them, then components folder is atomic. @@TomDoesTech
If you like we can collab on a starter template@@TomDoesTech
I would love to see you add turso as the db
what's your thought on Pocketbase, could you make a video on that?
I haven't looked at pocketbase in a while. I just had a quick look at it looks cool. I'd need to build something with it though
Interesting stack
pretty good, great content.
Why are you using jwt rather than session? As HTMX creator says, session based authentication is more suitable for HTMX, because HTMX is meant to be a monolithic and server central architecture.
cos he wants to
Do you have this gotham but from scratch? where we have to write all code
Looks very good. Can't wait to try this on a side project. What I'd love to see is a CLI tool similar to Create-T3-App (Create-GOTTH-App?) that generates all the files needed and also allows the user to choose what database they want to use, whether they want auth, etc.
Also:
Do you want to use Tailwind or MUI?
o Tailwind x MUI
Wrong answer, using Tailwind instead...
@@owenwexler7214 that's a really cool idea
Mr Tom make more stuff on Htmx and Go as like forms
Great Stuff Tom!
I have a question with regards to the CSP Middleware, I managed to run the program with no errors but it's not rendering the styles on the website, I haven't changed a thing except the sha256 that I used coming from the console when an error is detected when sha isn't declared. It also shows the css file on the sources tab.
I still don't get it why it's not working though, any Idea why this occurs?
I found the issue, it's because of `TextHTMLMiddleware`, the browser didn't load the css file because of its MIME Type. Thanks BTW!
Another Question though, does the sha256 keeps changing if I add css on the input.css?
Great content!
Great video! There's a problem with the 'Content-Security-Policy' with Safari though:
"Refused to execute a script because its hash, its nonce, or 'unsafe-inline' does not appear in the script-src directive of the Content Security Policy."
"Refused to apply a stylesheet because its hash, its nonce, or 'unsafe-inline' does not appear in the style-src directive of the Content Security Policy."
I've not found how to fix this yet. Any idea?
I forgot Safari even existed tbh so I haven't looked into it
@@TomDoesTech Yeah Safari always does things its way., but iOS and macOS is a somewhat large enough market that I can't leave unsupported..
@@Miyan00000 you can easily fix it, either add unsafe-inline or put it in a style sheet and I assume you can make htmx not add the css
@@TomDoesTech Yes that's what I did, thanks
First like. That’s gangsta
Question: what if you need a single backend with multiple frontend?. With HTMX the backend seems to be more coupled to the frontend. Am I wrong?
You can write all frontends in HTMX.
Make a /JSON endpoint that Marshalls the data
can you make a video about step by step how to set up this source code. I tried to set up from scratch but having trouble with air (same file config as yours), when i ctrl+c to terminate the server, it's still running even though it works fine with go run command. Any idea ?
I get that if it panics and I ctrl+c, never been able to find a solution to it. Other than that, it works fine. I'm not sure what your issue is, it should just work.
Sir Could you create an Advanced course on Express and Node js APIs from scratch
The old one looks difficult for a beginner
How would I make an advanced course for a beginner?
How many of these go+htmx stacks out there already )) GOTTH HATE PTJ. The mission of every HTMX developer is to generate the yet another stack name ))
These names are cringe af
This is the superiorest stack
Has anyone got CSP error for styles.css? Please help
internal>auth doesn't exist in your repro
@@RoastLambShanks I removed it, it uses session auth now
@@TomDoesTech 💪
Bro I am a beginner, many of the things go above my head but I want to start with only HTMX+GO and I am interested in it. Could u please guide me or something...some tutorials or a basic project or something? pls
templ generate -watch
I think very quickly we're gonna have huge amount of files in handlers folder. Looks like not the best attitude
so? what's wrong with that?
@@TomDoesTech i don't know. May be nothing. That was just a thought in my head. I still don't know what are the best ways and attitudes
The thumbnail has the words out of order 😬
@@theoneed2051 so?
Ha! Hey Tom. Not a big deal but I commented because I stared at the thumbnail for a little while trying to figure out how you got GoTTH... no biggy at all
Oh god, I hate tailwind and its whole concept from the bottom of my heart. It's the new comic sans. But hey, without it, rhe stack is just GoTH!
Y tho?