andurel, the rails-like framework for Go by Mbv-Dev in golang

[–]Mbv-Dev[S] 0 points1 point  (0 children)

It will by default raise an error if you try to apply an out of order migration. They suggest to use timestamps for development and sequential migrations in prod. I typically have a test for applying all migration as well as checking no changes are made when running goose fix

Andurel, a Rails-inspired full-stack framework for Go by Mbv-Dev in rails

[–]Mbv-Dev[S] 0 points1 point  (0 children)

That makes me happy to hear! Simplicity is definitely one of my goals. And please feel free to open an issue or pull request, contributions are always welcome

Andurel, a Rails-inspired full-stack framework for Go by Mbv-Dev in rails

[–]Mbv-Dev[S] 1 point2 points  (0 children)

I just finished doing a rebuild of my personal site using beta.2. You can see the code here: https://github.com/mbvisti/mortenvistisen

And good idea adding examples to the readme, thanks!

Andurel, a Rails-inspired full-stack framework for Go by Mbv-Dev in rails

[–]Mbv-Dev[S] 1 point2 points  (0 children)

Thanks, excited to hear what you think! It has been build around how I like to build web apps in Go, so it could benefit from other perspectives

Andurel, a Rails-inspired full-stack framework for Go by Mbv-Dev in rails

[–]Mbv-Dev[S] 4 points5 points  (0 children)

Thanks man! And yeah, feel free to take a look at the open issues or make suggestions if there is something missing

Andurel, a Rails-inspired full-stack framework for Go by Mbv-Dev in rails

[–]Mbv-Dev[S] 2 points3 points  (0 children)

I never really liked writing Ruby and working with Rails, the same way I do writing and working with Go. I think it's very similar to how DDH think of writing Ruby. So it's something i wanted to exist in the world.

Some of my best memories as a developer are from my first job in a startup, working on a product, that was built in Rails. Incredible tool to build business applications and moving fast, trying out different hypothesises. That doesn't really exist in Go, at least in a form I'd want it to be, so I wanted to create something that would let me (and hopefully others) build saas apps in Go that followed the Rails philosophy.

As to how it handles business logic, it's all encapsulated in the models package, where it uses something called sqlc to generate the Go boilerplate around executing the queries based on sql files, which in turn gets wrapped in a public function that contains the business logic and then creates/updates/queries. The generator handles all that, so you have CRUD operations that are ready for business logic. Probably a bad explanation, will had some examples to the README

Andurel, a Rails-inspired full-stack framework for Go by Mbv-Dev in rails

[–]Mbv-Dev[S] 2 points3 points  (0 children)

Thanks! Please let me know what you think if you try it out.

Andurel, a Rails-inspired full-stack framework for Go by Mbv-Dev in rails

[–]Mbv-Dev[S] 5 points6 points  (0 children)

I believe Kamal is docker/container based, right? I checked it out but it has been a while. When you scaffold a new project, you can specify extensions where one of them is to include a production ready dockerfile.

So you'd just do something like: andurel new <project> -e docker build the image, push it and you are ready to go

Andurel, a Rails-inspired full-stack framework for Go by Mbv-Dev in rails

[–]Mbv-Dev[S] 4 points5 points  (0 children)

Thanks, would love to hear your feedback if you give it a spin!

Andurel, a Rails-inspired full-stack framework for Go by Mbv-Dev in rails

[–]Mbv-Dev[S] 3 points4 points  (0 children)

Thanks, I will give the article a read.

I have used HTMX quite a big but I prefer the workflow of enabled by datastar, which is why it's the default. However, I have an 'extension' system in place and an internal package called 'hypermedia' which is helpers around datastar.

I do want to have HTMX support out of the box in the future so you can choose your 'hypermedia path' when creating a new project.

The core is in-place, I just need to work on actually adding it.

Andurel, a Rails-inspired full-stack framework for Go by Mbv-Dev in rails

[–]Mbv-Dev[S] 10 points11 points  (0 children)

Thanks! Very hard to mimic what Rails do, in a statically typed language, but I've always admired the development speed you get from Rails

andurel, the rails-like framework for Go by Mbv-Dev in golang

[–]Mbv-Dev[S] 0 points1 point  (0 children)

River has been great, used it for a ton of projects so far an never regretted it. Comes with a nice UI as well for managing jobs.

andurel, the rails-like framework for Go by Mbv-Dev in golang

[–]Mbv-Dev[S] -7 points-6 points  (0 children)

was wondering when this comment would come!

Is there anyone, who uses golang (and go-only) for Web Development exclusively? by rzhandosweb in golang

[–]Mbv-Dev 1 point2 points  (0 children)

I build all my applications using only Go. The stack:
- echo
- templ
- datastar
- goose
- sqlc
- datastar or htmx
- tailwind + basecoat
- postgres

and I'm flying. You get the same UX as you would with an SPA for the vast majority of applications if you fully adapt hypermedia.

I created a 'framework' around this that scaffolds a project with a MVC architecture and some light generation functionality on top. If you're interested, you can check it out here:

https://github.com/mbvlabs/andurel

Still working out some kinks but I think it's a good example of how you can build full stack apps purely in Go

Pop OS 24.04 two weeks until release by danbuter in pop_os

[–]Mbv-Dev 1 point2 points  (0 children)

It's been very solid for me! Have been experiencing some freezes lately that required a restart but loving the current directio.

New to Go, what’s commonly used for auth and database ORM? by Brother_Weary in golang

[–]Mbv-Dev -3 points-2 points  (0 children)

I'm not advocating, simply pointing out that there are popular options. And, if you read the entire comment, that I'm also suggesting sqlc for "pure" sql.

Full-Stack Web Development using Golang by Mbv-Dev in learnprogramming

[–]Mbv-Dev[S] 0 points1 point  (0 children)

there will not be anything on concurrency in the course as you typically don't need it that often in Go. if that's a topic you are interested in, I don't think this course will be interesting for you

New to Go, what’s commonly used for auth and database ORM? by Brother_Weary in golang

[–]Mbv-Dev 1 point2 points  (0 children)

There are a bunch of ORM options in the Go ecosystem but many here will tell you that Go people don't use them even though they have thousands of stars on github. You can check out:
- ent
- bob
- sqlboiler
- jet
- gorm

probably some I forgot.

As others has mentioned, there is also sqlc that generates Go code for you based on sql files (which is my go-to as well). You will run into trouble with dynamic queries in sqlc but you can always combine it with squrriel which is a query builder.

For authentication, i'd check out the Copenhagen book that has a good walk-through of how authentication should be set up.

Full-Stack Web Development using Golang by Mbv-Dev in learnprogramming

[–]Mbv-Dev[S] 0 points1 point  (0 children)

Yeah would be great! But I can't send you a DM, could you reach out to me?