This Val Town project tracks tweets mentioning competitor URLs and visualizes the data in charts.
├── main.tsx (cron) # Hourly cron job to collect tweet data
├── api.ts (http) # HTTP API and static file server
├── db.ts # Database operations and schema
├── utils/
│ └── competitors.ts # Competitor configuration utilities
└── views/
├── index.html # Main HTML template
└── charts.js # Chart rendering JavaScript
TWITTER_BEARER_TOKEN: Your Twitter API bearer token for searching tweetsCOMPETITORS: Comma-separated list of competitor hostnames to track (default: val.town)
Examples:
val.town (default)val.town,poe.com,shapes.incpoe.com,character.ai,pi.ai,coze.com,gumloop.com,n8n.ioHere are some popular competitors you might want to track:
val.town,poe.com,character.ai,pi.ai,coze.com,gumloop.com,n8n.io,shapes.inc,manus.im,genspark.ai
main.tsx): Runs hourly to search Twitter for mentions of competitor URLs and stores the results in a database.db.ts): Uses SQLite to store tweet data and provides functions to query the data.api.ts): Serves the HTML page and provides API endpoints for chart data.views/): Contains the HTML template and JavaScript for rendering charts.TWITTER_BEARER_TOKEN environment variable with your Twitter API bearer token.COMPETITORS environment variable with your list of competitors to track.