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 milliseconds.
Viewing readonly version of main branch: v7View latest version
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.