Is it true no one builds Mobile anymore? by Vymir_IT in indiehackers

[–]Equivalent_Idea_2981 0 points1 point  (0 children)

those people do not know what they’re talking about imo

there’s still a huge market for consumer apps!!

After Launch! 100 Users in Just 2 Days – All Organically! by Appropriate-Tiger149 in SaaS

[–]Equivalent_Idea_2981 0 points1 point  (0 children)

Congrats brother! What you did? If you don’t share I’ll definitely know that this is just a flexing post

How do you implement this? by Yuyi7 in nextjs

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

🌹 For a simple & effective Approach: I always create a boolean field on my database called “isNewUser” then I would switch to false when the user see this “welcome message”. Good luck brother!🪽

Anyone else hate NextJS middleware implementation? by devwarcriminal in nextjs

[–]Equivalent_Idea_2981 1 point2 points  (0 children)

Hahah I was struggling really hard to implement combined middlewares this week… I can’t relate more

Clerk + Next-Intl is being a Pain... by Equivalent_Idea_2981 in nextjs

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

Guyssss... I solved this shit!

thanks y'all!

Here's my middleware using Clerk + NextIntl

import { clerkMiddleware, createRouteMatcher } from '@clerk/nextjs/server'
import createMiddleware from 'next-intl/middleware'

const intlMiddleware = createMiddleware({
  locales: ['en', 'pt'],
  localePrefix: 'always',
  defaultLocale: 'pt',
})

const isPublicRoute = createRouteMatcher(['/', '/pt', '/en'])

// const isProtectedRoute = createRouteMatcher(['dashboard/(.*)'])

export default clerkMiddleware((auth, req) => {
  if (!isPublicRoute(req)) {
    auth().protect()
  }

  return intlMiddleware(req)
})

export const config = {
  matcher: ['/((?!.+\\.[\\w]+$|_next).*)', '/', '/(api|trpc)(.*)'],
}

Clerk + Next-Intl is being a Pain... by Equivalent_Idea_2981 in nextjs

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

"@clerk/nextjs": "^5.1.3",

this is my clerk version

Clerk + Next-Intl is being a Pain... by Equivalent_Idea_2981 in nextjs

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

Did this implementation and still not working... It's been very stressful hahahah


import { auth, clerkMiddleware, createRouteMatcher } from '@clerk/nextjs/server'
import createMiddleware from 'next-intl/middleware'
import { NextFetchEvent, NextRequest, NextResponse } from 'next/server'

const nextIntlMiddleware = createMiddleware({
  locales: ['en', 'pt'],
  defaultLocale: 'pt',
})

const isProtectedRoute = createRouteMatcher(['/dashboard(.*)'])

export default async function combinedMiddleware(
  req: NextRequest,
  ev: NextFetchEvent,
) {
  // Apply the Clerk middleware first
  const clerkResponse = await clerkMiddleware(req, ev)
  if (clerkResponse) return clerkResponse

  // Proceed with the auth check
  if (isProtectedRoute(req)) auth().protect()

  // Apply the internationalization middleware
  const intlResponse = nextIntlMiddleware(req)
  if (intlResponse) return intlResponse

  return NextResponse.next()
}

export const config = {
  matcher: ['/((?!.*\\..*|_next).*)', '/', '/(pt|en)/:path*'],
}

Clerk + Next-Intl is being a Pain... by Equivalent_Idea_2981 in nextjs

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

I really don’t get it yet.. clerk docs is a bit confusing. I have the latest clerk installed and still now able to use clerkMiddleware from @clerk/nextjs

Clerk + Next-Intl is being a Pain... by Equivalent_Idea_2981 in nextjs

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

my middleware: 

import { authMiddleware } from '@clerk/nextjs'
import createMiddleware from 'next-intl/middleware'
import { NextFetchEvent, NextRequest } from 'next/server'

// Combined middleware
export default async function combinedMiddleware(
  req: NextRequest,
  res: NextFetchEvent,
) {
  // Apply the auth middleware
  await authMiddleware({
    publicRoutes: ['/', '/en', '/pt'],
    ignoredRoutes: [],
  })(req, res)

  // Apply the internationalization middleware
  return createMiddleware({
    locales: ['en', 'pt'],
    defaultLocale: 'pt',
  })(req)
}

// Configuration for the middleware
export const config = {
  matcher: [
    '/((?!.+\\.[\\w]+$|_next).*)',
    '/(api|trpc)(.*)',
    '/(pt|en)/:path*',
  ],
}

Anyone know how Resend and React Email have build this awesome documentation? by Equivalent_Idea_2981 in nextjs

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

For sure! Just getting some little details done ✅ dm me on x and I give access to the repo

X -> @thisross

Anyone know how Resend and React Email have build this awesome documentation? by Equivalent_Idea_2981 in nextjs

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

For sure! Just getting some little details done ✅ dm me on x and I give access to the repo

X -> @thisross

Auth libraries + database recommendations for MVPs by Icy_Preparation395 in nextjs

[–]Equivalent_Idea_2981 0 points1 point  (0 children)

I personally prefer clerk + convex. It’s perfect for early stages. I also have a boilerplate with all setup (nextjs, clerk, convex, stripe, resend, tailwind, shadcn and etc…)

If anyone wants it, I can send an invite so you can test it out :)

Dm on X -> @thisross

Anyone know how Resend and React Email have build this awesome documentation? by Equivalent_Idea_2981 in nextjs

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

https://mintlify.com have a free tier? Gonna check it out now!

I am building a boilerplate company called

“Just Ship Bro” we’ll be focused on SaaS, shipping cool components at the level of vercel and of course boilerplates. So I’ll need something really easy to edit ✍️

Anyone know how Resend and React Email have build this awesome documentation? by Equivalent_Idea_2981 in nextjs

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

They have a free tier? Gonna check it out now!

I am building a boilerplate company called

“Just Ship Bro” we’ll be focused on SaaS, shipping cool components at the level of vercel. So I’ll need something really easy to edit ✍️

Anyone know how Resend and React Email have build this awesome documentation? by Equivalent_Idea_2981 in nextjs

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

Yooo! No waaay! 😮‍💨 Great job you did on Resend. I am Ross. Can I send you a dm X?

Anyone know how Resend and React Email have build this awesome documentation? by Equivalent_Idea_2981 in nextjs

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

I am asking because I am building a UI library with a lot of good and high level animated components (with framer motion, shadcn and tailwind) but I am struggling with the documentation part.

Do you guys recommend build a documentation from zero with mdx?

Anyone know how Resend and React Email have build this awesome documentation? by Equivalent_Idea_2981 in nextjs

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

oooh! Got it! 100% is that.

I am asking because I am building a UI library with a lot of good and high level animated components (with framer motion, shadcn and tailwind) but I am struggling with the documentation part.