Skip to content

AteebHussain2/TimesOfDuniya

Repository files navigation

📰 ITLAA – Times Of Duniya

AI-Powered News & Content Automation Platform

Next.js
FastAPI
Postgres
Redis
ImageKit


🧭 Project Overview

ITLAA (Times Of Duniya) is a modern AI-powered news and content automation platform.
It automates the entire pipeline:
➡️ Discover trending topics → ✍ Generate SEO-friendly articles → 🖼 Find & upload images → 📢 Publish & promote content.

Built with Next.js + FastAPI + Prisma + Redis, ITLAA is designed for scale, reliability, and automation.


✅ Features & Achievements

  • 🔹 Topic & Article Generation: AI-driven pipeline from trending topics → full-length articles.
  • 🔹 Image Handling: Automatic thumbnail search, validation, and CDN upload via ImageKit.
  • 🔹 Structured Outputs: Clean JSON + helpers for parsing AI responses.
  • 🔹 Job Scheduling: Cron jobs for retries, stuck jobs, thumbnails, and automation.
  • 🔹 Deployment Ready: CI/CD with Vercel (frontend) & Railway (backend).

🔧 Challenges & Fixes

Problem Solution
Too many DB connections Singleton Prisma client, optimized pooling
Scheduler ID conflicts Unique job IDs / replace_existing=True
Wrong interval params Corrected to hours=, minutes= etc.
Next.js timeouts Plans for async / fire-and-forget calls
Dirty AI JSON outputs Added schema validators + cleaning helpers
Stuck jobs in QUEUED/PROCESSING Cron jobs for recovery + retries

🚀 Current Stage

  • ⏱ Stable cron system via APScheduler (runs every 1h, 3h, 6h).
  • ✅ Secure API calls between backend & frontend (auth headers).
  • 🖼 Image pipeline (search → validate → upload) is stable.
  • 🛠 Job monitoring: automatic detection & recovery of failed/missing tasks.
  • ⚡ Immediate scheduler runs (next_run_time=now) after server boot.

🔮 Roadmap (Next Steps)

  • Non-blocking HTTP calls from scheduler (fire-and-forget).
  • Full monitoring & logging of cron jobs.
  • Smarter retries (exponential backoff, alerts).
  • Migrate more generation logic backend-only (reduce round-trips).
  • Performance tuning (caching, indexing, optimized queries).
  • Real-time job dashboard (frontend).
  • Auto-social media posting (Instagram, WhatsApp, X, Facebook).
  • Subscription & monetization system.

🏗 Tech Stack

  • Frontend: Next.js + Tailwind (Vercel)
  • Backend: FastAPI + CrewAI agents (Railway)
  • Database: PostgreSQL + Prisma ORM
  • Workers: Redis + RQ for background tasks
  • Media: ImageKit CDN + storage
  • Auth: Clerk (role-based UI & secure auth)

🎯 Conclusion

ITLAA has evolved from a basic article generator into a full AI publishing pipeline:

  • From manual debugging → automated cron & scheduling
  • From error-prone outputs → structured JSON pipelines
  • From isolated jobs → scalable workflows with monitoring

ITLAA is now on track to becoming a production-ready, AI-first publishing platform that can generate, curate, and promote content at scale.


🔗 Live Demo: itlaa.vercel.app
📂 Backend Repo: Times-Of-Duniya-Backend
👨‍💻 Author: Ateeb Hussain

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors