Public
Like
2
new-val-notifications
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v82View latest version
Sends a daily Discord digest of new public vals from Val Town. It grabs previews of READMEs when it exists. When there's no README, it will send the code to GPT-4o for a summary.
main.tsx- Main cron function and Discord webhookfetch-vals.ts- Fetches and filters new vals using Val Town SDKai-summarizer.ts- Generates OpenAI summaries for vals without READMEs- [test]
scratch.ts- Just for clearing SQLite DB during testing
- We filter out vals that start with "untitled-" (auto-generated names), blank vals with no files, or vals with an empty
main.tsx - We skip READMEs that are just a single header line (e.g., "# My Project" with nothing else)
- We filter out commonly remixed val names like Blob Admin, SQLiteExplorer since we don't have a public API to check shallow remixes (remixes with few version edits).
- We prioritize main.tsx files for AI summaries and limit code sent to OpenAI to 5KB to avoid token limits and costs
- We also store hashes of READMEs in a SQLite DB to avoid getting notified about remixes without edits (also because there's no way to check if it's a shallow remix)
- Set
DISCORD_WEBHOOKenvironment variable - Set
OPENAI_API_KEYenvironment variable - Set
testMode = falsein main.tsx for production