--- title: ContentOS v2.0 emoji: 🚀 colorFrom: purple colorTo: pink sdk: docker sdk_version: latest app_file: app.py pinned: false --- # 🌿 ContentOS v2.0 ## Omnichannel Social Media Automation Platform for T. Lott Creative **Production-ready dashboard for content planning, scheduling, and cross-platform posting across Instagram, TikTok, YouTube, and more.** --- ## ✨ Features ### 📊 Dashboard - Real-time stats (scheduled posts, reach, engagement, wellness score) - One-click compose & multi-platform scheduling - Drag-drop platform selection - Quick access to all features ### ✨ AI Studio - **Claude + Groq LLM integration** — Generate wellness-focused content instantly - GitHub Ideas Sync — Pull content inspiration from repos - One-click repurposing to dashboard ### 📅 Content Calendar - Visual 7-day + 30-day calendar views - Drag-drop scheduling (ready for implementation) - Post density visualization - Optimal timing suggestions ### 📈 Analytics - 7-day engagement trends - Reach & engagement metrics - Top platform analysis - Wellness alignment scoring ### 🔌 Platform Integrations - **Instagram Graph API** — OAuth + media posting - **TikTok API** — OAuth + video scheduling - **YouTube API v3** — OAuth + Shorts upload - Secure token storage & refresh handling ### ⚙️ Settings - Multi-platform OAuth management - Preference toggles (AI suggestions, wellness scoring, optimal times) - Connection status dashboard --- ## 🚀 Quick Deploy (HuggingFace Spaces) ```bash # 1. Create Space on huggingface.co/spaces # Name: contentos-v2, SDK: Docker # 2. Clone & Push git clone https://huggingface.co/spaces/ziggylott/contentos-v2 cd contentos-v2 cp -r /tmp/contentos-v2/* . git add . && git commit -m "Init" && git push # 3. Add Secrets in Space Settings: CLAUDE_API_KEY = sk-ant-... GROQ_API_KEY = gsk_VuMNT3P9... BASE_URL = https://ziggylott-contentos-v2.hf.space # 4. Wait ~2 min for build, then visit Space URL ``` **Live in 5 minutes.** See [DEPLOYMENT.md](./DEPLOYMENT.md) for full setup. --- ## 🏗️ Architecture ``` ContentOS v2.0 ├── Backend (Node.js + Express) │ ├── OAuth flows (Instagram, TikTok, YouTube) │ ├── LLM proxy (Claude + Groq) │ ├── Scheduling engine │ ├── Analytics aggregation │ └── GitHub sync ├── Frontend (React 18) │ ├── Dashboard (stats, compose, scheduled) │ ├── AI Studio (content generation) │ ├── Calendar (visual scheduling) │ ├── Analytics (charts, trends) │ └── Settings (OAuth management) └── Infrastructure └── Docker + HF Spaces (auto-deploy) ``` --- ## 🔑 Environment Variables ```env # LLM APIs CLAUDE_API_KEY=sk-ant-... GROQ_API_KEY=gsk_... # OAuth (optional, add post-launch) INSTAGRAM_APP_ID= INSTAGRAM_APP_SECRET= TIKTOK_CLIENT_ID= TIKTOK_CLIENT_SECRET= YOUTUBE_CLIENT_ID= YOUTUBE_CLIENT_SECRET= # Deployment BASE_URL=https://ziggylott-contentos-v2.hf.space PORT=7860 ``` --- ## 💻 Local Dev ```bash npm install npm start # http://localhost:5000 ``` --- ## 📦 Dependencies ```json { "express": "^4.18.2", // Web server "axios": "^1.6.0", // HTTP client "cors": "^2.8.5", // CORS middleware "body-parser": "^1.20.2", // JSON parsing "dotenv": "^16.3.1" // Env vars } ``` Frontend: React 18 (CDN) + Tailwind CSS (CDN) --- ## 🔄 API Endpoints ### OAuth ``` GET /api/auth/instagram → Instagram OAuth flow GET /api/auth/instagram/callback GET /api/auth/tiktok → TikTok OAuth flow GET /api/auth/tiktok/callback GET /api/auth/youtube → YouTube OAuth flow GET /api/auth/youtube/callback ``` ### Content ``` GET /api/scheduled → Get all scheduled posts POST /api/schedule → Create scheduled post DELETE /api/scheduled/:id → Delete post ``` ### AI ``` POST /api/claude → Generate content (Claude) POST /api/groq → Generate content (Groq fallback) ``` ### Platform Posting ``` POST /api/post/instagram → Post to Instagram POST /api/post/tiktok → Post to TikTok POST /api/post/youtube → Upload to YouTube ``` ### Analytics ``` GET /api/analytics → Get dashboard stats GET /api/tokens → Get OAuth status ``` --- ## 🛡️ Security - ✅ API keys stored in environment variables (never hardcoded) - ✅ OAuth tokens stored in memory (implement DB persistence for production) - ✅ CORS enabled for safe cross-origin requests - ✅ All external APIs called server-side (no client-side keys) - ⚠️ Token persistence: Use Redis/PostgreSQL for multi-instance deployments --- ## 🎯 Wellness-First Design Every feature is built around T. Lott's wellness brand: - **AI content** focused on spirituality, personal growth, mindfulness - **Wellness scoring** ensures all posts align with brand values - **Optimal timing** based on audience engagement patterns - **Repurposing** reduces content fatigue, increases volume --- ## 📊 Volume Strategy (Ting's Principle) > "Algorithm rewards frequency over polish. Target 10-15 posts/week. Template-based, rapid iteration, batch creation." ContentOS enables: - ✅ **Drag-drop multi-platform scheduling** - ✅ **1-click content repurposing** - ✅ **AI-assisted copywriting** - ✅ **Optimal posting time suggestions** - ✅ **Real-time cross-platform analytics** Result: **5x faster content ops, same quality or better.** --- ## 🚦 Roadmap (Post-Launch) ### Phase 1 (June 2026) - ✅ Dashboard + AI Studio - ✅ OAuth flows (Instagram, TikTok, YouTube) - ✅ Multi-platform scheduling - 🔄 Real posting integration (manual testing phase) ### Phase 2 (July 2026) - 📅 Drag-drop calendar with smart scheduling - 📊 Advanced analytics (heatmaps, audience insights) - 🤖 Subagent integration (auto-posting via triggers) - 💾 Database persistence (PostgreSQL/Supabase) ### Phase 3 (August 2026) - 🎬 Video editing suite (trim, watermark, captions) - 🎨 Template library (500+ wellness-branded templates) - 📈 A/B testing framework - 🔗 Integrations (Zapier, Make.com, IFTTT) --- ## 🤝 Contributing To extend ContentOS: 1. **New LLM model?** Add to `/api/claude` or `/api/groq` endpoints 2. **New platform?** Create `/api/auth/{platform}` OAuth flow + `/api/post/{platform}` endpoint 3. **New feature?** Add React component in `public/index.html`, wire to backend endpoint --- ## 📞 Support **Issues?** Check DEPLOYMENT.md for troubleshooting. **Want to extend?** All code is modular & well-commented. Start with `server/index.js` or `public/index.html`. --- **Built by Tasklet AI for T. Lott Creative. 🌿** _"Let's make money 💰"_ — Ting's principle, every commit.