Introducing The GoTTH Stack - Go, Tailwind CSS, Templ & HTMX

Поділитися
Вставка
  • Опубліковано 29 чер 2024
  • github.com/tomdoesTech/gotth
    In this video, we take a look at the GoTTH stack, a minimal stack for building web applications with Go, Tailwind CSS, Templ, and HTMX. Please feel free to contribute to the stack or let me know what other features you'd like.
    🌎 Follow me here:
    Discord: / discord
    Twitter: / tomdoes_tech
    Facebook: / tomdoestech​
    Instagram: / tomdoestech​
    TikTok: / tomdoes_tech
    ☕ Buy me a coffee: www.buymeacoffee.com/tomn
  • Розваги

КОМЕНТАРІ • 65

  • @pogadev
    @pogadev 4 місяці тому +35

    I can't wait for you to create a full tutorial with this stack, building an app as an example.

    • @MCroppered
      @MCroppered 2 місяці тому +1

      So you can learn how to build it and then release your own tutorial?

    • @ncpeaksean4278
      @ncpeaksean4278 2 місяці тому

      He only creates TODO apps. no real software developer.

  • @ala.garbaa
    @ala.garbaa 4 місяці тому +2

    I can't wait to try out the stack! I like it already and I'm definitely giving it a star ⭐

  • @priyanshsharma8411
    @priyanshsharma8411 4 місяці тому +2

    I can't thank you enough for this. Keep up this amazing content.🙏

  • @viktorkrepak
    @viktorkrepak 2 місяці тому

    looks amazing, thanks a lot for your work!

  • @TaxShopGroup
    @TaxShopGroup 21 день тому +1

    Thanks for creating, making available, and explaining, this excellent work.

  • @MattRobinsonDev
    @MattRobinsonDev 3 місяці тому

    Great stuff Tom!

  • @seanZG
    @seanZG 4 місяці тому +5

    Same can't wait for a full tutorial

  • @andrewkillen5879
    @andrewkillen5879 4 місяці тому

    nice one tom, loving this.

  • @roderickmorrison
    @roderickmorrison Місяць тому +1

    A nice balance of basic tutorial and advice on best practices.

  • @ibrahimraimi_
    @ibrahimraimi_ 4 місяці тому +11

    Good to see everyone switching to Go ❤❤

    • @spoodermen2530
      @spoodermen2530 4 місяці тому +3

      "everyone" no. Infact Most people are moving away from go.

    • @jitx2797
      @jitx2797 4 місяці тому

      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

    • @truefirstmagic
      @truefirstmagic 4 місяці тому

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

    • @aleksandrpetrov3938
      @aleksandrpetrov3938 Місяць тому

      @@spoodermen2530 moving where?

    • @spoodermen2530
      @spoodermen2530 Місяць тому

      @@aleksandrpetrov3938 python, JS, C#, rust

  • @bnssoftware3292
    @bnssoftware3292 2 місяці тому

    Great content!

  • @bennyboiii1196
    @bennyboiii1196 9 днів тому

    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!

  • @user-ru4mc5gb5n
    @user-ru4mc5gb5n 4 місяці тому +2

    More go stuff pls!

  • @IkraamDev
    @IkraamDev 4 місяці тому +1

    Interesting stack

  • @MrDermases
    @MrDermases 4 місяці тому

    I would love to see you add turso as the db

  • @hclyrics
    @hclyrics Місяць тому +1

    Pretty bold of you not to at least wear a black shirt while presenting the GoTTH stack.

  • @DiegoRoccia
    @DiegoRoccia Місяць тому

    25:30 you can actually use templ generate -watch there, or use air for regenerating templates too

  • @seanZG
    @seanZG 4 місяці тому

    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.

    • @TomDoesTech
      @TomDoesTech  4 місяці тому

      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

    • @seanZG
      @seanZG 4 місяці тому

      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

    • @seanZG
      @seanZG 4 місяці тому

      If you like we can collab on a starter template@@TomDoesTech

  • @davidcopenhaver5583
    @davidcopenhaver5583 2 місяці тому +1

    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.

    • @TomDoesTech
      @TomDoesTech  2 місяці тому

      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

  • @rielj
    @rielj 3 місяці тому

    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?

    • @rielj
      @rielj 3 місяці тому

      I found the issue, it's because of `TextHTMLMiddleware`, the browser didn't load the css file because of its MIME Type. Thanks BTW!

    • @rielj
      @rielj 3 місяці тому

      Another Question though, does the sha256 keeps changing if I add css on the input.css?

  • @sergsergesrgergseg
    @sergsergesrgergseg 3 місяці тому

    ive been using go and htmx for a few months and it works great, but theres a problem. i want to put as little thinking power into my projects as possible and with this stack u have to rewrite things such as datatables frequently, when in other frameworks such as ruby on rails, this is easy to do.

  • @yunyang6267
    @yunyang6267 4 місяці тому +2

    what's your thought on Pocketbase, could you make a video on that?

    • @TomDoesTech
      @TomDoesTech  4 місяці тому +2

      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

  • @unknown-user001
    @unknown-user001 3 місяці тому +1

    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.

  • @Miyan00000
    @Miyan00000 4 місяці тому

    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?

    • @TomDoesTech
      @TomDoesTech  4 місяці тому

      I forgot Safari even existed tbh so I haven't looked into it

    • @Miyan00000
      @Miyan00000 4 місяці тому

      @@TomDoesTech Yeah Safari always does things its way., but iOS and macOS is a somewhat large enough market that I can't leave unsupported..

    • @TomDoesTech
      @TomDoesTech  4 місяці тому

      @@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

    • @Miyan00000
      @Miyan00000 4 місяці тому

      @@TomDoesTech Yes that's what I did, thanks

  • @eduardabramovich1216
    @eduardabramovich1216 2 місяці тому

    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?

    • @bufferc6362
      @bufferc6362 2 місяці тому

      You can write all frontends in HTMX.

  • @001ibuyvn
    @001ibuyvn 4 місяці тому

    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 ?

    • @TomDoesTech
      @TomDoesTech  4 місяці тому

      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.

  • @MrAustin4399
    @MrAustin4399 4 місяці тому +1

    First like. That’s gangsta

  • @prashlovessamosa
    @prashlovessamosa Місяць тому

    Mr Tom make more stuff on Htmx and Go as like forms

  • @kashnigahbaruda
    @kashnigahbaruda 4 місяці тому +1

    This is the superiorest stack

  • @owenwexler7214
    @owenwexler7214 26 днів тому +1

    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.

    • @owenwexler7214
      @owenwexler7214 26 днів тому

      Also:
      Do you want to use Tailwind or MUI?
      o Tailwind x MUI
      Wrong answer, using Tailwind instead...

    • @TomDoesTech
      @TomDoesTech  26 днів тому

      @@owenwexler7214 that's a really cool idea

  • @dimatall
    @dimatall 4 місяці тому +1

    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 ))

  • @SleepeJobs
    @SleepeJobs 3 місяці тому

    Has anyone got CSP error for styles.css? Please help

  • @jeffkirchoff14
    @jeffkirchoff14 4 місяці тому

    Sir Could you create an Advanced course on Express and Node js APIs from scratch
    The old one looks difficult for a beginner

    • @TomDoesTech
      @TomDoesTech  4 місяці тому +3

      How would I make an advanced course for a beginner?

  • @andrewkillen5879
    @andrewkillen5879 4 місяці тому

    templ generate -watch

  • @3pm479
    @3pm479 3 місяці тому

    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

  • @aleksandrpetrov3938
    @aleksandrpetrov3938 Місяць тому

    I think very quickly we're gonna have huge amount of files in handlers folder. Looks like not the best attitude

    • @TomDoesTech
      @TomDoesTech  Місяць тому

      so? what's wrong with that?

    • @aleksandrpetrov3938
      @aleksandrpetrov3938 Місяць тому

      @@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

  • @nothingtoseehere93
    @nothingtoseehere93 Місяць тому +1

    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

  • @blazingelse9104
    @blazingelse9104 8 днів тому

    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!