Skip to content

Rahul1269227/ai-tech-newsroom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– AI Tech Newsroom

Next.js FastAPI Docker License

Portfolio-ready AI newsroom platform for tech content generation, editorial workflows, and automated publishing.

Why this repo matters

This project is more than a content site mockup. It brings together:

  • multi-agent orchestration for content operations
  • a modern frontend and API backend split
  • editorial automation and monetization hooks
  • deployment-ready infrastructure choices
  • a product framing that can evolve into a real media workflow

🌟 Features

  • Multi-Agent System: Autonomous agents for searching, writing, humanizing, reviewing, and publishing content
  • Azure OpenAI Integration: Powered by GPT-5 for high-quality content generation
  • Modern Tech Stack: Next.js 14, FastAPI, PostgreSQL, Redis, Weaviate
  • Automated Publishing: Daily content generation workflow
  • Affiliate Integration: Automatic Amazon/Flipkart affiliate link insertion
  • SEO Optimized: Built-in SEO optimization and readability scoring
  • Style Transfer: Custom humanizer agent trained on your writing style

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Next.js 14 Frontend                          β”‚
β”‚              (Modern, Minimalistic Design)                      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    FastAPI Backend                              β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚         Multi-Agent Workflow (LangGraph)                  β”‚  β”‚
β”‚  β”‚  Search β†’ Write β†’ Affiliate β†’ Humanize β†’ Review β†’ Publishβ”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚              β”‚              β”‚              β”‚
    PostgreSQL      Redis         Weaviate     External APIs

πŸ“‹ Prerequisites

  • Docker & Docker Compose
  • Node.js 20+
  • Python 3.11+
  • Azure OpenAI API key
  • NewsAPI key

πŸš€ Quick Start

1. Clone the Repository

git clone <repository-url>
cd ai-tech-newsroom

2. Configure Environment

# Copy environment template
cp .env.example .env

# Edit .env with your API keys
# REQUIRED:
# - AZURE_OPENAI_API_KEY (already configured)
# - NEWS_API_KEY (get from https://newsapi.org)

3. Start with Docker

# Start all services
docker-compose up -d

# View logs
docker-compose logs -f

# Stop services
docker-compose down

Services will be available at:

4. Local Development (Without Docker)

Backend

cd backend

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Run database (use Docker or local PostgreSQL)
docker-compose up -d postgres redis weaviate

# Start FastAPI server
python -m uvicorn api.main:app --reload --port 8000

Frontend

cd frontend

# Install dependencies
npm install

# Start development server
npm run dev

Demo path

  • Run the full stack with Docker for the fastest local evaluation
  • Open the frontend at http://localhost:3000
  • Open the backend docs at http://localhost:8000/docs
  • Review the agent pipeline and deployment notes in the docs files

πŸ“ Project Structure

ai-tech-newsroom/
β”œβ”€β”€ frontend/                    # Next.js application
β”‚   β”œβ”€β”€ app/                    # App router pages
β”‚   β”œβ”€β”€ components/             # React components
β”‚   └── lib/                    # Utilities
β”‚
β”œβ”€β”€ backend/                     # FastAPI application
β”‚   β”œβ”€β”€ agents/                 # Agent implementations
β”‚   β”‚   β”œβ”€β”€ search_agent.py    # Trending topic discovery
β”‚   β”‚   β”œβ”€β”€ writer_agent.py    # Content generation
β”‚   β”‚   β”œβ”€β”€ affiliate_agent.py # Product link injection
β”‚   β”‚   β”œβ”€β”€ humanizer_agent.py # Style transfer
β”‚   β”‚   β”œβ”€β”€ reviewer_agent.py  # Quality assurance
β”‚   β”‚   └── publisher_agent.py # Publishing automation
β”‚   β”œβ”€β”€ api/                    # FastAPI routes
β”‚   β”œβ”€β”€ models/                 # Database models
β”‚   β”œβ”€β”€ services/               # External services
β”‚   β”œβ”€β”€ config/                 # Configuration
β”‚   └── training/               # Training data
β”‚
β”œβ”€β”€ automation/                  # Cron jobs and workflows
β”œβ”€β”€ database/                    # Database schemas
└── docs/                        # Documentation

πŸ€– Multi-Agent Workflow

Daily Content Generation

The system runs a daily workflow that automatically generates and publishes tech articles:

# Trigger manually via API
POST http://localhost:8000/api/agents/workflow/daily

Agent Pipeline

  1. Search Agent πŸ”

    • Scrapes trending topics from NewsAPI, Reddit, Twitter
    • Analyzes and ranks topics by relevance
    • Selects top 5-10 topics for article generation
  2. Writer Agent ✍️

    • Researches each topic from multiple sources
    • Generates 800-1500 word articles
    • Creates SEO-optimized titles and meta descriptions
  3. Affiliate Agent πŸ’°

    • Identifies product mentions in articles
    • Fetches Amazon/Flipkart links
    • Inserts natural "Buy Now" CTAs
  4. Humanizer Agent 🎭

    • Trained on your 20-30 writing samples
    • Rewrites content in your personal style
    • Adds personality and natural flow
  5. SEO Optimizer Agent πŸ“ˆ

    • Optimizes heading structure
    • Improves keyword density
    • Calculates readability scores
  6. Reviewer Agent βœ…

    • Grammar and spelling checks
    • Fact verification
    • Duplicate content detection
  7. Publisher Agent πŸ“°

    • Schedules publication times
    • Publishes approved articles
    • Shares on social media (optional)

🎨 Frontend Design

The frontend features a modern, minimalistic design with:

  • Dark theme with neon accent colors
  • Responsive layout (mobile-first)
  • Fast loading with Next.js SSR
  • SEO optimized with automatic sitemap
  • Analytics ready (Plausible/PostHog)

Key pages:

  • Homepage with trending articles
  • Category pages (AI, Mobile, etc.)
  • Article detail pages
  • Product review pages

πŸ”§ Configuration

Adding Your Writing Style

To train the humanizer agent on your writing style:

  1. Add 20-30 of your best articles to backend/training/style_samples/
  2. Format: Plain text or markdown files
  3. The humanizer will learn your:
    • Sentence structure patterns
    • Vocabulary preferences
    • Tone and voice
    • Humor style
# Add your samples
cp your-article-1.md backend/training/style_samples/
cp your-article-2.md backend/training/style_samples/
# ... add 20-30 samples

API Keys Setup

NewsAPI (Required)

  1. Sign up at https://newsapi.org
  2. Get your API key
  3. Add to .env: NEWS_API_KEY=your_key_here

Reddit (Optional)

  1. Create app at https://www.reddit.com/prefs/apps
  2. Add credentials to .env:
REDDIT_CLIENT_ID=your_id
REDDIT_CLIENT_SECRET=your_secret

Amazon Affiliate (Optional)

  1. Join Amazon Associates program
  2. Add to .env: AMAZON_ASSOCIATE_TAG=your-tag-20

πŸ“Š Database

PostgreSQL database with the following main tables:

  • articles: Published content
  • topics: Trending topics discovered
  • affiliate_links: Product links and tracking
  • writing_samples: Style transfer training data
  • agent_jobs: Workflow tracking

Database Management

# Access PostgreSQL
docker-compose exec postgres psql -U newsroom -d newsroom_db

# Run migrations
cd backend
alembic upgrade head

# Create migration
alembic revision --autogenerate -m "description"

πŸ”„ Automation

Daily Workflow

Set up cron job to run daily content generation:

# Edit crontab
crontab -e

# Add daily workflow at 6 AM
0 6 * * * curl -X POST http://localhost:8000/api/agents/workflow/daily

GitHub Actions

Automated workflow is configured in .github/workflows/daily-content.yml

🚒 Deployment

Recommended Stack

  • Frontend: Vercel (automatic deployment from GitHub)
  • Backend: Railway.app or Render.com
  • Database: Supabase or Railway PostgreSQL
  • Vector DB: Weaviate Cloud

Environment Variables

Set the following in your production environment:

# Production mode
DEBUG=False

# Database (use production URL)
DATABASE_URL=postgresql://user:pass@host:5432/db

# Redis (use production URL)
REDIS_URL=redis://host:6379

# All API keys (same as development)
AZURE_OPENAI_API_KEY=...
NEWS_API_KEY=...

πŸ“ˆ Monitoring

Health Checks

# API health
curl http://localhost:8000/api/health

# Database health
curl http://localhost:8000/api/health/db

Logs

# View all logs
docker-compose logs -f

# View specific service
docker-compose logs -f backend
docker-compose logs -f frontend

πŸ§ͺ Testing

cd backend

# Run tests
pytest

# Run with coverage
pytest --cov=. --cov-report=html

March 2026 Refresh

  • Public documentation reviewed and cleaned up
  • README polished for portfolio presentation
  • Repository maintenance update pushed for current-month activity

πŸ›£οΈ Roadmap

Phase 1: Foundation (Weeks 1-2) βœ…

  • Next.js frontend setup
  • FastAPI backend setup
  • Database schema
  • Docker configuration

Phase 2: Core Agents (Weeks 3-4)

  • Search Agent implementation
  • Writer Agent with Azure OpenAI
  • Humanizer Agent training
  • Reviewer Agent

Phase 3: Monetization (Weeks 5-6)

  • Affiliate Agent
  • Amazon/Flipkart API integration
  • Google AdSense setup
  • Newsletter integration

Phase 4: Automation (Weeks 7-8)

  • LangGraph workflow orchestration
  • Daily cron jobs
  • Social media posting
  • Performance optimization

Phase 5: Launch (Week 9+)

  • Domain setup
  • Production deployment
  • Analytics integration
  • Growth optimization

🀝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

πŸ“„ License

MIT License - feel free to use this for your own projects!

πŸ™ Credits

Built with:

πŸ“§ Support

For questions or issues:

  • Create an issue on GitHub
  • Check the documentation in /docs

Happy coding! Let's build the future of automated tech journalism! πŸš€

About

AI newsroom platform with multi-agent content generation, editorial workflows, and automated publishing.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors