Theo's Typesafe Cult

TTC

Theo's Typesafe Cult

Join the community to ask questions about Theo's Typesafe Cult and get answers from other members.

Join

Any good `Prisma` alternative for other languages?

Are there any good Prisma alternatives for rust, go, kotlin and java backends? I really like how Prisma generates raw sql code instead of language code, and Prisma Studio for ui to interact with DB. I'd like to use those features in my backend which is not in js/ts and use rust(or any language I mentioned above). (I'm not looking for a single solution for every language, it's good if there is one, but it's fine if every language has a different ORM that's on par with Prisma.)...

E-commerce website to master full stack Development

Hey guys, i m a normal reactjs developer ( frontend) and a intermediate django developer. I have planned a very complex e-commerce project in a markdown file. Basically i wanna create this as a personal project to master some technologies like ( Frontend, Backend, Postgresql) i have some options and i confused between them. Please explain me that what stack is best for my learning project and why should I use that instead of two others ...

React not updating the attribute for an HTML element

I've done all the sanity checks. I'm passing a placeholder to an <input /> element. console.log? prop is changing React dev tools? prop is changing Production? prop is not changing (the above two still show the change) ...

vercel deployment error with middleware.ts

My original vercel deployment worked perfectly but after adding the middleware.ts file, every time I would use git push my deployment would get an error, any help please?

Why do we not use eslint-plugin-prettier in t3 app

Not including this seems like there would be overlap between eslint and prettier. Am I missing something?

NextAuth manual email verification

Im trying to implement manual email verification. So I created a VerificationToken with the identifier and token but when going to the link I'm always getting an error.
http://localhost:3000/api/auth/callback/email?callbackUrl=http%3A%2F%2Flocalhost%3A3000%2Fapp%2Fdashboard&token=rbaykgmrwek9nhpocro27emr1uobwq5axonlq4ykarg080jj9byjxub5bt7ztj2i&email=[EMAIL]
http://localhost:3000/api/auth/callback/email?callbackUrl=http%3A%2F%2Flocalhost%3A3000%2Fapp%2Fdashboard&token=rbaykgmrwek9nhpocro27emr1uobwq5axonlq4ykarg080jj9byjxub5bt7ztj2i&email=[EMAIL]
...

Nextjs having infinite errors

Hello I keep having this error and it keeps retrying and makes the page non responsive. It's almost like a useEffect kind of situation

Do we have an update on t3 stack for the next 13 app directory?

Since afaik the app directory is now stable, are we going to see the t3 stack support it soon? I've looked through github issues but the topic seems to be a little dead. Am I missing something? In the meantime, should be plow on with the pages directory? It seems like trpc, for instance, isn't that well suited to the new app directory approach...

Check DB or update session when DB role changes

I need to block access to certain routes based on the user's role and companies associated with they. The problem I'm having is that if a user is already connected with a session, when their role is updated on the DB the session does not update, so it keeps the same role and companies, keeping the same permission as before....
Solution:
This is my initial implemetation, works great: ``` import { signIn, useSession } from "next-auth/react"; import { useRouter } from "next/router"; import { useEffect } from "react";...

How do i fetch data from a TRPC endpoint in getStaticProps and getServerSideProps?

currently trying to do it like this ``` export async function getServerSideProps(context: any) { const { params, req, res } = context; const slug = params.slug;...

Monitoring APIs hosted on Vercel.

Hello everyone, Does any one know a free tool that helps monitor application hosted on Vercel. Bonus points if works well with APIs, because I have an API deployed on Vercel and I'd like to monitore it....

how to make base url change based on environment

hi guys, i deploy my project in vercel and i wondering how to get base url based on enviroment but still works in local, any idea on how to do it right thanks?

What metadata to store when uploading files?

What metadata should I store/is usually stored when uploading a file, image etc.? An how is it stored? Is there a single attribute in the db like metadata or is it somehow split?...

Dynamically generated Routes in Next

Hello! I have an existing React application using react router, where i create the routes dynamically using a response i get from a backend and then use the application as usual. I was recently assigned to migrate this to a Next app using the app router because of the react server components which we could really benefit from. Is there any way to generate routes dynamically in next. And no i'm not talking about the [slug] or [...slug] i want to create actual routes like /users or /products dynamically. I want to recreate this in Next, question in this case is an array of paths i get from a backend call in json....

NextAuth getting session token in the backend.

Is there a way to get the session token in the backend? whats the best way to do this? Edit: got it from req...

prisma data browser

What are some alternatives to prisma data browser? Essentially prisma studio, but on the internet (not local).

bloody confused by the new Next.js server actions

Does anyone understand how server actions are pulled from the code I write and actually run on the server? The next build process confuses me and the information I can find is super sparse (https://nextjs.org/learn/foundations/how-nextjs-works/buildtime-and-runtime ...) Any hints for blog posts or similar that dive into what results from the next build and how it does its thing would be awesome...

Trouble with Nextimages

any idea why this code isn't rendering the nextimages? I have a component that parses a directory filled with logos, and maps them all to nextimages, then in the page, I try to display them all, but I'm getting: The requested resource isn't a valid image for /home/machi/portfolio/public/logos/mail-clipart-mail-logo-3.png received text/html; charset=utf-8...

next auth vercel

Trying to deploy an app on vercel that use getServerSideProps, code seems to work fine on development but failing after deployment, doesn't seem to be finding the session i tried setting all the required ENV varaibles, could anyone assist?! ```export const getServerSideProps: GetServerSideProps<{ user: User }> = async (context) => {...

Interview Questions for Full-stack Devs

The context: my manager has asked me to help come up with some interview questions for pre-screening screening interviews for full stack developers. We are in a situation where we have to hire hundreds of people a year, across dozens of teams, and we are trying to improve and streamline the current process. The idea of the pre-screening interview is to build up a database of people and being able to "route" them to the correct hiring manager, instead of each manager having to manage their hiring process individually. So basically, I'm just looking for suggestions for interview questions within the following categories: 1. Soft Skills 2. Front End...