Automated Political Graphics SaaS

Заказчик: AI | Опубликовано: 28.09.2025

I’m building a web-based SaaS that generates polished political campaign graphics on demand. The core goal is straightforward: help candidates and staff create eye-catching visuals without relying on a full design team. For launch, the platform only needs to output social-media-ready artwork, specifically formatted for Facebook, Instagram, and WhatsApp. Here’s what I need from you: 1 ⃣ Multi-Tenant Architecture Roles & Permissions: Role | Access | Notes —|—|— Super Admin | Manage Admin accounts, set User limits | Desktop/Web app Admin (Leader/Politician) | Upload templates, create Users, generate campaigns | Desktop/Web app User (Worker) | Upload photo, view generated posters, download/share | Android app Authentication & Authorization - JWT Tokens - Role-based Access Control (RBAC) - Optional OAuth2.0 for future scalability Tenant Isolation Options - Option A: Schema per tenant (more secure, easier data isolation) - Option B: Shared DB with TenantID (cost-efficient, easier to scale) - Recommendation: Shared DB + TenantID for MVP 2 ⃣ Android App – User Workflow Steps: 1. Login → JWT token 2. Upload photo - Auto crop & face alignment - Background removal - Skin tone normalization 3. View generated posters 4. Download / share Photo Preprocessing Stack: - Face Detection → OpenCV/Dlib / Azure Face API - Auto Crop → YOLO / MediaPipe FaceMesh - Background Removal → U²Net / RemBG / Adobe API - Skin Tone Normalization → GAN-based model Output: Normalized portrait stored in S3 / Cloud Storage 3 ⃣ Admin App – Template Management Template Upload - PSD / CorelDRAW - Parse layers → psd-tools for PSD - Identify placeholders: - Leader Photo - User Photo - Text layers - Store metadata in DB - Campaign text stored with template reference Poster Generation - Generate posters for each User - Variations: Backgrounds, Fonts, Colors 4 ⃣ AI Graphic Generation Pipeline Pipeline Flow: Template + Leader Photo + User Photo + Campaign Text → AI Processing → Generated Posters → Storage (S3) AI Processing Details - Place photos → blending + borders → background variations - Text styling → font/color variation - Variations → generate 50+ unique images per user AI Models & Tools Task | Tool / Model —|— Background Variation | Stable Diffusion XL + ControlNet Compositing / Blending | OpenCV / PIL Font/Color Variation | Custom ML rules Face Alignment | Dlib / MediaPipe GPU Requirements - Minimum: NVIDIA T4 / RTX 4090 - Recommended: A10 / A100 (bulk generation) 5 ⃣ Queue Management & GPU Scaling Components: - Redis + Celery or RabbitMQ / Kafka - Each Admin → job queue - GPU workers: - Pull jobs - Batch inference - Push results to S3 - Scheduling: Round-robin per Admin 6 ⃣ Backend & API Design Tech Stack - Node.js → REST APIs (Admin/User management, Auth) - FastAPI (Python) → AI microservices (poster generation, preprocessing) - PostgreSQL → multi tenant DB - Storage → S3 / MinIO (images + templates) Security - HTTPS everywhere - AES-256 encrypted storage for photos - RBAC → prevent cross-tenant leaks - Content moderation → NSFW / abusive templates Key Development Challenges 1. PSD/CorelDRAW parsing complexity 2. GPU load balancing & cost optimization 3. AI outputs consistency 4. Queue fairness (multiple Admins) 5. Security → tenant data isolation, encryption 6. Content moderation → avoid misuse MVP Recommendation: - Shared DB + TenantID - Cloud GPU (AWS/GCP A10) - PSD upload first, skip CDR initially - Basic AI pipeline → API-based preprocessing