Trader Launchpad
Thoughts on how to integrate t3 app, connectkit web3 auth, nextjs middleware, and trpc
I am prototyping an application using t3 app with trpc, connectkit web3 auth.
I am wanting to use nextjs middleware to protect routes server side.
As part of the connectkit auth flow, I have my application wrapped in a ClientProvider:
Inside ClientProvider I have the web3 providers:
and here is const siwiConfig. It calls the /siwe route on initial load and sets a cookie using iron-session with the nonce inside, then updates that same cookie after authentiucation with wallet address and chain:
4 replies
[How To?] Create a record in database on form submission...
I have an application using trpc, Cloudfare D1 database, and trpc.
I am trying to use a tamagui form component to insert a record into the database.
My trpc route:
My drizzle table schema:
My form component:
When i click the form button, i get a 500 internal error on api/trpc side. Can someone tell me what I am doing wrong, i feel like its obvious but im not getting it.
5 replies
[How To] Properly use trpc UseQuery based on currently selected item
I have a component with a video element and a flatlist. I want to utilize a trpc query to get the videoUri based on the currently selected item.
Here is my working component:
55 replies
[HOW TO?] Call trpc endpoints from vanilla nextJs api routes
Spinoff from an og thread here:
https://discordapp.com/channels/867764511159091230/1032301198990135347
HI! I am wanting to do the same thing...call a trpc route from within a nextjs public api endpoint.
I am using a fresh t3-turbo-with-clerk project which has trpc in packages/api (@acme/api)
here is my apps/nextjs/src/pages/api/post.ts file
28 replies