Good examples of Go back ends?

584 views
Skip to first unread message

george looshch

unread,
Jan 21, 2024, 3:57:42 PM1/21/24
to golang-nuts
hi!
can i please ask if someone knows good examples of back ends written in Go? If not good, just production code would be great as well!
thanks in advance and have a great rest of the weekend!

Jason E. Aten

unread,
Jan 22, 2024, 2:13:17 PM1/22/24
to golang-nuts
This question is too vague.

You are likely to get more helpful answers if you specify what kind of "backend" you are looking for.  As it is, we can only guess.  

Do you want backends that are web servers? (see the standard library net/http or the caddy web server)  Is it a backend for iOS iPhone Apps? For Android Apps? That respond to a specific kind of RPC such as gRPC? That simply access a database?...  A relational database? A non-relational database (graph?, vector?, full-text search?) 

Pocketbase is a backend mentioned recently on hackernews, that is written in Go and seems to do alot.  Perhaps it is similar to firebase, just going by the name. I have not used it myself.  I cannot say whether it is a "good example" or not, because I've not used it, and similarly this is too vague a criteria (good at what?)

Generally, go over to github and search for the kind of backend you want, and select those projects that are written in Go on the left side filter click-boxes.  You could also look at the curated lists of Go libraries such as https://awesome-go.com/

george looshch

unread,
Jan 22, 2024, 3:22:51 PM1/22/24
to golang-nuts
hi Jason,

thanks a million for pointing out the vagueness of my question! English isn’t my mother tongue so now i see where you’re coming from

what i meant was examples of real-world web server with routing, authentication, DB, etc.

curated lists have libraries and frameworks, what i’m looking for is examples of usages these libraries and frameworks in production. Search on github didn’t yield any good results, unfortunately

Robert Engels

unread,
Jan 22, 2024, 5:27:25 PM1/22/24
to george looshch, golang-nuts
github.com/robaho/go-trader has many easy to follow examples - authentication, multicast , routing, rest apis, websockets. A major system not covered though is db access. 

On Jan 22, 2024, at 9:23 AM, george looshch <george...@gmail.com> wrote:

hi Jason,
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/bcb429bb-4cfb-4421-be4e-b1ffbcd5e228n%40googlegroups.com.

george looshch

unread,
Jan 22, 2024, 5:29:18 PM1/22/24
to golang-nuts
thanks, Robert!

Jason Phillips

unread,
Jan 22, 2024, 7:50:07 PM1/22/24
to golang-nuts
Much of the code backing the official Go website and infrastructure is open source and hosted (or at least mirrored into) the golang Github project at https://github.com/golang

Some specific examples:
There's probably not much auth handling in any of those but it should meet the rest of your criteria.


Jason

george looshch

unread,
Jan 22, 2024, 8:40:04 PM1/22/24
to golang-nuts
oh that’s lovely, thank you, Jason!

Abu Zakaria

unread,
Jan 23, 2024, 1:25:17 AM1/23/24
to golang-nuts
Hi George,

I highly suggest you check out the Fiber web framework. You will find the framework interesting.
This repo has a list of many examples using Fiber – https://github.com/gofiber/recipes
Scroll through the repository, and you will most likely find what you are looking for.
Message has been deleted

Steven Hartland

unread,
Jan 23, 2024, 1:56:04 PM1/23/24
to george looshch, golang-nuts
It's high level, but there's some good stuff mentioned in https://github.com/avelino/awesome-go

--

george looshch

unread,
Jan 23, 2024, 2:00:38 PM1/23/24
to golang-nuts
hey Abu,

thanks, looks interesting!

george looshch

unread,
Jan 23, 2024, 2:10:30 PM1/23/24
to golang-nuts
hi Steven,

thanks for the link! As was noted previously, i did a terrible job at expressing my question initially; what i really meant was examples of real-world web server with routing, authentication, DB, etc.

Charles Forsyth

unread,
Mar 27, 2024, 11:21:39 PM3/27/24
to golang-nuts
Possibly again not exactly what you're looking for, but I still like Alex Edwards' "Let's Go" and "Let's Go Further" as examples of building up realistic backend servers with the different functions you mention (routing, auth, db etc), for at least modest scale. The former is forms-oriented and superficially but you can easily intuit how to extend it to JSON apps, partly because it does emphasise general techniques and structures so you can build your own. The second book starts with apis. I found the books clear and useful. I think the db is MySQL in the first book and PostgresSQL in the second. From 1.22, one might consider using net/http.ServeMux as the router. One advantage compared to just looking at code is that, being a book and tutorial, it discusses alternatives at every stage.

Jason Phillips excellent suggestion of the 4 Go infrastructure sites is one I'd completely forgotten about!

Charles Forsyth

unread,
Mar 28, 2024, 12:10:04 AM3/28/24
to golang-nuts
"forms-oriented and superficially but you can" that was supposed to read "forms-oriented but only superficially, and you can"
I also forgot to mention that runnable code comes with both books, with incremental development.

george looshch

unread,
Mar 30, 2024, 1:33:28 PM3/30/24
to golang-nuts
hello Charles,

first of all, thank you very much for looping in on quite an old thread, appreciate it!

second, thanks a million for the recommendations! Books are absolutely something of my interest, along with real-world examples. I personally a text person (as opposed to video/audio), and books is one of my favorite ways to learn due to ability to mix code and prose in a free form. I don’t mind a material being forms- or anything-else-oriented because, as you rightfully noted, i can adapt the learnings to my particular case, no problem with that!

on Jason Phillips’ suggestion: sorry but i couldn’t find it, would you mind sharing a link please? Thanks in advance!

Reply all
Reply to author
Forward
0 new messages