-
Notifications
You must be signed in to change notification settings - Fork 0
Description
After a call with @uncledavo and examining both Frames.js and Frog codebases, I've realized that Code Street editor and debuggers for each library has to be separate. The debuggers provided by these libraries are designed as standalone applications, not reusable libraries. They not only provide a UI but also require a server to fetch frames and manage sessions (which are handled by domain-specific cookies or localStorage).
The Frog debugger is tightly integrated with Hono, while Frames.js is heavily dependent on Next.js. Attempting to extract the core logic and port it to a more agnostic environment would require significant initial work and ongoing maintenance effort, especially considering v0-sque nature of the these libraries.
Instead of integrating the core logic from these libraries into the Code Street editor, the debuggers will be exposed as services (each on it's own domain to not pollute cookies and local storage) and embed them as iframe in Code Street. This approach allows to work with the debuggers without dealing with their internal complexities.
Some integration work for triggering refresh and authorizing Farcaster users will have to be done, probably through inter-window communication passing using comlink or jsrpc.
Nice side effect here is that frame.town will expose those debugger services as public goods for Farcaster community. People will be able to debug frames without running their own servers in similar fashion block explorers allow people to read blockchain without requiring them to use chain clients in terminal.