Chatbrain
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data β all from the browser, and deployed in miliseconds.
An intelligent social media bot that automatically generates and posts engaging content across multiple platforms.
- π€ AI-powered content generation
- π Automated scheduling with cron jobs
- π― Multiple content types (quotes, tips, facts, etc.)
- π Multi-platform support (Twitter, LinkedIn, etc.)
- π Content tracking and analytics
- π¨ Dynamic hashtag generation
- βοΈ Configurable posting frequency
βββ backend/
β βββ index.ts # Main HTTP API
β βββ content-generator.ts # AI content generation
β βββ social-platforms.ts # Platform integrations
β βββ scheduler.ts # Posting scheduler
βββ cron-poster.ts # Automated posting cron job
βββ shared/
β βββ types.ts # Shared types and interfaces
βββ README.md
-
Set up environment variables:
OPENAI_API_KEY
(for content generation)TWITTER_API_KEY
,TWITTER_API_SECRET
,TWITTER_ACCESS_TOKEN
,TWITTER_ACCESS_SECRET
LINKEDIN_ACCESS_TOKEN
(optional)
-
Configure content settings in
backend/content-generator.ts
-
Set up the cron job schedule in Val Town UI for automated posting
- Manual posting: Make HTTP requests to trigger content generation and posting
- Automated posting: Cron job runs on schedule to post content automatically
- Content management: View and manage generated content through the API
GET /
- Dashboard and manual controlsPOST /generate
- Generate new contentPOST /post
- Post content to social mediaGET /content
- View recent contentPOST /schedule
- Schedule content for later
The bot can generate various types of content:
- Motivational quotes
- Tech tips and insights
- Daily facts and trivia
- Industry news commentary
- Inspirational stories
- Educational content
Customize content types in the configuration to match your brand voice and audience.