offx
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: v88View latest version
A Val Town application that summarizes your Twitter feed using AI.
- Fetch tweets from your Twitter home feed
- Organize tweets by user-defined topics
- Generate AI-powered summaries using OpenAI
- Deliver summaries via email or Discord
- Web dashboard for configuration and viewing summaries
- Deno installed
- Val Town CLI installed:
deno install -grAf jsr:@valtown/vt
- Val Town account
-
Clone this repository:
vt clone @yourusername/offx
-
Navigate to the project directory:
cd offx
-
Make changes to the code as needed
-
Push changes to Val Town:
vt push
The following environment variables need to be set in Val Town:
AUTH_USERNAME
: Username for dashboard authenticationAUTH_PASSWORD
: Password for dashboard authentication
USER_EMAIL
: Email address for summary delivery and notificationsADMIN_EMAIL
: Admin email for notifications
EMAIL_DELIVERY_ENABLED
: Enable/disable email delivery (true
/false
)EMAIL_DELIVERY_FREQUENCY
: Frequency of email delivery (daily
, etc.)EMAIL_MAX_SUMMARIES
: Maximum number of summaries per emailEMAIL_JOB_NOTIFICATIONS
: Enable job notification emails (true
/false
)EMAIL_TO
: Recipient email for certain cron jobs
TWITTER_BEARER_TOKEN
: Your Twitter API bearer tokenTWITTER_MAX_RETRIES
: Max retries for Twitter API callsTWITTER_INITIAL_DELAY_MS
: Initial delay for retry logic (ms)TWITTER_MAX_DELAY_MS
: Max delay for retry logic (ms)TWITTER_BACKOFF_MULTIPLIER
: Backoff multiplier for retriesTWITTER_JITTER_FACTOR
: Jitter factor for retry logic
TWITTER_SUMMARIZATION_TIME_WINDOW
: Time window for summarization (hours)TWITTER_SUMMARIZATION_MAX_TWEETS
: Max tweets to summarizeTWITTER_SUMMARIZATION_INCLUDE_MEDIA
: Include media in summaries (true
/false
)TWITTER_SUMMARIZATION_INCLUDE_SENTIMENT
: Include sentiment analysis (true
/false
)TWITTER_SUMMARIZATION_EMAIL_NOTIFICATIONS
: Email notifications for summarization (true
/false
)TWITTER_FILTER_KEYWORDS
: Comma-separated keywords to filter tweetsTWITTER_FILTER_EXCLUDE_KEYWORDS
: Comma-separated keywords to exclude tweetsTWITTER_FILTER_INCLUDE_USERS
: Comma-separated Twitter usernames to includeTWITTER_FILTER_EXCLUDE_USERS
: Comma-separated Twitter usernames to excludeTWITTER_FILTER_LANGUAGES
: Comma-separated language codes to filter tweetsTWITTER_FILTER_INCLUDE_RETWEETS
: Include retweets (true
/false
)TWITTER_FILTER_INCLUDE_REPLIES
: Include replies (true
/false
)
TWITTER_SENTIMENT_USE_AI
: Use AI for sentiment analysis (true
/false
)TWITTER_SENTIMENT_BATCH_SIZE
: Batch size for sentiment analysisTWITTER_SENTIMENT_JOB_BATCH_SIZE
: Batch size for sentiment job cronTWITTER_SENTIMENT_JOB_NOTIFY
: Enable notifications for sentiment jobs (true
/false
)
offx/
├── backend/
│ ├── database/ # SQLite database operations
│ └── routes/ # API route handlers
├── frontend/ # Frontend HTML, CSS, and JavaScript
│ ├── index.html # Main page served for frontend
│ └── index.tsx # Main React application entry point
├── shared/ # Shared code between frontend and backend
└── README.md # This file
This project is designed to run on Val Town. After pushing your code with vt push
, you can access the application at:
https://val.town/v/yourusername/offx
vt push
: Push local changes to Val Townvt pull
: Pull the latest changes from Val Townvt status
: Show working tree statusvt browse
: Open the Val in a web browser
MIT