Content pfp
Content
@
0 reply
0 recast
3 reactions

jtgi - mostly offline 23 -> 05 pfp
jtgi - mostly offline 23 -> 05
@jtgi
A thread of snippets from automod codebase that may be of interest to ppl building on farcaster. ––––– 1. Server driven config that made it possible to add rules in minutes w/o writing any ui code. Sample config: https://github.com/jtgi/automod/blob/main/app/lib/validations.server.ts#L309-L360 Field generator: https://github.com/jtgi/automod/blob/main/app/components/curation-form.tsx#L777
17 replies
150 recasts
289 reactions

jtgi - mostly offline 23 -> 05 pfp
jtgi - mostly offline 23 -> 05
@jtgi
2. A farcaster multi-select user picker with auto-complete. Example uses react-hook-form, customized react-select w/debouncing and @neynar’s query username api. https://github.com/jtgi/automod/blob/main/app/components/user-picker.tsx [@moxie.eth fan token variant as well: https://github.com/jtgi/automod/blob/main/app/components/moxie-picker.tsx]
1 reply
0 recast
8 reactions

jtgi - mostly offline 23 -> 05 pfp
jtgi - mostly offline 23 -> 05
@jtgi
3. Login with Farcaster in remix.run with a customized login button. login button: https://github.com/jtgi/automod/blob/main/app/routes/_index.tsx#L321 login route: https://github.com/jtgi/automod/blob/main/app/routes/auth.farcaster.tsx remix-auth farcaster strategy: https://github.com/jtgi/automod/blob/main/app/lib/farcaster-strategy.ts
2 replies
0 recast
6 reactions

jtgi - mostly offline 23 -> 05 pfp
jtgi - mostly offline 23 -> 05
@jtgi
4. A scrappy queuing implementation with BullMQ thats free and works in-process on the same host as your api node. Sharing the process obv has downsides but was fine for Automods scale of 1-10rps, 550 channels (including most high vol ones) with 100 or so concurrent workers. https://github.com/jtgi/automod/blob/main/app/lib/bullish.server.ts
1 reply
0 recast
5 reactions

jtgi - mostly offline 23 -> 05 pfp
jtgi - mostly offline 23 -> 05
@jtgi
5. Checking a Moxie Fan Token balance, including fetching the user’s vesting contract. actual check: https://github.com/jtgi/automod/blob/main/app/lib/validations.server.ts#L1938 moxie gql lookups: https://github.com/jtgi/automod/blob/main/app/lib/airstack.server.ts#L29
1 reply
0 recast
4 reactions