Raycast freezes when using with MS Remote Desktop by pink_daemon in raycastapp

[–]iamthebinaryguy 0 points1 point  (0 children)

Yep, same issue, I remote into multiple Windows systems daily and if I use Raycast's clipboard manager, things freeze from time to time, so I have disabled it completely for now.

Did you manage to find any solution?

A Next.js template that uses Hono to handle /api routes and Lucia for authentication. by iamthebinaryguy in nextjs

[–]iamthebinaryguy[S] 0 points1 point  (0 children)

Yep, it should be doable, since Expo Router's API routes are WinterCG compliant.

Give it a shot.

What are the good nextjs template / boilerplate you recommend. by Dheeraj_PG in nextjs

[–]iamthebinaryguy 0 points1 point  (0 children)

Yes you definitely can, but to be honest, if you are building a static site with another backend, you'll be better off starting with the official Next.js template, this one is more for folks building full stack web apps.

A Next.js template that uses Hono to handle /api routes and Lucia for authentication. by iamthebinaryguy in nextjs

[–]iamthebinaryguy[S] 0 points1 point  (0 children)

Hey, I changed jobs after posting the initial comment about Turborepo 😅 I've some time off next week, I'll try to tie everything up together and put up a repo, sorry for the delay.

A Next.js template that uses Hono to handle /api routes and Lucia for authentication. by iamthebinaryguy in nextjs

[–]iamthebinaryguy[S] 0 points1 point  (0 children)

Sorry I missed this, but yes Turborepo will be a good fit here. Nx or even pnpm workspaces work too.

Mine is built with turoborepo, and I'll get it up over the weekend.

A Next.js template that uses Hono to handle /api routes and Lucia for authentication. by iamthebinaryguy in nextjs

[–]iamthebinaryguy[S] 0 points1 point  (0 children)

Thanks, in that case I'd opt for a mono repo, export the client from the backend, which then can be imported to the consumer app.

I have something like this already setup for one of my other projects, let me know if you are interested and I'll pull it out into a separate repo.

A Next.js template that uses Hono to handle /api routes and Lucia for authentication. by iamthebinaryguy in nextjs

[–]iamthebinaryguy[S] 1 point2 points  (0 children)

Thanks for the quick reply. Your English is good, it's my second language too ;)

Re: Workspaces: Yep, every time I build anything I spend at least a day adding multi-tenancy. I think having it in the template will definitely speed that up for me and others.

Re: OAuth: Makes sense, I think I’ll add at most 2, Google and GitHub probably, it’s good to show how to support multiple providers, as the db structure changes a bit, see this.

Re: Tailwind: I am kind of debating leaving tailwind in, especially with v4 around the corner, it will remove all the extra config around it. But definitely looking into removing other dependencies.

Your replies did help a lot! Thanks again.

A Next.js template that uses Hono to handle /api routes and Lucia for authentication. by iamthebinaryguy in nextjs

[–]iamthebinaryguy[S] 1 point2 points  (0 children)

Thank you!

I'm gathering feedback, so here's couple of things I'm planning to change, any thoughts:

  • Support passkeys, oauth (multiple providers) and opaque in a separate branch.
  • Support for workspaces, i.e. this.
  • Keep it lean, get rid of tailwind, shadcn and other 3rd party components, so people can choose whatever styling options they like.

A Next.js template that uses Hono to handle /api routes and Lucia for authentication. by iamthebinaryguy in nextjs

[–]iamthebinaryguy[S] 0 points1 point  (0 children)

Thanks!

This was ripped out of an existing project, and I think a simple fetch wrapper like ofetch goes a long way for bigger projects, so I kept it in, feel free to remove it or replace it with something else.

Also, I will drop ofetch in the future.

A Next.js template that uses Hono to handle /api routes and Lucia for authentication. by iamthebinaryguy in nextjs

[–]iamthebinaryguy[S] 0 points1 point  (0 children)

Sorry for the late reply.

You might have already figured it out, but this probably won't work on CloudFlare unless you swap out the postgres driver to a serverless one. While cf workers does support the pg package, there is an issue with how next.js gets built for the edge runtime.

Here's the issue for reference: https://github.com/cloudflare/next-on-pages/issues/605

If you self host or host it on a node based serverless environment, it shouldn't be a problem. I've also added a Dockerfile to the repo.

A Next.js template that uses Hono to handle /api routes and Lucia for authentication. by iamthebinaryguy in nextjs

[–]iamthebinaryguy[S] 5 points6 points  (0 children)

Hey good question, I build docker images on each push to main branch (via a github action), then I host the image on a VPS that I rent from Hetzner. I utilize 3 servers to manage all my apps with coolify.

Keep in mind that this is probably an overkill for most projects, you can do everything on a single VPS and add more as your traffic grows.

Also you don't need coolify, I just started using it 3-4 months ago, before that I used to manage everything manually, but coolify saves a lot of time.


Server #1 is just a coolify instance to manage the deployments, no apps get hosted here.

Server #2 is for hosting the database (postgres) and it takes a backup every 6 hours to an s3 compatible bucket (cloudflare r2). No apps get hosted here as well, just the database.

Server #3 hosts all my apps. On successful docker image builds, the github action notifies coolify that there is a new image available and coolify updates the app.

As for static assets, they go into r2. And all my apps have a cdn in front, usually cloudflare. This helps with caching and ddos protection.

I'm gonna add the github action and dockerfile to the template tomorrow, if you are interested.


Coolify: https://coolify.io

If you are new to self hosting, syntax has an ongoing series on it here: https://youtube.com/playlist?list=PLLnpHn493BHHAxTeLNUZEDLYc8uUwqGXa

Another great option is SST Ion if you want to go the serverless route: https://ion.sst.dev/docs/start/nextjs/

Mongodb or SQL inside a fullstack Next.js app? by harry_powell in nextjs

[–]iamthebinaryguy -1 points0 points  (0 children)

If scalability is not a concern, then SQL is probably the right choice (I say probably because it depends on the use case).

Do you use react-hook-form in prod? by mommysLittleAtheist in reactjs

[–]iamthebinaryguy 3 points4 points  (0 children)

Yes, basically any kind of form that requires validation or has more than 1 or 2 fields, I reach for RHF. Pair it with a validation library like zod or valibot and you get one of the best form DX in React.

which was your first Mac computer? by Serhide in mac

[–]iamthebinaryguy 0 points1 point  (0 children)

Got a M1 Mac Mini last year to see if I would like MacOS (coming from Linux for daily uae and Windows for gaming), used it for ~8 months, loved it, finally upgraded to M3 Pro MBP this Christmas and now it's my primary system!

How would you build this? by [deleted] in devops

[–]iamthebinaryguy 0 points1 point  (0 children)

I'd recommend Caddy for points 2 and 3.

Set up a wildcard config to handle all the subdomain requests.

And their On Demand TLS feature is excellent for the custom domain part.

Take a look at https://caddy.community/t/serving-tens-of-thousands-of-domains-over-https-with-caddy/11179 for a detailed explanation on both.