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

Why am i unable to upload it?

```ts import { generateUploadButton, generateUploadDropzone, } from "@uploadthing/react";...
No description

Next Auth - Apple sign in - Pages router

Someone here that has done apple auth sign in for next auth with next.js pages router? šŸ¤” Not sure what I am missing but I am getting "invalid_request Invalid client id or web redirect url"...

Writing to a variable defined outside a component or hook is not allowed. Consider using an effect

With the new react compiler, I have a few Writing to a variable defined outside a component or hook is not allowed. Consider using an effect an example of something triggering this is ```ts const onSomeEvent = () => { document.body.style.overflow = showMobileFilters ? "auto" : "hidden";...

Send extra info (student id) to upload functionality

I have this client component: ```javascript "use client"; ...

Ping build with webrtc

Hello guys, I was wondering is the videocall of ping is build with something like webrtc. If yes how are they achieving such a high quality and if no than what are they using?

software architecture of a T3 application

I would like to know the software architecture of a T3 application. Is it based on the MVC or MVVM model? Could you please provide a detailed and simple response?

Can anyone tell me how to use environment variables for different environments within T3 please?

I have .env which is working fine. I want to use .env.development for when I dev and .env.product when I've built and deployed. I can't see anywhere where this can be set, I can see using this the variables don't switch as I expect and simply just default to .env. I've attempted to follow the Next docs to no avail. Am I missing something somewhere?...

Uploading files remain in the uploading state.

Hello, I am really confused why all of my uploads are in the upload state. Is there another way to attach the files I wish to upload to uploadThing? ```JS const customId = uuidv4();...

full stack ideas to ask

I wanna make a Full stack project with MERN, 1st comes to my mind is twitter clone, but it's a little repeating, so I started to think build an app with same features(thread app) like twitter, but with different design, do you guys have any good suggestions for this? BTW, I plan to put this on my portfolio. Pls feel free to tell me your ideas.:thanks:

IndexedDB sharding library feedback

Hi guys, I made an opensource library that handles sharding and am still working on setting up the readme and tutorials. Anyone that wants to check out my code and give feedback?https://github.com/BramPostema/indexeddb-sharding All the feedback is welcome.

Noob, I tried to follow along with the docs but got a different file structure.

Hello, I recently tried to learn the T3 stack and decided to use the official T3 docs. However, I got confused when I ran npm create t3-app@latest and got a different file structure than the one shown at https://create.t3.gg/en/folder-structure anyway my question is how can i get the showen folder-structure

Has anyone tried security testing via DAST software?

The client we're working on has asked for us to have a security testing report for our T3 App. I've looked at options like StackHawk, but I'm wondering if anyone has used any of these before and what their experience was like

Frameworks for testing in monorepos, what are y'all using?

Delicious frameworks please, integration tests, unit test, deployment tests, etc

Unable to upload zips

Hello, I have been trying to upload zips using upload thing I have provided my core.ts, the page where it's being used, and actions.ts where I use zod, the dropdown zone opens my fileexplorer allows me to choose a zip but it doesn't do anything after there is no upload button or loading state...
No description

port is already allocated

``` āÆ ./start-database.sh Error response from daemon: driver failed programming external connectivity on endpoint coffee-zone-postgres (ea8f5bfe2d4aa8f2d63183599f6f1732292849e30c18c381a077f731edf753ae): Bind for 0.0.0.0:5432 failed: port is already allocated Error: failed to start containers: coffee-zone-postgres Existing database container 'coffee-zone-postgres' started...

Hello I'm using react router my biggest problem is re-routing the error from invalid queries

Using React-Router, React-query I've tried using a validator object i was wrapping it across my queries to invalidate any malicious search query from entering query call which was a temp fix but it hurts decoupling and the code is a mess and i cant unravel it. My code structure is that i have a custom hook called in several components all which are shared by the same searchQuery state so they all update at the same time which is good the problem is some invalid queries needs to be errored and not just silently fail where i tried Using HOC which used the same hook and called the same queries i was trying not to, the thing is I'm using supabase as my backend im not that good at it so I dont have a backend function which i can call to validate the query first as a safe checking layer so my queries are called then not used I mean thats as good as i can explain without showing Idk how to here sry i guess but here is my github link if you could take a look. https://github.com/Mohamed-Abdelrazeq/react-e-commerce TLDR. I want to know the best practice to validate search queries and not run my dependant react-queries and if i need the react-query output to invalidate the search query how is it best done in the loader by ensuring query? im still testing trying to figure out the best solution but im kinda in the dark. ...

Sizing to fit parent container, while respecting css "aspect-ratio"

I've been struggling with this for 2 hours so hopefully someone can help me out. I have a div that I need a set aspect ratio, and am using the CSS "aspect-ratio" attribute for this. This div (white) needs to scale to fit the parent container (red), while maintaining aspect ratio. I need my container to be scaled, not just what is shown in the viewport (i.e. no overflow-hidden). I also need this to be pure CSS, as this is in a NextJS server component....
Solution:
ok, solution (for minimal example) was aspect-square h-[min(100vh,100vw)] for my original problem (not shown here) i had to do: aspect-square h-[min(50vw-24px,100vh-210px)] (50vw since there are 2 side by side, and the arbitrary px values guessed/checked until it matched parent) ...

TypeScript Type Mismatch in Microsoft Authentication with Passport

I've created a backend using Microsoft authentication in Express. I'm facing some type errors that are a bit confusing for me. passport.tsx ```js import { Strategy as MicrosoftStrategy } from "passport-microsoft";...