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

Scraping Web Page Question

What tool or method can I use to extract specific information from a single web page for my Chrome extension, without the need for extensive web scraping of multiple pages?

What user info do I store in my database???

I'm developing an app using both Prisma and Clerk. With the Clerk API, I can easily get all of the data stored there (like email, username, etc.) using just the user's id. I want to create a Person model in my schema, but I'm super new to data modeling and have no idea what info should go in this object. I know I want to add info that's not part of the Clerk user object, like the users non-unique display name that will be shown alongside their unique username, as well as what groups this user is...

Style based on scroll position

Can anyone help me style an element depending on if other elements are visible at a certain position? Put simply, I'm trying to copy the tailwind docs where the specific section label in the sidebar is highlighted when its corresponding content comes into view: https://tailwindcss.com/docs/scroll-snap-type...

Implement pagination on the server

I'm currently setting a URL parameter with the value of the current page number. I fetch the items by page number on page.tsx and pass them to my client table component. Is this the best way to do this? More details: I'm using Prisma Here's and example of what I'm doing:...

Restricting Tailwind CSS Hero video

I have a hero video on my index page, using mux. I am trying to restrict the video in order for it not to take up the entire page width, i have tried a lot of tailwind classes however none that quite work. Any advice ?

How to migrate t3 from v6 to v7

I have been using t3 stack structure since v6 but now I want to migrate it from v6 to v7. Is there any helper to do it?

mutate with publicProcedure?

I am getting an error TRPCClientError: The string did not match the expected pattern.Object Prototype when attempting to mutate without auth. Is there anyway to fix this? Using Next13.4

Is Drizzle production ready?

Simple as that, can I safely use Drizzle in production?

Build warnings?

here's my signIn .tsx file whats wrong here import {Button, Center, Stack} from '@mantine/core' import {GetServerSidePropsContext, NextPage} from 'next' import {getProviders, signIn} from 'next-auth/react' import {AppProps} from 'next/app'...

Issues Copying wasm files for Vercel/prod using create-t3-app

I'm trying to copy/load wasm files from a node package onnxruntime-web/dist using webpack so I can use it to inference a machine learning model I've trained. I t works locally but not on vercel. I haven't done any real web dev prior to 5 days ago. 1. Live App: https://my-t3-app-pi-three.vercel.app/ 2. Github: https://github.com/startwarfields/t3rra-viz ...

how to upgrade t3 webpack to turbo pack

does it take a lot of work to do it? I've built my app in t3 and has made a lot of progress, I'm still kinda new to this so Idk if it's complicated to do this

What are you guys using for landing pages when creating your app?

I don't have much design experience, i want to deliver high quality and nice looking landing pages. How do i approach that? Just write it in Next, inspired from somewhere or use some CMS?

Can you use NextJS rewrites *only* in development?

My company is incrementally adopting Next (hooray) - but the app is currently being statically exported and served from a Spring Boot app for now (boo). I’d like to have a setup similar to Vite’s server.config where requests to /api can be proxied to an external server during development, but not in production. However, next doesn’t seem to allow output: export and rewrites at the same time, but I don’t mind if rewrites stops working in production....

Suggested First Load JS size

Wondering how big is too big for a first load. Currently my first load is about 250 kb, which is enough for the next.js build to start showing it as red, so I'm assuming that is larger than what is suggested, but I couldn't really find much on what a suggested size for first load js is. It's been a task to try to get the first load down without completely removing Material UI, but before I go through all that figured I'd ask and see what people's average First Load JS is, as well as the "Ideal" size....

TypeScript being grumpy with includes when comparing string[] to MyType[]

So I'm currently working on some checkboxes which correlate to some values for rent syndication. The values are strings of numbers, like this: ['12', '13', '14'] So I'm wanting to check to see if the checked box's value already exists in the array of these values. the values are a string[] as a type. But I have a type of the checkboxes that I'm working on since they pertain specifically to pets. So I have this: ...

nextjs,ts<realted>

Anyone knows how to render an design on to a mock<model> and can control that design like just searching for a package 🥲

turbo clerk auth not working

Just cloned repo from official clerk-turbo template. My app runs just fine, untill I try to log in. I've changes oauth strategy to google, and it works.. kinda. It loads the browser, lets me provide all google credentials, lets me submit, but does not login. Just nothing. No errors, nothing....

Struggling to add client-side environment variables

I am trying to add a client-side env variable to my env.mjs... I added it to the .env file, like so: FOO_URL=https://example.com/...
Solution:
I fixed it... I changed the runtimeEnv object to the following: ` runtimeEnv: {...