This is the monorepo for the packages of Mod protocol
See CONTRIBUTING.md
A protocol for Mini-apps that live inside other apps. Starting with Farcaster support
Home Page: https://docs.modprotocol.org
License: MIT License
This is the monorepo for the packages of Mod protocol
See CONTRIBUTING.md
The Editor should wait to fetch the open graph api data for any automatic embed being added (automatic embeds are detected in the editor text). If it fails, such as with the domain "www.test.com", then no embed should be automatically added. This also reduces the "loading" duration, which is currently distracting and sometimes 1-2 seconds.
This will also fix the bug where currently it shows as loading when the open graph request failed.
This doesn't solve really slow loading GIFs, which may need another solution
You can't see where it's going to take you by hovering over a URL embed as would be expected from a URL embed
Server side mini-app logic should be isolated and colocated inside the mods/
directory. This will make it possible for mods to exist as standalone packages and help with maintainability and versioning.
Metadata indexer could also index and cache metadata for urls that are in the cast body but not in the embeds.
Some clients don't publish embeds correctly, and even then, you may want to ignore the publishers formatting and ensure all urls are displayed as open graph embeds.
We should Embed rendering consistent between creating a cast and rendering a cast, with the exception that we need to consider
In this example, will get called excessively if the layout is rendered when the mod is initially rendered
{
type: 'horizontal-layout',
onload: {
type: 'GET',
url: '<url>'
}
}
The opengraph endpoint doesn't return the item count for a ERC721 collection or ERC1155 item
This issue was introduced by the deprecation of the v1 OpenSea API which forced a migration to v2 in #125
A miniapp to render tweets in a prettier way in embeds
The goal to be having the cast in a format in which it can be submitted directly to a hub without having to do any other work.
Starting point: format-cast-for-hub.ts
Todos:
Currently the EmbedsEditor duplicates the logic of rendering detected embeds.
It should make use of the miniapp registry to detect and render a given embed URL and any pre-defined metadata. If no metadata is pre-defined, it should fetch from the OpenGraph API endpoint and then retry rendering with miniapps.
This has multiple benefits
We should look at accessibility/rendering the forms with semantic components and having standard behaviours like enter submitting the form
Replace text mod is breaking links example text: docs.modprotocol.org
I think the paths
definition is causing some packages to be cached and the corresponding packages are not rebuilt when modified due to the turbo build not having the correct dependencies defined
Mod currently supports the following Op
s
type Op = {
AND?: Op | Op[];
OR?: Op[];
NOT?: Op | Op[];
equals?: string;
oneOf?: string[];
notOneOf?: string[];
contains?: string;
startsWith?: string;
endsWith?: string;
regex?: string;
};
It is missing numerical comparators such as greaterThan
, greaterThanOrEquals
, lessThan
, lessThanOrEquals
After uploading a video, the IPFS url is available via the dedicated https://modp.infura-ipfs.io ipfs gateway, as expected, but not via others (e.g. ipfs.io, cloudflare-ipfs.com, w3.link) which prevents opengraph from indexing the embed, and the video player from loading the video via the livepeer API.
We shouldn't be merging PRs that break lint, types or build.
Should probably use off the shelf Github actions
Warpcast now hosts an official channel list on their API https://api.warpcast.com/v2/all-channels
Repro steps:
type "@d" select "@df". It inserts "@df f" instead of just "@df"
. This happens with other names too
Currently on dark mode, the Mini-app icons blend into the background. We should look at how other ecosystems deal with this - perhaps a light
and dark
property inside the image property? and different image sizes? (which)
Some we may want to consider:
rich text, checkbox, date picker, datetime picker, email input, multi select, number input, radio buttons, select menu, time picker, url input, confirmation dialog
We need a placeholder or a faster load or something. Waiting 3+ seconds is not a great experience
Since the mentions aren't stored in the text, and users can later on change their usernames to longer/shorter ones, we should give the users back those characters
The NFT creator user data in the opengraph api endpoint currently returns farcaster user data, but may be joined with other protocol data in other contexts. This data should be scoped by protocol i.e. creator.farcaster
Most commonly happens with zora collect URLs
The opengraph response for https://zora.co/collect/zora:0xde1efa628432ad9cbd400d7fde86314e6b99ec9c/2
is:
"mediaUrl": "https://ipfs.io/ipfs/bafybeibg426qfzmc5v5wpb3mftlunwapmfjbljtam4coo4wzbpovvu5ioi"
which comes from the opensea API.
Replacing the ipfs.io gateway with cloudflare-ipfs.com fixes the issue
You should be able to use @next/image
for image elements instead of <img>
https://warpcast.com/df/0x517afbce
We should consider either a special rule for this domain or to change our User-Agent string
Requires a proposal on how to handle channel search/mentions. Maybe its f/
and uses a similar mechanism to username mentions
Currently we copy paste from https://raw.githubusercontent.com/neynarxyz/farcaster-channels/main/warpcast.json
every so often, we need a better solution
In the example repo, if you're connected to the wrong chain or have insufficient funds, the NFT minter quietly fails. We should show a meaningful error message
Seeing a lot of errors when trying to use this mod that need to be fixed pre wide release
The preview deployment for a frontend uses the production endpoint, rather than the API preview deployment of the branch.
We should ensure we scope new permission definitions to sensible namespaces.
user.wallet.address
is ambigious to the chain the address is on, we should rename it.
web3.eth.personal.sign
is a much better name since it scopes the signature the the chain (eth).
Needs to support
/founders
slash command search in channels dropdown, including the unique channel slug there/
dropdown in editor when mentioning a channelExample: https://warpcast.com/dwr/0xf4c808
If you partially integrate Mod, and pass RenderEmbed
contentMiniApps
that require certain APIs that you aren't providing (such as not providing onSendEthTransactionAction
) we should consider making that incompatible with the types or logging a warning in dev mode.
Make it easy to select emojis - see X for reference
Two images, particularly vertical photos take up a lot of feed space. We should consider making it easy to render these side by side instead
Embeds may have metadata that has a broken link, we should make the Mods that render them fail more gracefully and not render a broken image square. An example is warpcast links which use a private og:image, perhaps to prevent sites like twitter from rendering the cast preview
Mini-apps should only be provided permissions they ask for, and permissions should probably have a reason
field that is a string
Have been working on including support for Zora links: https://linkcaster.xyz/?page=1&filterUrl=zora.co×tamp=latest&channel=global&reaction=
Desktop: some images are being blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. I have already added crossorigin="anonymous" for Zora links as suggested by David here https://warpcast.com/df/0xf692e73b
Examples:
https://zora.co/api/thumbnail/7777777/0xd04f3af1fa6be8ac65a43c679e8437d1113408f6/premint-4
https://zora.co/api/thumbnail/7777777/0x433bee782178d2e2cfc3325fd73b1ee60ad20808/premint-2
https://zora.co/api/thumbnail/7777777/0x34a4bd139aa8c17553f0ec3e8aeacc09f4bfb19f/premint-14
Mobile: most Zora og images are not loading. Two examples:
https://warpcast.com/edurubio/0x3dd09056
https://warpcast.com/0xdesigner.eth/0x1327a041
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.