10 Commits

Author SHA1 Message Date
46b51034bf feat: Send Threads posts to Telegram for easy copy-paste
When generating manual Threads posts, now sends each post directly
to Telegram with:
- Content wrapped in backticks (easy to copy)
- Quality score and category info
- Direct link to open Threads
- Character count

This enables a workflow where posts are generated automatically
and the user just needs to copy from Telegram and paste in Threads.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 23:11:21 +00:00
29520a00f6 feat: Add publish and mark-published endpoints with validation
- Add /api/posts/{id}/publish endpoint for API-based publishing
- Add /api/posts/{id}/mark-published endpoint for manual workflow
- Add content length validation before publishing
- Update modal with "Ya lo publiqué" and "Publicar (API)" buttons
- Fix retry_count handling for None values

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 23:01:28 +00:00
1239c4af2c feat: Add daily Threads content generation for manual publishing
- Add generate_threads_manual_posts() task that creates 2 posts daily
- Posts are saved with status 'draft' for manual copy/paste to Threads
- Uses tip_tech template with rotating categories (productividad, ia, etc.)
- Scheduled to run daily at 7:00 AM (Tijuana timezone)
- Posts appear in dashboard for easy access

This is a workaround while waiting for Threads API approval.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:54:07 +00:00
b6823651e0 feat: Add follower tracking to interactions
- Add get_followers() method to X publisher
- Track new followers as "follow" interaction type
- Update daily reports to show followers separately
- Store follower name, username, bio, and profile image

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 23:07:28 +00:00
f5c6554fc3 feat: Add daily Telegram reports (morning and afternoon)
- Morning report (8:00 AM): scheduled posts for today + new interactions
- Afternoon report (6:00 PM): published count + pending interactions
- Reports are sent via Telegram with formatted summaries

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:10:31 +00:00
5f04aa0cce fix: Resolve duplicate interaction detection and add usernames
- Add processed_ids set to prevent duplicate inserts when a tweet is
  both a mention and a comment (same external_id)
- Enhance get_mentions() to fetch usernames via user expansions
- Update fetch_interactions to prefer username over numeric author_id

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:04:58 +00:00
f4f0a2d230 feat: Add recent published section and filter self-interactions
- Add "Publicaciones Recientes" section to dashboard showing published posts
- Filter out self-generated interactions in X API (thread auto-replies)
- Improve username resolution for X interactions using user expansions
- Pass recent_published data to dashboard template

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 23:29:02 +00:00
7427e818a5 feat: Add February 2026 content calendar and thread publishing support
- Generate 24 posts for February: 12 tips, 4 threads, 8 promotional
- Schedule automatic publication at optimal times
- Update publish_to_platform to handle hilo_educativo as threads
- Parse JSON thread posts and publish using publish_thread()

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 22:55:06 +00:00
11b0ba46fa feat: Add Content Generation Engine v2 with quality scoring
Major improvements to AI content generation:

## New Components (app/services/ai/)
- PromptLibrary: YAML-based prompt templates with inheritance
- ContextEngine: Anti-repetition and best performers tracking
- ContentGeneratorV2: Enhanced generation with dynamic parameters
- PlatformAdapter: Platform-specific content adaptation
- ContentValidator: AI-powered quality scoring (0-100)

## Prompt Library (app/prompts/)
- 3 personalities: default, educational, promotional
- 5 templates: tip_tech, product_post, service_post, thread, response
- 4 platform configs: x, threads, instagram, facebook
- Few-shot examples by category: ia, productividad, seguridad

## Database Changes
- New table: content_memory (tracks generated content)
- New columns in posts: quality_score, score_breakdown, generation_attempts

## New API Endpoints (/api/v2/generate/)
- POST /generate - Generation with quality check
- POST /generate/batch - Batch generation
- POST /quality/evaluate - Evaluate content quality
- GET /templates, /personalities, /platforms - List configs

## Celery Tasks
- update_engagement_scores (every 6h)
- cleanup_old_memory (monthly)
- refresh_best_posts_yaml (weekly)

## Tests
- Comprehensive tests for all AI engine components

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 20:55:28 +00:00
049d2133f9 Implementación inicial del sistema de automatización de redes sociales
- Estructura completa del proyecto con FastAPI
- Modelos de base de datos (productos, servicios, posts, calendario, interacciones)
- Publishers para X, Threads, Instagram, Facebook
- Generador de contenido con DeepSeek API
- Worker de Celery con tareas programadas
- Dashboard básico con templates HTML
- Docker Compose para despliegue
- Documentación completa

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 01:11:44 +00:00