• Townie
    AI
  • Blog
  • Docs
  • Pricing
Log inSign up
project logo

charmaine

new-val-notifications

Sends a daily Discord digest of new public vals from Val Town
Public
Like
1
new-val-notifications
Home
Code
6
README.md
ai-summarizer.ts
database.ts
fetch-vals.ts
C
main.tsx
scratch.ts
Branches
1
Pull requests
Remixes
History
Environment variables
2
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.
Sign up now
Code
/
README.md
Code
/
README.md
Search
7/14/2025
Viewing readonly version of main branch: v118
View latest version
README.md

Daily Val Digest

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.

Files

  • main.tsx - Main cron function and Discord webhook
  • fetch-vals.ts - Fetches and filters new vals using Val Town SDK
  • database.ts - DB queries
  • ai-summarizer.ts - Generates OpenAI summaries for vals without READMEs
  • [test] scratch.ts - Just for clearing SQLite DB during testing

Additional logic:

  • Filter out vals that start with "untitled-" (auto-generated names), blank vals with no files, or vals with an empty main.tsx
  • Skip READMEs that only contains a single header (e.g., "# My Project" with nothing else)
  • 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).
  • Prioritize main.tsx files for AI summaries and limit code sent to OpenAI to 5KB to avoid token limits (and $$ cost)
  • Store hashes of READMEs in a SQLite DB to avoid getting notified about repeat vals - again, because we don't have a public API to check if it's a shallow remix yet.

Setup

  1. Set DISCORD_WEBHOOK environment variable
  2. Set OPENAI_API_KEY environment variable
  3. Set testMode = false in main.tsx for production
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
ExploreDocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareersBrandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.