Schedule, generate, and auto-publish content across Facebook, YouTube & TikTok β from one dashboard.
Demo Β· Features Β· Architecture Β· API Docs Β· Contributing
Building a social media presence across multiple platforms is exhausting. You need to:
- βοΈ Write platform-optimized captions for each channel
- π Schedule posts at optimal times across timezones
- π¬ Re-encode videos for each platform's specs
- π¬ Monitor and reply to comments from 3+ dashboards
- π Track analytics scattered across different apps
Auto-Post Tool solves all of this in one place β with AI-powered content generation, intelligent scheduling, and automated multi-platform publishing.
| Provider | Models | Features |
|---|---|---|
| Google Gemini | gemini-2.0-flash | Caption, hashtags, hook generation |
| OpenAI | GPT-4o + Whisper | Content + subtitle transcription |
| Anthropic Claude | Claude Sonnet 4 | Premium content generation |
- π i18n Translation β Translate posts to any language instantly
- π Sentiment Analysis β Analyze audience tone before publishing
- π― Platform-Specific Prompts β Optimized for Facebook, YouTube, TikTok
| Platform | Content Types | Features |
|---|---|---|
| Feed, Reels, Story | Graph API v22.0, 3-phase Reels upload | |
| YouTube | Videos, Shorts | Resumable Upload, thumbnail support |
| TikTok | Videos | Content Posting API, Inbox Draft mode |
- Platform-Specific Presets β Auto-transcode to each platform's optimal codec/bitrate/resolution
- Auto-Reframe 9:16 β Horizontal β vertical crop for Reels/Shorts/TikTok
- Long-to-Short β Split long videos into viral short clips
- Whisper Subtitles β Auto-generate SRT subtitles from audio
- Real-time dashboard with stats grid
- Platform breakdown charts
- Publishing heatmap (best times to post)
- Campaign KPI tracking
- π JWT + refresh token authentication
- π AES-256-GCM token encryption
- π‘οΈ Helmet HTTP security headers
- β‘ Rate limiting (100 req/60s)
- π« CORS whitelist (no wildcards)
- β Input validation (class-validator)
- π Swagger protected in production
auto-post-tool/
βββ apps/
β βββ api/ # NestJS backend (REST API + Swagger)
β βββ web/ # Next.js 14 frontend (App Router)
β βββ worker/ # BullMQ background job processor
βββ packages/
β βββ shared-types/ # Shared TypeScript interfaces
β βββ ui/ # Shared UI components
βββ docker/ # Docker configs
βββ .github/ # CI/CD workflows
| Layer | Technology |
|---|---|
| Backend | NestJS 10 + TypeScript 5 |
| Frontend | Next.js 14 + React 18 + Zustand |
| Database | PostgreSQL 16 + Prisma ORM |
| Queue | Redis 7 + BullMQ |
| AI | Gemini + OpenAI + Claude |
| Media | FFmpeg + Whisper API |
| Monitoring | OpenTelemetry + Bull Board |
| CI/CD | GitHub Actions |
| Package Manager | pnpm + Turborepo |
- Node.js β₯ 18
- pnpm β₯ 9
- Docker & Docker Compose
- FFmpeg (optional, for media pipeline)
git clone https://github.com/YOUR_USERNAME/auto-post-tool.git
cd auto-post-tool
pnpm installdocker compose up -d # PostgreSQL + Redis + MinIOcp .env.example .env
# Edit .env with your API keys and credentialscd apps/api
npx prisma db push
npx prisma generate# Terminal 1 β API Server
cd apps/api && pnpm run dev
# Terminal 2 β Web Frontend
cd apps/web && pnpm run dev| Service | URL |
|---|---|
| π Frontend | http://localhost:3005 |
| π API | http://localhost:3001 |
| π Swagger | http://localhost:3001/docs |
| π Bull Board | http://localhost:3001/admin/queues |
| β€οΈ Health Check | http://localhost:3001/health |
Full interactive API docs available at /docs when running in development mode.
| Method | Endpoint | Description |
|---|---|---|
POST |
/ai/generate |
Generate caption, hashtags, hook |
POST |
/ai/translate |
Translate content (i18n) |
POST |
/ai/sentiment |
Analyze text sentiment |
POST |
/media/transcode |
Platform-specific video transcode |
POST |
/media/reframe |
Auto-reframe 16:9 β 9:16 |
POST |
/media/long-to-short |
Split video into short clips |
POST |
/media/subtitles |
Generate subtitles (Whisper) |
GET |
/posts |
List all posts |
POST |
/posts |
Create & schedule post |
GET |
/analytics/dashboard |
Dashboard stats |
GET |
/campaigns |
List campaigns |
GET |
/health |
Server health check |
# Run all tests
cd apps/api && pnpm test
# Run with coverage
cd apps/api && pnpm test -- --coverage
# Run specific test
npx jest --testPathPattern="ai.service"Current: 31 tests across 5 suites β all passing β
docker compose up -ddocker compose -f docker-compose.prod.yml up -dSee .env.example for all required variables:
| Variable | Required | Description |
|---|---|---|
DATABASE_URL |
β | PostgreSQL connection string |
REDIS_HOST |
β | Redis host for BullMQ |
JWT_SECRET |
β | JWT signing secret |
ENCRYPTION_KEY |
β | AES-256 key for token storage |
GEMINI_API_KEY |
β¬ | Google Gemini API key |
OPENAI_API_KEY |
β¬ | OpenAI API key (GPT + Whisper) |
ANTHROPIC_API_KEY |
β¬ | Anthropic Claude API key |
FACEBOOK_CLIENT_ID |
β¬ | Meta App ID |
GOOGLE_CLIENT_ID |
β¬ | Google OAuth client ID |
TIKTOK_CLIENT_KEY |
β¬ | TikTok App key |
- Multi-platform publishing (Facebook, YouTube, TikTok)
- AI content generation (Gemini, OpenAI, Claude)
- Platform-specific FFmpeg presets
- Long-to-short video pipeline
- Whisper subtitle generation
- i18n translation
- Sentiment analysis
- Instagram support
- Smart auto-reframe (face detection)
- A/B testing for posts
- Team collaboration & approval workflow UI
- Mobile app (React Native)
- Webhook integrations
- RSS-to-post automation
Contributions are welcome! Please read the ARCHITECTURE.md before submitting PRs.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License β see the LICENSE file for details.
Built with β€οΈ by NgNghia213
β Star this repo if you find it useful! β