Trader Launchpad
Explore posts from serversDTDrizzle Team
•Created by Trader Launchpad on 4/29/2024 in #help
How to structure posts with categories using drizzle and postgres (supabase)
Ah that works most of the way. I think i can figure it out from here!
THANK YOU
8 replies
DTDrizzle Team
•Created by Trader Launchpad on 4/29/2024 in #help
How to structure posts with categories using drizzle and postgres (supabase)
@Sillvva I get error:
TRPCClientError: invalid reference to FROM-clause entry for table "create-t3-app_businessEntity
8 replies
DTDrizzle Team
•Created by Trader Launchpad on 4/29/2024 in #help
How to structure posts with categories using drizzle and postgres (supabase)
I will test and let you know asap
8 replies
DTDrizzle Team
•Created by Trader Launchpad on 4/29/2024 in #help
How to structure posts with categories using drizzle and postgres (supabase)
My Trpc query:
8 replies
DTDrizzle Team
•Created by Trader Launchpad on 4/29/2024 in #help
How to structure posts with categories using drizzle and postgres (supabase)
8 replies
TTCTheo's Typesafe Cult
•Created by Trader Launchpad on 2/16/2024 in #questions
CTA v7.26.0 is giving "fetch is not a function" error
@cje
Found the answer. I had to modify next.config:
7 replies
TTCTheo's Typesafe Cult
•Created by Trader Launchpad on 2/16/2024 in #questions
CTA v7.26.0 is giving "fetch is not a function" error
it does. Also spinning up a ct3app and downgrading the next version to 13.4 fixes the issue. It is something to do with next between 13.4 and 14.x. I believe has something to do with no longer needing the serverAction experimental flag, or the fact that nextjs14 no longer polyfills node-fetch.
i have searched for a few days, on nextjs and monday-sdk-js githubs, opened a few issues and discussions. No one has responded.
7 replies
TTCTheo's Typesafe Cult
•Created by Trader Launchpad on 2/16/2024 in #questions
CTA v7.26.0 is giving "fetch is not a function" error
I am still struggling with this.
7 replies
Thoughts on how to integrate t3 app, connectkit web3 auth, nextjs middleware, and trpc
The matcher is stock from nextjs documentation, and it runs on every route including /api and trpc calls. When I have this middleware enabled I am getting an error on the front page of t3 app, on the standard post.hello trpc call:
When I disable the middleware, this issue goes away. I believe it is due to my nextjs middleware matcher running on every request, and blocking /siwe as a publicpath if they ARE authenticated, sending them to / and something is getitng lost on the trpc side. To clarify on a page reload the middleware is hit multiple times, once on "/", once on "/siwe" which is triggered every page reload by the ClientProvider. The error only happens on the call that originated from "/siwe"
Strangely if I simply move /siwe to /api/siwe, the error goes away. Also if I remove the logic the error goes away.
What is the correct way to setup the nextjs middleware in this situation? Should I just add /siwe as an ignored route in the middleware matcher? Should i be putting my /siwe logic in trpc routes and calling it that way (api.user.getNonce, api.user.verifyNonce. api.user.createSession, ect)?
4 replies
TTCTheo's Typesafe Cult
•Created by Trader Launchpad on 2/14/2024 in #questions
Thoughts on how to integrate t3 app, connectkit web3 auth, nextjs middleware, and trpc
The matcher is stock from nextjs documentation, and it runs on every route including /api and trpc calls. When I have this middleware enabled I am getting an error on the front page of t3 app, on the standard post.hello trpc call:
When I disable the middleware, this issue goes away. I believe it is due to my nextjs middleware matcher running on every request, and blocking /siwe as a publicpath if they ARE authenticated, sending them to / and something is getitng lost on the trpc side. To clarify on a page reload the middleware is hit multiple times, once on "/", once on "/siwe" which is triggered every page reload by the ClientProvider. The error only happens on the call that originated from "/siwe"
Strangely if I simply move /siwe to /api/siwe, the error goes away. Also if I remove the logic the error goes away.
What is the correct way to setup the nextjs middleware in this situation? Should I just add /siwe as an ignored route in the middleware matcher? Should i be putting my /siwe logic in trpc routes and calling it that way (api.user.getNonce, api.user.verifyNonce. api.user.createSession, ect)?
4 replies
TTCTheo's Typesafe Cult
•Created by Trader Launchpad on 2/14/2024 in #questions
Thoughts on how to integrate t3 app, connectkit web3 auth, nextjs middleware, and trpc
Then i have setup a custom nextjs middleware that checks the cookie, and redirects based on authenticated or unauthenticated status:
4 replies
TTCTheo's Typesafe Cult
•Created by Trader Launchpad on 1/29/2024 in #questions
Difference between NextAuth + firebase adapter, NextAuth + drizzle adapter, and just using firebase?
6 replies
TTCTheo's Typesafe Cult
•Created by Trader Launchpad on 1/29/2024 in #questions
Difference between NextAuth + firebase adapter, NextAuth + drizzle adapter, and just using firebase?
@Matheus Lasserre
Lets say I use Nextauth + drizzle adapter (planetscale) and during the nextauth callback I generate a Firebase custom token and save it into the nextauth session:
and then wrap my app in a FirebaseAuthProvider that logs the user in with Firebase:
Then i use trpc and drizzle in my nextjs app to fetch and query manipulate data from my planetscale database. Their is account, user, session, and verificationToken tables in my planetscale database. There is also a user showing up in the Firebase Auth UI, with a uid that is the same as their UID in my planetscale database user table.
What is the implications if I now wanted to add an EXPO app? Would I use expo/react-native firebase package to sign in the user into Firebase only using custom token? Then use the Firebase UID returned to query the planetscale database from within my expo app? Would i need to interact with the nextauth database tables at all?
6 replies
TTCTheo's Typesafe Cult
•Created by Trader Launchpad on 1/28/2024 in #questions
Why is there no SessionProvider wrapping app in next13+ app router boilerplate?
So can i add SessionProvider to a app directory app, so that I can use client side firebase hooks in my client componets?
or should be only be using SessionProvider in nextjs^12 with pages directory?
7 replies
TTCTheo's Typesafe Cult
•Created by Trader Launchpad on 1/9/2024 in #questions
How to find single record in database using trpc and drizzle?
I am still looking for an answer on how to use findfirst with drizzle so it returns a single array rather than an object.
I cannot figure out how to use drizzle, findfirst, and a where clause...
11 replies
TTCTheo's Typesafe Cult
•Created by Trader Launchpad on 1/9/2024 in #questions
How to find single record in database using trpc and drizzle?
I think i figured it out:
11 replies
TTCTheo's Typesafe Cult
•Created by Trader Launchpad on 1/8/2024 in #questions
How to?: Sign In With Ethereum and have a user record created?
If i do need to code in my own logic, would it look something like this, and should i go through a trpc route?:
5 replies
TTCTheo's Typesafe Cult
•Created by Trader Launchpad on 1/8/2024 in #questions
How to?: Sign In With Ethereum and have a user record created?
5 replies
TTCTheo's Typesafe Cult
•Created by Tribe on 12/25/2023 in #questions
Adding Supabase to TRPC context
it should work locally with the edge runtime?
on every t3 app I have worked in it always gives me errors developing locally with runtime=edge, on my windows pc and macbook :/
11 replies