{"id":15427493,"url":"https://github.com/ftchd/frametrain","last_synced_at":"2025-04-10T03:51:58.005Z","repository":{"id":230478665,"uuid":"779491502","full_name":"FTCHD/frametrain","owner":"FTCHD","description":"Infinitely growing Frames builder with integrated Farcaster Hub APIs and Revenue Sharing.","archived":false,"fork":false,"pushed_at":"2024-11-20T19:38:28.000Z","size":29647,"stargazers_count":30,"open_issues_count":16,"forks_count":30,"subscribers_count":4,"default_branch":"dev","last_synced_at":"2025-02-18T05:13:36.001Z","etag":null,"topics":["coinbase","farcaster","farcaster-frames","farcaster-protocol","framesjs","frog","merkle-manufactory","no-code","no-code-framework","onchainkit","viem","warpcast"],"latest_commit_sha":null,"homepage":"https://frametra.in","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FTCHD.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"FTCHD"}},"created_at":"2024-03-30T00:52:37.000Z","updated_at":"2025-01-24T00:23:44.000Z","dependencies_parsed_at":"2024-03-30T02:24:21.885Z","dependency_job_id":"03f6944d-2852-4d50-8333-972c646dc503","html_url":"https://github.com/FTCHD/frametrain","commit_stats":{"total_commits":1016,"total_committers":12,"mean_commits":84.66666666666667,"dds":0.4940944881889764,"last_synced_commit":"21439324f028efe2f3ff5bfb0dc4ab00a8068272"},"previous_names":["ftchd/frametrain"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FTCHD%2Fframetrain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FTCHD%2Fframetrain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FTCHD%2Fframetrain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FTCHD%2Fframetrain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FTCHD","download_url":"https://codeload.github.com/FTCHD/frametrain/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240619451,"owners_count":19830206,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coinbase","farcaster","farcaster-frames","farcaster-protocol","framesjs","frog","merkle-manufactory","no-code","no-code-framework","onchainkit","viem","warpcast"],"created_at":"2024-10-01T18:00:36.347Z","updated_at":"2025-02-25T07:13:03.091Z","avatar_url":"https://github.com/FTCHD.png","language":"TypeScript","readme":"# 🚂 FrameTrain\n\nhttps://github.com/FTCHD/frametrain/assets/144691102/6c901347-1a28-4a25-93f5-c6bc54076d5a\n\n### FrameTrain is Canva for Farcaster Frames.\n- Open Source\n- Revenue Sharing\n- Integrated Farcaster Hub APIs, so you can just build™️\n\nThis repository is mostly geared towards template artists. If you're looking to create and posts Frames, visit [FrameTrain.](https://frametra.in)\n\n# Templates\n![Farcaster Frames Templates](https://raw.githubusercontent.com/FTCHD/frametrain/main/.github/templates.png)\nTemplates live in the **`@/templates`** folder. Each template follows a clear folder structure:\n\n- **`handlers`** — a collection of 1 or more functions, used as controllers for displaying the **`views`**. Must contain at least an **`initial`** handler.\n- **`views`** — a collection of 1 or more React components, rendered as the Frames’ image using **`satori`**. Must contain at least a **`Cover`** view.\n- **`Inspector`** — a React component displayed in the Frame Editor. Used to get input from the user, transform it as needed and saving it as the Frame’s config. This config will be used by the **`handlers`** to properly display the **`views`**.\n- **`cover`** — a cover image for the template, displayed in the template selection screen.\n\nEverything else is completely up to you. You can have a **`hooks`**, **`types`**, **`utils`**, or an **`assets`** folder if you want.\n\n# Integrated Hub API\nFT validates each message without requiring template creators to integrate external APIs. In order to enable message validation for your template, just set the **`requireValidation`** flag in the template config.\n\nRight now, the API provider used is Neynar. Neynar requests seem cheap at first, but having hundreds or thousands of Frames making requests hasn't been tested.\n\nThe choice stands between an internal Hub run by FT, continuing to use Neynar, or switching to Airstack. It’s not clear right now which option is the right one. Reach out if you have any suggestions!\n\n# Revenue Sharing (WIP)\n![Farcaster Revenue Sharing](https://raw.githubusercontent.com/FTCHD/frametrain/main/.github/monetize.png)\n\nHosting Frames is currently free, however that will change.\n\nSoon you will be able to subscribe and host your Frames with no imposed limits (as opposed to the always free tier which would have some limits). The revenue from subscriptions will be shared with template creators, depending on usage.\n\nUsage is counted as calls coming from a Farcaster client to any of the template’s **`handlers`**. The more Farcaster users interact with a Frame, the more its template creator earns.\n\nAt the end of the month, costs are subtracted, the number of calls are added to calculate a ratio, and each creator is rewarded.\n\nThis part is still a WIP, and the train has to run for a bit in order to make further decisions on the exact mechanism.\n\n# SDK\nThe FrameTrain Frames SDK includes many useful **Functions**, **Hooks**, and **UI Components**. View the full documentation [here.](https://github.com/FTCHD/frametrain/wiki/%5BSDK%5D-Hooks)\n\n### APIs \n- Neynar Frame Validation\n- Neynar User Info\n- Gating\n- Webhooks\n- Transactions\n- Loading Google Fonts\n- Uploading Images\n- Running Code on the Server\n- Running Code on the Client\n- Scraping\n\n### Hooks\n- **`useFarcasterName`**\n- **`useFarcasterId`**\n- **`useFrameId`**\n- **`useFrameConfig`**\n- **`useFrameStorage`**\n- **`useFramePreview`**\n- **`useResetPreview`**\n- **`useUploadImage`**\n\n# Contributing\nThank you for considering making FrameTrain better.\n\nThe project currently needs help with:\n\n- TS Generics. I skipped **[generics class](https://www.youtube.com/watch?v=ATdXeuQh_Ws\u0026t=1m40s)** and I've tried implementing them but it always leads to spaghetti. The base template types should be generics based on the initial config received, this would make everything much more cleaner and modular.\n- Bug Fixes \u0026 More. If you see something that sucks, and you know how to do it better, open a PR and let’s see that confidence. It would be really appreciated actually.\n\nFor a good experience, please install the [Biome](https://biomejs.dev) extension. This repository uses Biome, not ESLint.\n\n# Acknowledgements\n\nFrameTrain either uses, has used, or got inspired by the following libraries:\n- [Frog](https://github.com/wevm/frog) by [@wevm](https://github.com/wevm) and [@dalechyn](https://github.com/dalechyn)\n- [Frames.js](https://github.com/framesjs/frames.js) by [@davidfurlong](https://github.com/davidfurlong) and [@stephancill](https://github.com/stephancill)\n- [Onchainkit](https://github.com/coinbase/onchainkit) by [@coinbase](https://github.com/coinbase)\n\nWe are very grateful for their contributions to the Frames ecosystem!\n\n","funding_links":["https://github.com/sponsors/FTCHD"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fftchd%2Fframetrain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fftchd%2Fframetrain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fftchd%2Fframetrain/lists"}