Liam
Explore posts from serversTTCTheo's Typesafe Cult
•Created by Liam on 12/21/2023 in #questions
Any idea if @vercel/kv supports piping?
For anyone looking at this in the future, found some docs on this with https://tsdocs.dev :) https://tsdocs.dev/docs/@vercel/kv/1.0.1/classes/_internal_.Pipeline.html
4 replies
TTCTheo's Typesafe Cult
•Created by RockBacon on 8/1/2023 in #questions
Prevent malware upload to uploadthing/s3 bucket
No problem!
7 replies
TTCTheo's Typesafe Cult
•Created by JulieCezar on 7/31/2023 in #questions
T3 or App router?
I'm using app router atm w/ api routes but I def miss TRPC for some stuff. Hoping that in the near-ish future server actions move out of alpha, get better docs, and stuff like next-safe-action and zact can serve as a pseudo replacement for TRPC with less boilerplate since you won't have to define stuff like procedures and what not.
4 replies
TTCTheo's Typesafe Cult
•Created by RockBacon on 8/1/2023 in #questions
Prevent malware upload to uploadthing/s3 bucket
Nyx is probably right that it would not hurt to post this in #uploadthing, but afaik this is not a feature built into upload thing.
One thing you could do it setup a node server that checks files and then writes them to S3 / Upload Thing. Depending on your file size / quantity though, this may need to be a actual node server running on something like https://railway.app as payload size and runtime are limited on serverless. Alternatively, you could upload files and then run checks later marking it in your DB or something which would make it so that when people upload stuff it does not take a long time scanning it (though the stuff about the node server still applies).
This library seems like it would work well for your use case. Obviously no lib is foolproof but this one does look relatively solid.
https://www.npmjs.com/package/clamscan
7 replies
TTCTheo's Typesafe Cult
•Created by digeman on 7/31/2023 in #questions
Setting up and testing endpoints (for t3 stack)
5 replies
TTCTheo's Typesafe Cult
•Created by lokihardt on 7/28/2023 in #questions
What's the major difference between 'create-t3-app' and 'create-t3-turbo'?
Nope, there will def be a migration process but I'd say 95% of stuff will just be drop in and ready role. The only things that you'll have to do is putting your TRPC route inside the package turbo provides so that they shareable between the Website and Expo app.
6 replies
TTCTheo's Typesafe Cult
•Created by lokihardt on 7/28/2023 in #questions
What's the major difference between 'create-t3-app' and 'create-t3-turbo'?
If you have some experience, I'd go with turbo and then you'll find it very easy to begin integrating the expo app when / if the time comes. If you are new-ish to webdev though, turbo could have some additional stuff that might be a bit much when getting started, so your mileage may vary.
6 replies
TTCTheo's Typesafe Cult
•Created by Aguilar on 7/27/2023 in #questions
easy to use chatbot tools
There is the Vercel AI SDK which makes the whole part of creating that streaming text effect easier and managing your chat. You probably won't find anyone running the models for free though, and likley have to pay to either host a model or use something like Open AI's API.
https://sdk.vercel.ai/docs
5 replies
TTCTheo's Typesafe Cult
•Created by Liam on 7/27/2023 in #questions
Add Generic To Response in Next
Yep, I am already using zod. I just want to try and catch any footguns as early as possible (and can't use TRPC in this project). If I set the return type to some kind of that wouldn't be lying right? I am just not sure if this kind of type is creatable.
7 replies
TTCTheo's Typesafe Cult
•Created by n3sonline on 6/18/2023 in #questions
Recommended architecture for my simple web scraping data visualizer for gym capacity
I'd consider giving https://railway.app a shot if you have ran out of free tiers and are looking to host a db easily and cheap. In my experience even apps with moderate usage only cost $2 / month on the db side there. Highly reccomend.
16 replies
TTCTheo's Typesafe Cult
•Created by Liam on 7/4/2023 in #questions
Drizzle Insert w/ Relation
No problem!
6 replies
TTCTheo's Typesafe Cult
•Created by Liam on 7/5/2023 in #questions
Counting rows in Drizzle ORM
Thanks! That seems to be working.
6 replies
TTCTheo's Typesafe Cult
•Created by ._perry_. on 7/4/2023 in #questions
Making a enum/union type like in prisma, but with drizzle
Thanks!
9 replies
TTCTheo's Typesafe Cult
•Created by Liam on 7/4/2023 in #questions
Drizzle Insert w/ Relation
The way to do this in drizzle winded up being just putting everything in a transaction.
Docs: https://orm.drizzle.team/docs/transactions
6 replies
TTCTheo's Typesafe Cult
•Created by n3sonline on 6/18/2023 in #questions
Recommended architecture for my simple web scraping data visualizer for gym capacity
For sure, if that is the reason n3s def check out planetscale.
16 replies
TTCTheo's Typesafe Cult
•Created by n3sonline on 6/18/2023 in #questions
Recommended architecture for my simple web scraping data visualizer for gym capacity
Agreed, but if they really don't want to spin up a db...
16 replies
TTCTheo's Typesafe Cult
•Created by n3sonline on 6/18/2023 in #questions
Recommended architecture for my simple web scraping data visualizer for gym capacity
In Next, this is as simple as exporting
inside of the page component.
16 replies
TTCTheo's Typesafe Cult
•Created by n3sonline on 6/18/2023 in #questions
Recommended architecture for my simple web scraping data visualizer for gym capacity
One way you could do it if you deploy on vercel and use next js instead of react + vite, you could just use next cache. This would essentially just generate a static version of that site and serve it for the next 15 min at which point it would regenerate the site. In this case you could also use the sheets API for the data without having to spin up a db.
If not that, then the most "scalable" way might be to put the data in a json blob on something like S3, though I'd be weary of caching weirdness and such.
16 replies
TTCTheo's Typesafe Cult
•Created by ._perry_. on 7/4/2023 in #questions
Making a enum/union type like in prisma, but with drizzle
Hey did you wind up figuring out how to do this?
9 replies
TTCTheo's Typesafe Cult
•Created by cornflour on 6/21/2023 in #questions
implement discord-like account switching
Have not looked through this but might be worth checking out? https://dev.to/oreoluwabs/building-an-account-switcher-with-nextjs-and-next-auth-5cnf
8 replies