McKamyk
Explore posts from serversAarktype
•Created by McKamyk on 4/1/2025 in #questions
string.integer.parse < 100
Here's an actual validator I'm trying to build
I want the input to be a number, potentialy in string form, and less than 28.
How do I build a check on the output of the parse?
39 replies
Aarktype
•Created by McKamyk on 3/31/2025 in #questions
spread and generics
I'm wanting to define a generic, then another generic wrapping and passing through the generic
7 replies
TTCTheo's Typesafe Cult
•Created by McKamyk on 11/9/2024 in #questions
Posthog analytics on api hotpaths.
Hi, I have an app with many APIs we expose to users (Actually tanstack start serverFns). These APIs are calling downstream APIs from one of our providers.
I'd like to get some insight into which of our ServerFns are calling which downstream APIs, and how often.
I'm thinking of using Posthog, because I've heard lots about them.
I have a wrapper I'm putting at the top of all my ServerFns that checks auth and stuff, so I can easily put a
capture({...})
event there, no problem.
I also have wrappers for the downstream apis from our provider that I reuse all over the site, I can easily put another capture({...})
in each of those.
What I'd like to be done though, tie the capture({...})
at the top of the serverFn to all of the capture({...})
s that are done by the downstream apis.
So, I'd like to understand which ServerFns are using the most downstream API credits.
I'm running everything in lambda, if that makes a difference.7 replies
TTCTheo's Typesafe Cult
•Created by McKamyk on 1/11/2023 in #questions
Create T3, appDir, tRPC
So I'm wanting to start new pet project, this'll be the first time I'm using T3 with Tailwind, Next, and tRPC.
I want to use the new experimental appDir setting. When I create a repo with
npm create t3-app@latest
it defaults to the pages/
style. I added experimental: {appDir: true}
to the next config, created a app/
directory, and copy pasted pages/index.tsx
to app/page.tsx
.
But I'm getting errors saying I'm importing a component that needs useState
, which only works on Client Components.
Should I forego T3 and setup Next/Tailwind/Typescript/tRPC manually, or should I adapt T3 into using app/
properly?14 replies