AI-powered automation for X (Twitter).
Generate, schedule, and publish AI-generated tweets from topics that matter to you.
Built with Bun, Express, Drizzle ORM, BullMQ, PostgreSQL, Gemini AI, Tavily Search, and Buffer API.
The Xcel landing page introduces the complete Twitter automation workflow: create posts manually, schedule them for later, or use query-driven web research to generate and publish trend-based content automatically.
| Document | Description |
|---|---|
| API Reference | All REST endpoints β request/response shapes, params, and examples |
| Architecture | System design, request lifecycle, worker flows, and layer responsibilities |
| Database | Schema reference β tables, columns, enums, indexes, and ER diagram |
Xcel is an AI-powered automation platform for X (formerly Twitter) that automates the entire content publishing workflow.
Instead of manually writing tweets every day, Xcel continuously searches the web for relevant information, generates context-aware tweets using Gemini AI, schedules them according to your preferred posting times, and publishes them automatically through Buffer.
The goal is simple:
Stay consistent on X without spending hours creating content.
Personal Project
Xcel is currently designed for personal use.
- β Backend automation engine is production-ready.
- β Frontend dashboard and public landing page are complete.
- π Authentication and OAuth are intentionally not implemented.
- π€ The current version supports a single-user workflow.
If you want to use Xcel for your own account or extend it into a multi-user SaaS, simply fork the repository and implement your preferred authentication provider.
- AI tweet generation
- Automated publishing through Buffer
- Web search powered content discovery
- Topic-based content generation
- Dynamic posting schedules
- Dynamic automation schedules
- Draft tweets
- Custom tweets
- Automated tweets
- Scheduled tweets
- Post history
- Failed tweet retry support
- Queue-based architecture
- Background workers
- Scheduled jobs
- Typed API
- Request validation
- Centralized error handling
- Gemini AI for tweet generation
- Tavily Search for real-time web search
- Structured JSON responses
- Prompt-driven generation
Xcel
ββββββββββββββββ
β Frontend β
β Next.js β
ββββββββ¬ββββββββ
β
REST API Requests
β
βΌ
βββββββββββββββββββββββ
β Express + Bun API β
β /api/v1/* β
βββββββββββ¬ββββββββββββ
β
βββββββββββββββββ¬βββββββ΄ββββββββββββββββ¬βββββββββββββββ
βΌ βΌ βΌ βΌ
Controllers Services Validators Middleware
β β
βββββββββββββββββΌβββββββββββββββββββββββββββββββββββββ
βΌ βΌ
Business Logic Queue Scheduler
β β
βΌ βΌ
Drizzle ORM BullMQ Workers
β β
βΌ βΌ
PostgreSQL DB Automation / Posting
β β
ββββββββββββββββ¬ββββββββββββββββββββββ
βΌ
External Services
ββββββββββββ¬βββββββββββ¬βββββββββββ
β GeminiAI β Tavily β Buffer β
ββββββββββββ΄βββββββββββ΄βββββββββββ
β
βΌ
X (Twitter)
User Topics
β
βΌ
Queries Table
β
βΌ
Automation Worker
β
βΌ
Tavily Search
β
βΌ
Gemini AI
β
βΌ
Generated Tweet
β
βΌ
Tweets Table
β
βΌ
Posting Scheduler
β
βΌ
Posting Worker
β
βΌ
Buffer API
β
βΌ
X (Twitter)
ββββββββββββββββββββββββββββββ
β queries β
ββββββββββββββββββββββββββββββ€
β id (uuidv7) PK β
β query β
β active β
β created_at β
β updated_at β
ββββββββββββββββ¬ββββββββββββββ
β
β query
β
βΌ
ββββββββββββββββββββββββββββββ
β tweets β
ββββββββββββββββββββββββββββββ€
β id (uuidv7) PK β
β content β
β hashtags[] β
β query β
β type β
β status β
β scheduled_for β
β posted_at β
β created_at β
β updated_at β
ββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββ
β settings β
ββββββββββββββββββββββββββββββ€
β id (uuidv7) PK β
β automation_enabled β
β posting_times (jsonb) β
β automation_times (jsonb) β
β timezone β
β created_at β
β updated_at β
ββββββββββββββββββββββββββββββ
Xcel/
β
βββ backend/
β βββ src/
β β βββ config/
β β βββ controllers/
β β βββ db/
β β βββ jobs/
β β βββ middlewares/
β β βββ prompts/
β β βββ queues/
β β βββ routes/
β β βββ services/
β β βββ utils/
β β βββ validators/
β β βββ workers/
β β
β βββ drizzle/
β
βββ frontend/
β βββ src/
β β βββ app/
β β βββ api/
β β βββ components/
β β βββ hooks/
β β βββ providers/
β β βββ constants/
β β βββ lib/
β β βββ types/
β β
β βββ public/
β
βββ README.md
Routes
β
βΌ
Controllers
β
βΌ
Services
β
ββββββββββββββββΊ Gemini AI
ββββββββββββββββΊ Tavily Search
ββββββββββββββββΊ Buffer API
ββββββββββββββββΊ BullMQ
β
βΌ
Drizzle ORM
β
βΌ
PostgreSQL
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/v1/tweets |
Get all tweets (paginated, filterable) |
POST |
/api/v1/tweets |
Create a custom tweet |
PATCH |
/api/v1/tweets/:tweetId |
Update a tweet |
DELETE |
/api/v1/tweets/:tweetId |
Delete a tweet |
POST |
/api/v1/tweets/enhance |
AI-enhance tweet content via Gemini |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/v1/queries |
Get all topics |
POST |
/api/v1/queries |
Add a new topic |
PATCH |
/api/v1/queries/:id |
Toggle active / update |
DELETE |
/api/v1/queries/:id |
Delete a topic |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/v1/dashboard |
Aggregate stats |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/v1/settings |
Get current settings |
PATCH |
/api/v1/settings/:settingId |
Update settings |
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/v1/automation/run |
Manually trigger an automation cycle |
| Technology | Version | Purpose |
|---|---|---|
| Next.js | 16.2.10 | React Framework |
| React | 19.2.4 | UI Library |
| TypeScript | ^5 | Type Safety |
| Tailwind CSS | ^4 | Styling |
| shadcn/ui | 4.13.0 | UI Components |
| TanStack Query | 5.101.2 | Server State Management |
| Axios | 1.18.1 | API Client |
| React Hook Form | 7.81.0 | Forms |
| Zod | 4.4.3 | Validation |
| Sonner | 2.0.7 | Toast Notifications |
| Lucide React | 1.24.0 | Icons |
| Motion | 13.2.0 | Landing page animations |
| Technology | Version | Purpose |
|---|---|---|
| Bun | Latest | JavaScript Runtime |
| Express | 5.2.1 | REST API |
| TypeScript | ^5 | Type Safety |
| Drizzle ORM | 1.0.0-rc.4 | ORM |
| Drizzle Kit | 1.0.0-rc.4 | Migrations |
| PostgreSQL | Latest | Database |
| BullMQ | 5.80.0 | Background Jobs |
| ioredis | 5.10.1 | Redis Client |
| Pino | 10.3.1 | Logging |
| Zod | 4.4.3 | Request Validation |
| Dotenv | 17.4.2 | Environment Variables |
| Service | Purpose |
|---|---|
| Gemini API | AI Tweet Generation |
| Tavily Search API | Real-time Web Search |
| Buffer API | Tweet Publishing |
| Neon PostgreSQL | Cloud Database |
| Upstash Redis | Queue Storage |
| Render | Deployment |
- Express + Bun backend
- Drizzle ORM setup
- PostgreSQL integration
- Redis connection
- Logging
- Error handling
- Validation
- Environment configuration
- Gemini AI integration
- Tavily Search integration
- AI tweet generation
- Prompt engineering
- Structured JSON responses
- Topic-based automation
- BullMQ queues
- Automation worker
- Posting worker
- Dynamic posting schedules
- Dynamic automation schedules
- Retry support
- Create custom tweets
- Draft tweets
- Scheduled tweets
- Pending queue
- Failed tweets
- Dashboard APIs
- Dashboard UI
- Tweet management
- Query management
- Settings page
- Analytics cards
- Responsive layout
- Landing page with animated hero, bento features, workflow, CTA, and footer
- Dashboard-to-landing-page navigation
- User Authentication
- OAuth
- Multi-user support
- Thread generation
- AI tweet enhancement
- Tweet analytics
- Multiple X accounts
- LinkedIn automation
- Instagram automation
- YouTube Shorts automation
- Email notifications
- Webhooks
- Docker support
- CI/CD pipeline
| Module | Status |
|---|---|
| Backend | β Complete |
| REST API | β Complete |
| AI Integration | β Complete |
| Automation Engine | β Complete |
| Queue Workers | β Complete |
| Scheduler | β Complete |
| Database | β Complete |
| Frontend | β Complete |
| Authentication | β³ Planned |
| OAuth | β³ Planned |
| Analytics | β³ Planned |
| Multi Platform Support | β³ Planned |
git clone https://github.com/Anos714/Xcel.git
cd Xcelcd backend
bun install
cp .env.example .env
bun run db:generate
bun run db:migrate
bun run devcd frontend
bun install
bun run devThe frontend will be available at:
http://localhost:3000
The backend will be available at:
http://localhost:8080
# Server
PORT=8080
NODE_ENV=development
FRONTEND_URL=http://localhost:3000
# Database (Neon PostgreSQL)
DATABASE_URL=<your_neon_connection_string>
# Redis (Upstash)
UPSTASH_REDIS_URL=<your_upstash_redis_url>
# AI
GEMINI_API_KEY=<your_gemini_api_key>
TAVILY_API_KEY=<your_tavily_api_key>
# Publishing
BUFFER_ACCESS_TOKEN=<your_buffer_access_token>
BUFFER_CHANNEL_ID=<your_buffer_channel_id>NEXT_PUBLIC_API_URL=http://localhost:8080Contributions are welcome.
If you'd like to improve Xcel, you can:
- Build the frontend
- Add authentication
- Add OAuth
- Improve AI prompts
- Support additional social media platforms
- Improve scheduling
- Optimize worker performance
- Report bugs
- Submit feature requests
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature- Commit your changes
git commit -m "feat: add amazing feature"- Push the branch
git push origin feature/amazing-feature- Open a Pull Request
Xcel is built using several amazing open-source projects.
- Bun
- Next.js
- Express
- Drizzle ORM
- BullMQ
- PostgreSQL
- Redis
- Gemini AI
- Tavily Search
- Buffer API
Huge thanks to the maintainers and contributors of these projects.
MIT License
Feel free to fork, modify, and build upon this project.
