artlu
@artlu
testing basic functionality on multiple clients - will delete https://frames.artlu.xyz/pinned/6546
2 replies
0 recast
3 reactions
agusti
@bleu.eth
Added to my frames can’t tug me now
1 reply
0 recast
3 reactions
artlu
@artlu
haha doesn't work yet! (I think I know why) Sharing here in case it helps others / I can learn from smarter devs: - push as much to front-end as possible in a React SPA, including client-side routing - thin back end (Hono on CF), simple reverse proxy to provide secrets to API providers w/o exposing traffic - frame hits server, which provides fc:frame meta tags and a meta http-equiv="refresh" tag to React SPA route, which contains the frame sdk calls Situation: WC waits for `sdk.actions.ready()` before leaving splash screen to render the frame. This only happens in my React route AFTER the redirect, so it appears to hang. Possible fixes (?): 1/ server-rendered html calls sdk.actions.ready() before redirecting to SPA 2/ don't use SPA. Have Hono serve a React SSR 3/ switch to Remix to keep thin
1 reply
0 recast
2 reactions
artlu
@artlu
we do a little exhaustive search in public: 1/ hit dead end. Can't send pure Javascript in the html, as Warpcast requires calling ready() function via the sdk (per the docs - for good security reasons). Pointless to use my teeny serverless function to send a full React page with useEffect(). 1a/ tried `react-helmet-async` to rewrite headers on-the-fly in the SPA. This needs client-side JS. Before it can execute, it looks like not-a-frame, so it never executes. Giving up on SPA with teeny dynamic redirects. Will rewrite as SSR. Reconsidering Hono Stack (I really like the type-safety across front and back), might go with HonoX or Astro or Remix. If I eventually use Privy Auth for server-side security rather than client-only SIWF, maybe easier to integrate with Astro Auth concepts than HonoX? 🤷
1 reply
0 recast
2 reactions