Open-source Twitter/X growth engine.
AI-powered replies, content generation, tweet scheduling, viral discovery, and analytics — all in one dashboard.
Features • Quick Start • Tech Stack • Contributing • License
Growing on Twitter/X takes consistent, high-quality engagement. GrowthMate gives you everything you need in a single self-hosted app — no monthly SaaS fees, no data leaving your machine, fully open source.
- Find the right conversations — Search tweets by keyword, sorted by engagement score
- Reply at scale with AI — Draft replies with GPT-4o, Gemini, or Claude, then send in one click
- Generate viral content — AI writer with 6 style modes and image generation
- Schedule everything — Queue tweets for optimal posting times
- Track what works — Full analytics dashboard with engagement breakdown and growth charts
- Stay inspired — Viral library, trend discovery, and curated inspiration feeds
Find high-engagement tweets by keyword from the last 24 hours. Reply directly from the platform with AI-assisted draft generation. Auto-advance through a queue for efficient engagement.
Generate 3 tweet drafts at once across 6 style modes: Engaging, Thread Opener, Hot Take, Educational, Personal, and Promotional. Voice matching from your recent tweets. Image generation via DALL-E 3 or Gemini.
AI-generated daily posts across 5 categories: For You, Products, Trending, Media, and Viral Rewrites — personalized from your configured context and interests.
Search high-performing tweets with filters for time period, minimum likes, and reply inclusion. Masonry grid layout with full engagement metrics.
Schedule tweets for specific dates and times. Track status across pending, posted, failed, and draft states. Post now or queue for later.
Posting streak heatmap, engagement breakdown (likes, retweets, replies, bookmarks), follower growth charts, per-tweet performance table. Period selectors for 7-day, 30-day, and 90-day views.
Niche-specific trends pulled from your configured interests. See top tweets, related hashtags, and engagement data per topic.
Track any number of X accounts. See their latest tweets with engagement stats. Refresh on demand to stay on top of competitor activity.
Configure your bio, interests (36 categories across Business, Tech, Creativity, Lifestyle, Science, Finance), favourite creators, and products. Auto-detect from your X account. All AI features use this for personalized output.
Curated high-engagement posts from your interest areas with filters for articles, media, and more. Use any post as a seed for the AI writer.
Search for accounts and content in any niche. Results show accounts sorted by followers and tweets sorted by impressions.
| Layer | Technology |
|---|---|
| Framework | Next.js 16 (App Router, Turbopack) |
| Auth | NextAuth v5 with X/Twitter OAuth 2.0 |
| Styling | Tailwind CSS 4 |
| Charts | Recharts |
| AI Providers | OpenAI (GPT-4o-mini, DALL-E 3), Google AI (Gemini, image gen), Anthropic (Claude) |
| X API | twitter-api-v2 |
| Database | PostgreSQL via Drizzle ORM |
| Cache | Redis via ioredis |
| Runtime | Node.js 20.9+ |
- Node.js 20.9+ (or Bun)
- Docker (for Postgres + Redis) — or bring your own
- An X Developer account with OAuth 2.0 app
git clone https://github.com/yourusername/growthmate.git
cd growthmate
bun install # or: npm installcp .env.example .env
npx auth secret # paste output into AUTH_SECRETEdit .env with your X Developer credentials:
AUTH_SECRET=your-generated-secret
TWITTER_CLIENT_ID=your-client-id
TWITTER_CLIENT_SECRET=your-client-secret
DATABASE_URL=postgresql://growthmate:growthmate@localhost:5432/growthmate
REDIS_URL=redis://localhost:6379
# AI providers (at least one recommended)
OPENAI_API_KEY=sk-...
GOOGLE_AI_API_KEY=AIza...
ANTHROPIC_API_KEY=sk-ant-...- Go to the X Developer Portal
- Create a project/app (or use existing)
- Enable OAuth 2.0 under User authentication settings:
- Type: Web App
- Callback URL:
http://localhost:3000/api/auth/callback/twitter - Website URL:
http://localhost:3000
- Copy Client ID and Client Secret into your
.env - Set app permissions to Read and Write (needed for posting)
docker compose up -d # Postgres 16 + Redis 7
npx drizzle-kit push # Create database tables
bun dev # or: npm run devOpen http://localhost:3000 and sign in with your X account.
At least one provider is needed for AI writer, daily mix, reply drafts, and image generation. You can use any combination — the app auto-selects the best available or lets you pick manually.
| Provider | Env Variable | Capabilities | Get Key |
|---|---|---|---|
| OpenAI | OPENAI_API_KEY |
GPT-4o-mini text + DALL-E 3 images | platform.openai.com/api-keys |
| Google AI | GOOGLE_AI_API_KEY |
Gemini text + image generation | aistudio.google.com/apikey |
| Anthropic | ANTHROPIC_API_KEY |
Claude Sonnet text | console.anthropic.com |
- Set up Context — Go to
/context, fill in your bio, select interests, add creators and products. Click "Refresh" to auto-detect from your tweets. - Search & Reply — Go to
/search, enter a keyword, browse tweets sorted by engagement, draft AI replies, and send. - Generate Content — Use
/composeto create tweet drafts in different styles. Copy, improve, post, or schedule. - Daily Mix — Visit
/daily-mixfor AI-crafted tweets across 5 personalized categories. - Discover — Use
/viralfor viral tweets,/trendsfor niche trends,/inspirationfor curated content. - Analytics — Check
/analyticsfor engagement data and/dashboardfor reply activity and API costs. - Monitor — Add accounts at
/monitoredto track competitor tweets and engagement.
| Shortcut | Action |
|---|---|
Ctrl+Enter |
Send reply |
Enter |
Trigger search |
All data stays on your machine. No third-party tracking or data collection.
| Store | Backend | Contents |
|---|---|---|
| Analytics | Postgres analytics_events |
Reply logs, API call tracking, follower snapshots |
| Scheduler | Postgres scheduled_posts |
Scheduled, draft, posted, and failed tweets |
| Context | Postgres user_context |
Personalization (bio, interests, products, writing DNA) |
| Monitored | Postgres monitored_accounts + monitored_tweets |
Tracked accounts and cached tweets |
| Cache | Redis (TTL keys) | Trends, viral, discover, and inspiration data |
bun run build # or: npm run build
bun start # or: npm startFor production, update your .env:
AUTH_URL— your production domain (e.g.https://your-domain.com)DATABASE_URL— production Postgres connection stringREDIS_URL— production Redis URL- Update OAuth callback URL in X Developer Portal to match
Run npx drizzle-kit push against your production database.
src/
├── app/
│ ├── (app)/ # Authenticated pages
│ │ ├── analytics/ # Engagement analytics
│ │ ├── compose/ # AI tweet writer
│ │ ├── context/ # Personalization settings
│ │ ├── daily-mix/ # AI daily content
│ │ ├── dashboard/ # Overview dashboard
│ │ ├── discover/ # Niche discovery
│ │ ├── inspiration/ # Curated content feed
│ │ ├── monitored/ # Account tracking
│ │ ├── scheduler/ # Tweet scheduler
│ │ ├── search/ # Search & reply engine
│ │ ├── settings/ # App settings
│ │ ├── trends/ # Trend discovery
│ │ └── viral/ # Viral tweet library
│ ├── api/ # API routes
│ └── page.tsx # Landing page
├── components/ # Shared UI components
├── lib/ # Core logic, DB, cache, X API
└── types/ # TypeScript declarations
Contributions are welcome! Here's how to get started:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Commit (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Please make sure your code follows the existing style and passes linting (bun lint).
- Thread composer (multi-tweet threads)
- Bookmark collections and categorization
- More AI providers (Mistral, Llama, etc.)
- Browser extension for quick replies
- Mobile-responsive improvements
- Dark/light theme toggle
- Export analytics to CSV
- Webhook integrations (Slack, Discord notifications)
This project is licensed under the MIT License — free to use, modify, and distribute.
Built with Next.js, X API v2, and AI.
If GrowthMate helps you grow, consider giving it a star.