# Feature Checklist

## Stage 0 — Project Foundation
- [x] PHP 8.2+ with PDO/MySQL
- [x] MVC architecture (controllers, models, views)
- [x] Front controller routing (public/index.php)
- [x] Helper functions (base_url, asset, e, csrf, flash, redirect)
- [x] Session management with secure cookie params
- [x] Configuration system (config/config.php)
- [x] Database connection singleton

## Stage 1 — Authentication & User Management
- [x] User registration with validation
- [x] Login with email/password (bcrypt hashing)
- [x] Logout with session destruction
- [x] Role-based access control (admin, manager, subscriber)
- [x] Per-user login attempt tracking and account lockout
- [x] IP-based login rate limiting (login_attempts table)
- [x] Admin user management (list, approve, reject, suspend, delete)
- [x] Subscriber approval workflow (pending → approved)
- [x] Manager creation by admin
- [x] CSRF protection on all forms

## Stage 2 — Content Management
- [x] Post CRUD (create, read, update, delete)
- [x] Rich text editor for post body
- [x] Featured image upload with validation
- [x] SEO fields (seo_title, meta_description)
- [x] Post status workflow (draft → pending → published)
- [x] Category system with parent/child hierarchy
- [x] Category CRUD for admin
- [x] Post-category assignment
- [x] Slug generation for posts and categories

## Stage 3 — Public Frontend
- [x] Homepage with hero post, latest, random, popular, category sections
- [x] Blog listing page with pagination
- [x] Single post view with related posts
- [x] Category archive pages
- [x] Search functionality
- [x] Responsive navigation with category dropdowns
- [x] Breaking news ticker bar
- [x] Sidebar with search, newsletter, popular posts
- [x] Footer with quick links, latest posts, newsletter form
- [x] Mobile-responsive design (brown/cream theme)

## Stage 4 — Subscriber Dashboard
- [x] Subscriber dashboard with stats
- [x] Subscriber post creation
- [x] Subscriber post editing
- [x] Post submission for admin review
- [x] Subscriber post deletion

## Stage 5 — AI Bot System
- [x] Bot dashboard with stats overview
- [x] Keyword management (add, fetch defaults, select, skip, delete)
- [x] Fetch default topics from external source
- [x] AI article generation from keywords
- [x] Bot article management (view, edit, approve, reject, publish, delete)
- [x] AI draft review queue for admin
- [x] Bot error logging and viewer
- [x] Bot settings (API keys, generation parameters)

## Stage 6 — Newsletter System
- [x] Newsletter subscription (sidebar + footer forms)
- [x] Email validation and duplicate prevention
- [x] Double opt-in verification (with SMTP fallback)
- [x] Secure verification tokens
- [x] Unsubscribe with token-based links
- [x] Subscriber management (list, filter, delete)
- [x] Compose newsletter (post-based or custom)
- [x] Queue-based email sending (not inline)
- [x] Batch processing with configurable size
- [x] Retry mechanism (3 attempts max)
- [x] Campaign logs with sent/failed counts
- [x] Per-recipient delivery status tracking
- [x] Cron-compatible queue processor
- [x] PHPMailer integration (manual, no Composer)
- [x] SMTP settings support via config

## Stage 7 — Final Features & Production Readiness
- [x] Static pages (About Us, Privacy Policy, Terms & Conditions, User Policy)
- [x] Admin page editor with SEO fields
- [x] Contact Us page with validation and storage
- [x] Contact message admin viewer
- [x] Policies navigation dropdown (no direct link)
- [x] About Us and Contact Us in main navigation
- [x] Open Graph meta tags on all pages
- [x] Canonical URLs
- [x] JSON-LD structured data for posts
- [x] XML sitemap generator (/sitemap.xml)
- [x] robots.txt
- [x] IP-based login rate limiting
- [x] Production error handling (try/catch with 500 page)
- [x] Directory protection (.htaccess deny on sensitive dirs)
- [x] 404, 403, and 500 error pages
- [x] Lazy loading on below-fold images
- [x] CSS for contact form and static pages
- [x] Mobile-responsive static pages and contact form
