Colin pfp
Colin
@colin
@nickcherry what stack is the Warpcast web app using? Would love to hear about design decisions etc
2 replies
0 recast
0 reaction

Nick Cherry pfp
Nick Cherry
@nickcherry
Knowing that we would want OpenGraph support and eventually SEO, we seriously considered SSR solutions like Next and Remix. Ultimately, though, we felt that they introduced a fair amount of complexity with relatively little upside – the biggest benefit being "free" server-side rendering for OG and SEO.
1 reply
0 recast
0 reaction

Nick Cherry pfp
Nick Cherry
@nickcherry
A CSR solution was simpler and I would argue potentially more performant, but we still needed to solve the OG problem. We considered outsourcing the server-side rendering to someone like prerender.io, but we didn't love the idea of relying on a third-party, particularly when our product reqs weren't that demanding.
3 replies
0 recast
0 reaction

Nick Cherry pfp
Nick Cherry
@nickcherry
Ultimately, we ended up implementing a simple Next server (opting for the framework just for convenience of having out-of-the-box support for JSX) to live in parallel with the web app, which is all just client-side rendering. We configure Cloudflare to look at the incoming user agent, and route to the appropriate site
1 reply
0 recast
0 reaction

Nick Cherry pfp
Nick Cherry
@nickcherry
For example, a request for @dwr.eth's profile from TwitterBot will go to https://ssr.warpcast.com/dwr, which will server-side render OG meta tags and some very basic HTML for SEO. All non-bot traffic will just get served https://warpcast.com/dwr. This approach adds some maintenance burden, but the benefits are
3 replies
0 recast
0 reaction

payton pfp
payton
@payton
Is there a standard used for identifying bots via user agent? I've seen some lists floating around, but not necessarily a standard.
1 reply
0 recast
0 reaction

payton pfp
payton
@payton
Worded a but better: how do you identify that a client would benefit from OG tags based on user agent?
1 reply
0 recast
0 reaction

Nick Cherry pfp
Nick Cherry
@nickcherry
It is not at all standardized, and figuring out the user agents for each site was rather cumbersome. We are surely missing many in our allowlist, but I think we have most of the big ones at this point. I don't actually know what the full regex is at the point, but maybe @sds can share.
2 replies
0 recast
0 reaction

Shane da Silva pfp
Shane da Silva
@sds
I’m sure there’s a long tail of user agents we’re not handling, but the substring “bot” goes a long way.
0 reply
0 recast
0 reaction