oz
Explore posts from serversTTCTheo's Typesafe Cult
•Created by oz on 9/29/2024 in #questions
Best NextJS Logging Stack?
Hey guys so I am working on a NextJS eCommerce application and I also have other apps I have in prod and I am not happy with how I am handling logging.
A big feature I want is one that easily allows local logs as well that way I can filter by environment and see whats going on.
Looking for a solution that can handle large environments with multiple environments / branches
As of my research I found these stacks:
BetterStack + Winston/Pino
Axiom - I dont see a way to do local environments though
Sentry - not ideal as it seems more of a not focussed feature
14 replies
TTCTheo's Typesafe Cult
•Created by oz on 8/1/2024 in #questions
Embedable Scripts
Hey guys, I’m trying to make an embedable script that any website can use HTML script tag to embed. I want to make my script obviously looking very nice and even somehow inherit the ShadCN and styles. How would I do this? I’m unsure how to customize the style beyond standard HTML styling. Also, is this bad, with this slow down the website to have such complex components?
This is for my next JS 14 application.
5 replies
TTCTheo's Typesafe Cult
•Created by oz on 7/12/2024 in #questions
Best Frontend Testing System?
For my NextJS app what is the BEST software out there for a small freelance team to create tests for our clients projects so as we develop we ensure each input, form, page, drawer, etc have the info and function as they need.
Bonus if it connects to github to pass / fail pull requests based on those tests.
Also we will be using Vercel for hosting on most if not all platforms if that info is helpful.
What do you guys recommend?
24 replies
TTCTheo's Typesafe Cult
•Created by oz on 7/12/2024 in #questions
Drizzle where query problems
I am using drizzle. In my below aPI I cant get my where request to correctly get me my restricted products. When i call the API, it says no restrictions found for product id 63905 which is wrong as I have the below row that DOES have that ID????
db obj example sent in next msg
18 replies
TTCTheo's Typesafe Cult
•Created by oz on 7/9/2024 in #questions
Cost Efficient XL Generation for Large Products
Hey guys, title could have been better, but I am basically trying to setup an XML product feed for my store, which has 20k+ products including variants, and it constantly grows and shrinks throughout each day. I want the feed to rerun every 15 minutes, and I want to host this on vercel. I am worried about serverles costs since this is a function, below is my code with my approach I am doing caching, is this the most efficient way to handle this to reduce costs in Vercel? Is serverless (vercel) hosting bad for this use case?
Then I would setup a cron job in vercel
9 replies
TTCTheo's Typesafe Cult
•Created by oz on 7/7/2024 in #questions
Route workin in Dev and not Prod?
Hey guys I have a route defined (code below) that in dev works fine, I call it with PUT and it does just that fine. I am using latest NextJS 14 and am hosgting prod env in Vercel. In prod I get:
But the same call works perfectly fine in dev
6 replies
TTCTheo's Typesafe Cult
•Created by oz on 7/3/2024 in #questions
Advice for LARGE Product Embedding for AI?
Hey guys asking for advice. I want to make an AI chat bot. I want it to be able to chat about ANY product we have, but the store I am working with has 10k+ products and more get added / edited everyday.
I am using openai, what would be the best way to feed the AI about these products? Would it be crazy expensive?
2 replies
TTCTheo's Typesafe Cult
•Created by oz on 6/19/2024 in #questions
Best PDF Parsing Practices?
I have a system that gets a bunch of legal documents. The documents are all for the same legal case type but they are not the same documents, as each lawyer has their own wording, they look and are formatted diff but have the same important info of course. I want to extract certain data. What is the best approach for this?
As of now I am leaning towards: Anyscale JSON Mode that returns json object of vals I ask for, thoughts? https://www.anyscale.com/blog/anyscale-endpoints-json-mode-and-function-calling-features
^ Credit to Rauch 🙂 https://github.com/rauchg/next-ai-news
As of now I dont see how I can escape AI for this, but want to ensure I maximize the best model/service for this and not waste money on things I dont need (like throwing chatgpt-4o for example which is much more expensive for a model I dont need)
Any ideas from anyone who did things similarly?
2 replies
TTCTheo's Typesafe Cult
•Created by oz on 6/18/2024 in #questions
UploadThing - Cant pass userId
Hey guys, my lack of knowledge is showing here 😓
I am trying to pass the input prop to pass my user ID but I cant use that prop since I am not really using the base UploadComponent as I followed the nextJS docs and it uses a generator. So it says input is not a valid prop, how do I fix this?
/api/uploadthing/core.ts
page.tsx
22 replies