Skip to content

Repository files navigation

πŸš€ BloggingAgent

AI-powered blogging platform with intelligent content generation, real-time SEO analysis, and performance tracking.

Transform your content creation workflow with advanced AI integration and built-in optimization tools.

Status License .NET Platform


✨ Key Features

πŸ€– AI-Powered Content Generation

  • Multi-Provider LLM Support - OpenAI GPT and Ollama with automatic fallback
  • Customizable Content - Adjustable tone, audience, word count, and keywords
  • Context-Aware - Memory system for intelligent, coherent generation
  • Batch Operations - Generate multiple posts efficiently

πŸ“ Content Management

  • Full CRUD Operations - Create, read, update, delete blog posts
  • Draft System - Save drafts and publish when ready
  • Markdown Editor - Native markdown support with HTML conversion
  • Auto-Optimization - Automatic excerpt and content formatting

πŸ” SEO & Analytics

  • Real-time SEO Analysis - Scoring, keyword density, readability metrics
  • Performance Tracking - Views, engagement, traffic sources, conversions
  • Automated Meta Tags - AI-generated titles, descriptions, structured data
  • Export Tools - JSON/CSV data export for external analysis

🎨 Developer Experience

  • Clean Architecture - Layered design with clear separation of concerns
  • RESTful API - Complete API with interactive Swagger documentation
  • Responsive UI - Modern interface built with Bootstrap 5 and JavaScript
  • Extensible - Easy to add features, integrations, and custom providers

πŸ› οΈ Technology Stack

Category Tech
Runtime .NET 7.0+ / .NET 10.0
Database SQLite (default) / PostgreSQL (production)
Frontend Razor Pages, Bootstrap 5, JavaScript
AI OpenAI API, Ollama (local)
Caching In-memory cache, Redis support
Logging ASP.NET Core built-in

πŸš€ Quick Start

Prerequisites

30-Second Setup

# Clone repository
git clone https://github.com/Mostafa-SAID7/bloggingAgent.git
cd bloggingAgent

# Run application
cd bloggingAgent
dotnet run

Open http://localhost:5000 in your browser.


πŸ“š Documentation

Document Purpose
Getting Started Installation, configuration, first steps
API Documentation Complete API reference with examples
Configuration Guide Environment setup and settings
Architecture System design and code structure
Deployment Production deployment options

🎯 API Endpoints

Blog Management

GET    /api/blog                    # List posts
POST   /api/blog/generate           # Generate new post
GET    /api/blog/{slug}             # Get specific post
POST   /api/blog/publish/{id}       # Publish post
POST   /api/blog/unpublish/{id}     # Unpublish post

Analytics

GET    /api/analytics               # Overall analytics
GET    /api/analytics/post/{id}     # Post-specific metrics
GET    /api/analytics/export        # Export data (JSON/CSV)

SEO Tools

POST   /api/seo/analyze             # Analyze content
POST   /api/seo/meta-description    # Generate meta description
POST   /api/seo/keywords            # Get keyword suggestions

Settings

GET    /api/settings                # Get configuration
POST   /api/settings/update         # Update settings
POST   /api/settings/reset          # Reset to defaults

Interactive Docs: Visit /swagger when app is running.


βš™οΈ Configuration

AI Provider Selection

OpenAI (Recommended for Production)

{
  "OpenAISettings": {
    "ApiKey": "sk-your-key-here",
    "Model": "gpt-3.5-turbo",
    "Temperature": 0.7
  }
}

Ollama (Local Development)

{
  "LlmSettings": {
    "OllamaEndpoint": "http://localhost:11434",
    "OllamaModel": "llama2"
  }
}

Full Configuration Guide β†’


🐳 Docker Deployment

# Build image
docker build -t blogging-agent:latest .

# Run container
docker run -p 5000:80 \
  -e OPENAI_API_KEY=sk-your-key \
  blogging-agent:latest

# Using Docker Compose
docker-compose up -d

Detailed Deployment Guide β†’


πŸ—οΈ Project Architecture

bloggingAgent/
β”œβ”€β”€ Controllers/          # API endpoints
β”œβ”€β”€ Services/             # Business logic
β”œβ”€β”€ Data/                 # Database & repositories
β”œβ”€β”€ Models/               # Domain entities
β”œβ”€β”€ Views/                # UI pages
β”œβ”€β”€ Agents/               # AI prompt templates
β”œβ”€β”€ Configuration/        # Settings classes
β”œβ”€β”€ Utilities/            # Helper functions
└── wwwroot/              # Static assets

Architecture Deep Dive β†’


πŸ§ͺ Development

Running Tests

dotnet test
dotnet test --verbosity detailed

Building for Production

dotnet publish -c Release -o ./publish

Database Migrations

# Add migration
dotnet ef migrations add MigrationName

# Apply changes
dotnet ef database update

# View history
dotnet ef migrations list

πŸ› Troubleshooting

Issue Solution
Port 5000 in use dotnet run -- --urls "http://localhost:6000"
API key not working Verify in appsettings.json or .env
Database errors Delete .db-shm and .db-wal files, restart app
Build fails dotnet clean && dotnet restore && dotnet build

More Troubleshooting β†’


🀝 Contributing

Contributions are welcome! Here's how:

  1. Fork the repository
  2. Create feature branch: git checkout -b feature/amazing-feature
  3. Commit changes: git commit -m 'Add amazing feature'
  4. Push to branch: git push origin feature/amazing-feature
  5. Open a Pull Request

πŸ“‹ Project Status

  • βœ… Core blogging functionality
  • βœ… AI content generation
  • βœ… SEO analysis
  • βœ… Analytics dashboard
  • βœ… RESTful API
  • πŸ”„ User authentication (in progress)
  • πŸ”„ Advanced caching (planned)
  • πŸ”„ Social media integration (planned)

πŸ“ License

This project is licensed under the MIT License - see LICENSE.txt


πŸ“ž Support & Community


πŸ™ Acknowledgments

  • OpenAI - Advanced language models
  • Ollama - Local AI processing
  • .NET Community - Excellent frameworks and tools
  • Bootstrap - Responsive UI components

🎯 Quick Links

Link Purpose
Setup Guide First-time setup
API Reference Complete endpoint documentation
Config Options All settings explained
System Design Technical overview
Deploy Guide Production deployment
Example ENV Environment variables template

Built with ❀️ to transform content creation

Transform your content creation workflow with the power of AI. Write better, faster, and smarter. πŸš€

About

An AI-powered blogging platform that leverages Large Language Models (LLMs) to generate, optimize, and manage high-quality blog content with built-in SEO analysis and performance tracking.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages