jeff.kershner
jeff.kershner
TTCTheo's Typesafe Cult
Created by jeff.kershner on 9/24/2023 in #questions
Shadcn-ui -> React Server Components
When scafolding a new t3 app and installing shadcn, should we say yes to Are you using React Server Components? I am specifically not using them, but not sure if this messes anything up in T3. Thanks!
4 replies
TTCTheo's Typesafe Cult
Created by jeff.kershner on 9/18/2023 in #questions
Pusher with Vercel or Netlify?
I have a T3 stack application working locally that sends and receives real-time notifications perfectly well on localhost:3000. When deploying to Netlify or Vercel, the pusher messages don't seem to send, or when they do, it takes 10-30 seconds to send/receive the messages. Just some context. I make API calls with trpc and the api sends a pusher trigger like this:
const pusher = new Pusher({
appId: env.PUSHER_APP_ID,
key: env.PUSHER_KEY,
secret: env.PUSHER_SECRET,
cluster: env.PUSHER_CLUSTER,
useTLS: true
});

export const pusherRouter = createTRPCRouter({
connect: publicProcedure
.input(z.object({ name: z.string(), role: z.number() }))
.query(({ input }) => {
pusher.trigger(env.PUSHER_CHANNEL, env.PUSHER_EVENT, {
event: "connect",
name: input.name,
role: input.role,
role_name: indexToRoleName[input.role],
role_key: indexToRoleKey[input.role]
});

return "success";
}),
...
const pusher = new Pusher({
appId: env.PUSHER_APP_ID,
key: env.PUSHER_KEY,
secret: env.PUSHER_SECRET,
cluster: env.PUSHER_CLUSTER,
useTLS: true
});

export const pusherRouter = createTRPCRouter({
connect: publicProcedure
.input(z.object({ name: z.string(), role: z.number() }))
.query(({ input }) => {
pusher.trigger(env.PUSHER_CHANNEL, env.PUSHER_EVENT, {
event: "connect",
name: input.name,
role: input.role,
role_name: indexToRoleName[input.role],
role_key: indexToRoleKey[input.role]
});

return "success";
}),
...
Any idea how to address this or debug this?
4 replies
TTCTheo's Typesafe Cult
Created by jeff.kershner on 9/5/2023 in #questions
Drizzle with T3 and NextAuth
How difficult is it to use drizzle with NextAuth in T3? I started down the path and ran into all kinds of issues. I eventually worked out all my issues so far but I am concerned at what else I will face in the near future. Looking for suggestions? Should I just continue using drizzle with T3 or wait until it is an option as an ORM in the T3 install (and use Prisma)?
7 replies
TTCTheo's Typesafe Cult
Created by jeff.kershner on 4/21/2023 in #questions
Silly Newbie NextJS question
What causes the upper left tailwind svg (logo) to load late causing the header navbar to shift when switching from the Home to the About menu items? https://rtc-two.vercel.app/ I realize these pages are server rendered and the SVG is being loaded after the page is loaded. But I would assume that after first load, the SVG would be cached and load super fast. Maybe it is just a silly matter of setting an explicit width and height so the shift is not noticeable?
5 replies
TTCTheo's Typesafe Cult
Created by jeff.kershner on 4/20/2023 in #questions
CSS Styling
T3 recommends Tailwind CSS and I think I watch a video from Theo saying to stay away from higher level component level libraries (like DaisyUI).
I realize this is an opinion but since T3 is an opinionated "stack", is this what most people believe? Tailwind CSS? What about Tailwind UI and Headless UI?
9 replies
TTCTheo's Typesafe Cult
Created by jeff.kershner on 4/17/2023 in #questions
What is the backend that runs the server side of NextJS?
This seems like a silly question, but I can't find the answer anywhere. Is the server side of a NextJS app running ExpressJS or something like that when running locally or deployed to Vercel ? I am trying to make the case for using the T3 stack for our next project, but our CTO is against ExpressJS. We run everything in docker images with NGINX, Frontend (react or soon nextjs), Sanic Web server (Python) all in a kubernates cluster. My goal is to simplify the stack and reduce the AWS expenses.
5 replies