How mosinatet/communication-specialist-ai works
Project Type and Purpose
• This is a full-stack social media management platform (“SocialMediaAI”) combining a FastAPI backend and a React/TypeScript frontend.
• It provides AI-powered content generation (via Google Generative AI), post scheduling (APScheduler), multi-platform posting (Twitter, LinkedIn, Dev.to), and analytics.
File Structure
• Top-level:
• backend/ – FastAPI application, models, scheduler, social API integrations, database setup, tests.
• frontend/ – Vite-powered React/TypeScript SPA, components, pages, services.
• .github/workflows – CI pipeline.
• Key config files: backend/requirements.txt, frontend/package.json, environment templates (.env), Dockerfiles (if added later).
• Tests in backend/test exercise API endpoints, database, and social integrations.
README Insights
• Tech stack clearly splits responsibilities: FastAPI + SQLAlchemy + APScheduler + external AI & social APIs on the backend; React + Vite + Tailwind CSS on the frontend.
a. Frontend Hosting
• A static web host (e.g., Vercel, Netlify, S3+CloudFront) serving the React SPA built by Vite.
b. Backend API Server
• FastAPI app running under Uvicorn/Gunicorn on a compute resource (e.g., AWS EC2, ECS Fargate, Azure App Service, GKE).
c. Database
• Relational DB (PostgreSQL/MySQL) hosted on a managed service (AWS RDS, Azure DB, Cloud SQL).
d. Scheduler
• APScheduler job runner, either embedded in the same backend container or in a separate worker container/cron service.
e. External Services
• Google Generative AI endpoint
• Twitter, LinkedIn, Dev.to REST APIs
f. CI/CD Pipeline
• GitHub Actions workflow that builds, tests, and deploys frontend & backend.
Relationships & Interactions
1. User Browser ←→ Frontend (HTTPS)
2. Frontend → Backend API (HTTPS REST)
3. Backend → Database (SQL)
4. Backend → Google Generative AI (HTTPS)
5. Backend → Social Media APIs (HTTPS)
6. Scheduler triggers backend tasks → External & Database
7. CI/CD → Deploy frontend artifact to CDN, backend Docker image to container registry & host
Architectural Patterns & Design Principles
• Monolithic backend with modular code (app/, models, scheduler, social_media_platforms).
• Single-page application (SPA) frontend served statically.
• Externalized configuration via environment variables.
• Layered: presentation (frontend), API, business logic (ai_agent.py, scheduler.py), data access (database.py, models.py).
• Reusable service clients for each social platform.