j3llyb3ans
j3llyb3ans
Explore posts from servers
TTCTheo's Typesafe Cult
Created by j3llyb3ans on 7/16/2023 in #questions
Paypal webhooks
did a couple more checks, turned on all events for the webhook from inside my dashboard and apparently i was receiving PAYMENT.SALE.PENDING events, which is really strange but i'm pretty sure that the payments worked and i tried logging into my buyer sandbox account and indeed money was transferred this is really weird
3 replies
TTCTheo's Typesafe Cult
Created by j3llyb3ans on 6/12/2023 in #questions
Nextjs (edge runtime) logging provider/library for prod
thanks!
8 replies
TTCTheo's Typesafe Cult
Created by j3llyb3ans on 6/12/2023 in #questions
Nextjs (edge runtime) logging provider/library for prod
i'll check them out, are they both edge-compatible?
8 replies
TTCTheo's Typesafe Cult
Created by j3llyb3ans on 6/11/2023 in #questions
NEXT edge api routes: sending a json response
Old code using normal NEXTjs runtime (works just fine):
if (newRefreshToken) {
res.setHeader('Set-Cookie', [serializedAccessToken, serializedRefreshToken ?? ''])
} else {
res.setHeader('Set-Cookie', [serializedAccessToken])
}

res.status(200).json({
accessToken: newAccessToken,
refreshToken: newRefreshToken ?? '',
expiresAt: Date.now() + 3600 * 1000,
})if (newRefreshToken) {
res.setHeader('Set-Cookie', [serializedAccessToken, serializedRefreshToken ?? ''])
} else {
res.setHeader('Set-Cookie', [serializedAccessToken])
}

res.status(200).json({
accessToken: newAccessToken,
refreshToken: newRefreshToken ?? '',
expiresAt: Date.now() + 3600 * 1000,
})
if (newRefreshToken) {
res.setHeader('Set-Cookie', [serializedAccessToken, serializedRefreshToken ?? ''])
} else {
res.setHeader('Set-Cookie', [serializedAccessToken])
}

res.status(200).json({
accessToken: newAccessToken,
refreshToken: newRefreshToken ?? '',
expiresAt: Date.now() + 3600 * 1000,
})if (newRefreshToken) {
res.setHeader('Set-Cookie', [serializedAccessToken, serializedRefreshToken ?? ''])
} else {
res.setHeader('Set-Cookie', [serializedAccessToken])
}

res.status(200).json({
accessToken: newAccessToken,
refreshToken: newRefreshToken ?? '',
expiresAt: Date.now() + 3600 * 1000,
})
---- on a related note, how do i set two cookies with Response ? is it this way?:
'Set-Cookie': `${serializedAccessToken},${serializedRefreshToken}`
'Set-Cookie': `${serializedAccessToken},${serializedRefreshToken}`
it also doesn't help that there's barely anything about the Response constructor on MDN
3 replies
TTCTheo's Typesafe Cult
Created by j3llyb3ans on 4/7/2023 in #questions
Supabase vs Planetscale for a regular SAAS app
i see, thanks! this looks really promising i guess it can be done, only thing i have to figure out now is regional edge (outside of vercel at least)
47 replies
TTCTheo's Typesafe Cult
Created by j3llyb3ans on 4/7/2023 in #questions
Supabase vs Planetscale for a regular SAAS app
the 100 hours is for netlify, the 10ms is for cloudflare's workers as for netlify idk what the timeout for their edge functions are, haven't found info from their docs
also 10ms is compute only, not awaiting fetch calls n' stuff
Yeah, but what i'm wondering about in particular is the execution time I guess for confirming auth status it'd probably fall under 10ms, but what about DB calls, i'm pretty sure 10ms isn't enough to query a DB and receive a response right? Or am i misunderstanding something?
47 replies
TTCTheo's Typesafe Cult
Created by j3llyb3ans on 4/7/2023 in #questions
Supabase vs Planetscale for a regular SAAS app
47 replies
TTCTheo's Typesafe Cult
Created by j3llyb3ans on 4/7/2023 in #questions
Supabase vs Planetscale for a regular SAAS app
Hey, was wonder if i can ask u about something again I'm currently on netlify but i checked out cloudflare recently because netlify has a very small limit of 100 hours for their functions (i'm assuming the limit applies to serverless functions, not edge functions, though i'm not rly sure) I checked clouflare and apparently they only support edge runtime for a fullstack NEXT app. does that mean that you write all of your pages and api routes with an edge function? Also, does cloudflare have something similar to vercel's regional edge functions? (https://youtu.be/_w0Ikk4JY7U?t=355).
47 replies
TTCTheo's Typesafe Cult
Created by j3llyb3ans on 4/26/2023 in #questions
Need advice on SVGs for creating custom shapes for react/next
thanks!
4 replies
TTCTheo's Typesafe Cult
Created by thejhonny on 4/7/2023 in #questions
Tailwind or Chakra?
like the site itself
45 replies
TTCTheo's Typesafe Cult
Created by thejhonny on 4/7/2023 in #questions
Tailwind or Chakra?
i mean for things that aren't dashboards
45 replies
TTCTheo's Typesafe Cult
Created by thejhonny on 4/7/2023 in #questions
Tailwind or Chakra?
i'm also curious about shadcn's bundle sizes
45 replies
TTCTheo's Typesafe Cult
Created by thejhonny on 4/7/2023 in #questions
Tailwind or Chakra?
how are mantine's bundle sizes? I've used chakra once it was quite nice and customizable but the budle size was enormous.
45 replies
TTCTheo's Typesafe Cult
Created by j3llyb3ans on 4/7/2023 in #questions
Supabase vs Planetscale for a regular SAAS app
thanks again!
47 replies
TTCTheo's Typesafe Cult
Created by j3llyb3ans on 4/7/2023 in #questions
Supabase vs Planetscale for a regular SAAS app
just checked out cloudflare, looks nice i'll prob go with them for the domain name where do you usually host your apps? I've been suggested to go with either netlify or cloudflare pages. (i was initially going to go with vercel since it's a NEXT app, but vercel disallows commercial use on their free tier)
47 replies
TTCTheo's Typesafe Cult
Created by j3llyb3ans on 4/7/2023 in #questions
Supabase vs Planetscale for a regular SAAS app
thanks, checking out cloudflare rn
47 replies
TTCTheo's Typesafe Cult
Created by j3llyb3ans on 4/7/2023 in #questions
Supabase vs Planetscale for a regular SAAS app
i'm guessing with a stack similar to that, the only thing you're probably going to pay for @ the initial stages would be the domain name? which i assume would be something like namecheap?
47 replies
TTCTheo's Typesafe Cult
Created by j3llyb3ans on 4/7/2023 in #questions
Supabase vs Planetscale for a regular SAAS app
funny cos lately, i've been thinking if there's a way to combine some services to get away with a free tier for as long as possible that sounds really up my alley, i might just try that, thanks!
47 replies
TTCTheo's Typesafe Cult
Created by j3llyb3ans on 4/7/2023 in #questions
Deployment options for Next (aside from vercel) for a small SAAS app
jeez, i shouldn't have listened to the guy who told me netlify was only for frontend 😭
10 replies
TTCTheo's Typesafe Cult
Created by j3llyb3ans on 4/7/2023 in #questions
Deployment options for Next (aside from vercel) for a small SAAS app
yeah, will definitely consider cloudflare now about netlify, i thought they only deployed full-frontend apps, didn't know they also provide deployment for node? will def check that out
10 replies