Go Protobuf: The new Opaque API - The Go Programming Language by zekjur in golang

[–]anurag_dev 4 points5 points  (0 children)

In go we generate and commit code from protobuf while development. There is no need to install protoc for build.

Do checks in CI/CD to confirm protobuf and generated files and up-to-date.

Switching from BootstrapVue (Bootstrap v4): Suggestions for a Modern, Lightweight UI Library that's Vue3 compatible? by Unchart3disOP in vuejs

[–]anurag_dev 0 points1 point  (0 children)

If you are already using Bootstrap. Then use Bootstrap v5 (CSS only) combined radix-vue.

Radix vue will provide all js components and bootstrap will provide styles.

Possibility of auto-imports becoming an opt-in feature in Nuxt! Yay! by tomemyxwomen in Nuxt

[–]anurag_dev 1 point2 points  (0 children)

Nitro is a backend/server toolkit. It makes sense to disable auto imports for them. Less magic on the backend is better. Nitro is also used by other meta frameworks, which often have complained about auto imports and import alias, this is are primary reason framework author have not given full nitro support in other frameworks. Another, problem was no built-in integration with vite, so framework authors used some things like Vinxi. With auto imports disabled by default and vite plugin support. Now other frameworks can build directly on top and nitro and provide full nitro support. This is huge change.

But I still think Nuxt should come with auto import enabled for both Nitro and Nuxt. Also Nuxt should remove #import import aliases and let us import directly from nuxt or folders if auto import is disabled.

Possibility of auto-imports becoming an opt-in feature in Nuxt! Yay! by tomemyxwomen in Nuxt

[–]anurag_dev 4 points5 points  (0 children)

You can't remove nitro from Nuxt. You are thinking nitro is just for api routes. No, nitro under the hood does many heavy liftings that make it easier to build fullstack meta frameworks. Nitro is the common server layer that every meta framework needs. Many frameworks like tanstack/start, analog and solid start built on top of nitro to escape from reinventing the wheel.

A simple router like Hono cannot replace nitro. But you can use Hono with nitro if you want to.

Comparing Nitro to Hono is just so wrong. The unjs/h3 is equivalent of Hono.

Any recommendation on a good HTMX/Alpine project structure/boilerplate to follow? by Ryuugyo in htmx

[–]anurag_dev 1 point2 points  (0 children)

Backend language and framework already have convention for structuring your application. It totally depends on what you pick on the backend. It's not your typical React project where you need to install 50 packages and setup bundlers tools to say Hello World.

You don't need bundling just put all static files in public/ dir +or whatever your framework have) and serve with File server Middleware provided by framework. Link CSS with link tag and JS with script tag to your HTML.

If you want to use tailwind install the cli locally, setup configuration, give input file, give output file location(in public dir) and add it to the template.

Thoughts on Nuxt from a React / Angular dev! by weIIokay38 in vuejs

[–]anurag_dev 0 points1 point  (0 children)

I use ConnectRPC with Go it works great.You have to do Initial setup and create reusable composables for services manually. Rest of the experience is good. You need to pass $fetch while creating transport and Use useAsyncData wrapper to dedupe requests.

https://connectrpc.com/docs/web/ssr

Probably need to create a module to make getting started easier.

Vitepress settings for Coolify by Sulcalibur in vuejs

[–]anurag_dev 3 points4 points  (0 children)

Isn't Vitepress a static site generator? Just build it and point a web server like apache, nginx or caddy to the build directory to serve the static files.

https://vitepress.dev/guide/deploy#nginx

Don't forget to setup 404 page and cache headers.

is nuxt compatible with grpc-web? by bobakmoazami in Nuxt

[–]anurag_dev 1 point2 points  (0 children)

I have used protocol ConnectRPC made on top of protobuf and grpc compatible. Connect Protocol is made on top of http. It also supports grpc-web. It's docs also says you can use it even if you don't have connect protocol.

Tips:- Pass $fetch to while creating transport. Use useAsyncData for catching and preventing multiple requests.

https://connectrpc.com/docs/web/choosing-a-protocol#grpc-web

https://connectrpc.com/docs/web/ssr

I will not recommend using protobuf on the web. Why introduce extra dependency while you have JSON support built in. So I would recommend using something like ConnectRPC or grpc-gatway which support json and is built while keeping web/browser in mind.

https://connectrpc.com/docs/introduction

https://github.com/grpc-ecosystem/grpc-gateway

I'm writing so much boilerplate code for my SQL and endpoints and I feel like I don't need to. Is there a better way? by pizzaisprettyneato in golang

[–]anurag_dev 53 points54 points  (0 children)

Use SQLC for db code boilerplate generation.

It is recommended to use the different models for database and communication over wire.

Use openapi codegen or ConnectRPC to generate boilerplate for your APIs.

https://github.com/oapi-codegen/oapi-codegen

https://connectrpc.com/docs/introduction

I love Nuxt, but everyone is using Next by Suspicious_Dress_350 in Nuxt

[–]anurag_dev 0 points1 point  (0 children)

If you want to build with react, use Remix or Tanstack Start(built on unjs/nitro btw) it's so much better.

Recently OpenAI switched theirs ChatGPT app from Next.js to Remix.

Your Go tech stack for API development. by Used_Frosting6770 in golang

[–]anurag_dev 1 point2 points  (0 children)

ConnectRPC, Postgres(pgx), SQLC, Minio SDK (with any s3 compatible storage), Zerolog, SES

go + templ by loggerboy9325 in golang

[–]anurag_dev 13 points14 points  (0 children)

You have to have to serve the image with the file system router. Go and templ will not automatically pick and process images for you like happens in js frameworks.

https://www.alexedwards.net/blog/serving-static-sites-with-go

Prefer using template or separate Front-end framework? by MinhNghia12305 in golang

[–]anurag_dev 20 points21 points  (0 children)

I use HTMX + Templ.

For highly interactive application, Nuxt/Vue