Skip to content

zer0-pages - AI-Powered Content Management System

Status note: This PRD describes an aspirational vision from an earlier planning pass (a Django + React + PostgreSQL + Redis CMS). It does not reflect the current shipped system, which is a Jekyll site whose source is authored as an Obsidian vault via the claude-obsidian plugin, with build-time bridge plugins converting Obsidian syntax to HTML — no Django, React, or database component exists in this repository. See pages/wiki/sources/zer0-pages-prd.md and root AGENTS.md for what actually exists today.

1. Executive Summary

Product Name: zer0-pages
Tagline: "Zero friction. Infinite possibilities."
Product Type: AI-Powered CMS with Static Site Generation
Current Version: 1.0.0
Target Market: Developers, Technical Writers, Content Creators, Product Teams, Open Source Projects

Vision Statement

zer0-pages is a next-generation content management system that combines the power of Django's robust backend with Jekyll's lightning-fast static site generation. Powered by AI throughout, zer0-pages automates content creation, repository management, documentation generation, and site deployment—all with zero configuration friction.

Core Value Proposition

  • AI-First Architecture: Every feature enhanced by OpenAI/Anthropic/xAI integration
  • Django + Jekyll Hybrid: Dynamic CMS backend with static site performance
  • Dual Frontend Strategy: React admin dashboard + Bootstrap public sites
  • GitHub-Native Workflows: Automated issue management, PRD tracking, and documentation
  • Zero-Configuration Deployment: Works immediately on GitHub Pages, Azure, or any hosting platform
  • Privacy-First Analytics: GDPR/CCPA compliant with granular user consent
  • Docker-First Development: Universal compatibility across all platforms

2. Problem Statement

Industry Challenges

  1. Content Management Complexity: Traditional CMSs (WordPress, Drupal) require significant setup, maintenance, and security updates
  2. Documentation Debt: Developers spend 20-30% of time on maintenance tasks—TODOs, docs, versioning—instead of building features
  3. PRD Fragmentation: Product requirements scattered across tools (Notion, Confluence, Google Docs) with no single source of truth
  4. Static vs Dynamic Trade-off: Teams must choose between fast static sites OR dynamic CMS features—not both
  5. AI Integration Gap: Existing tools lack deep AI integration for content generation, code analysis, and automation

Target User Pain Points

Persona Pain Point zer0-pages Solution
Developer Manual GitHub maintenance tasks AI-automated issue creation, code scanning
Technical Writer Complex Jekyll/Hugo configuration Zero-config Docker-first development
Product Manager PRD versioning and synchronization AI-powered PRD generation and evolution
Content Creator CMS learning curve, hosting costs Intuitive Django admin + free GitHub Pages
DevOps Engineer Environment inconsistencies Universal Docker containers across all platforms

3. Goals & Objectives

Primary Goals

Goal Metric Target
G1: Zero-Friction Setup Installation success rate >95%
G2: AI Automation Reduction in manual maintenance time >75%
G3: Content Velocity Time from idea to published content <5 minutes
G4: Universal Compatibility Works on macOS/Linux/Windows 100%
G5: Privacy Compliance GDPR/CCPA compliance Full
G6: Performance Page load time <2 seconds
G7: Reliability System uptime >99.9%

Success Metrics (KPIs)

  • North Star Metric: Monthly active content published (posts, PRDs, documentation)
  • Activation: Time to first published page (<10 minutes)
  • Retention: Weekly active users returning (>60% target)
  • AI Efficiency: Tokens saved through intelligent caching (target: 50% reduction)
  • User Satisfaction: Net Promoter Score (NPS) >50
  • Error Rate: System error rate <0.1%

4. Product Architecture

System Overview

┌─────────────────────────────────────────────────────────────────────┐
│                         zer0-pages Platform                            │
├─────────────────────────────────────────────────────────────────────┤
│                                                                     │
│  ┌───────────────────────┐       ┌───────────────────────┐         │
│  │   REACT ADMIN (SPA)   │       │  BOOTSTRAP PUBLIC SITE │         │
│  │  • Content Management │       │  • Blog / Docs / Pages │         │
│  │  • AI Prompt Studio   │       │  • Responsive Design   │         │
│  │  • GitHub Dashboard   │       │  • Dark/Light Theme    │         │
│  │  • Analytics View     │       │  • SEO Optimized       │         │
│  └───────────┬───────────┘       └───────────┬───────────┘         │
│              │ REST API                       │ Static Files        │
│              ▼                                ▼                     │
│  ┌─────────────────────────────────────────────────────────────┐   │
│  │                     Django Backend                          │   │
│  │  ┌─────────────┐  ┌─────────────┐  ┌─────────────┐         │   │
│  │  │  REST API   │  │   Jekyll    │  │  AI Layer   │         │   │
│  │  │  (DRF)      │  │  Generator  │  │ (OpenAI/    │         │   │
│  │  │             │  │             │  │  Anthropic) │         │   │
│  │  └─────────────┘  └─────────────┘  └─────────────┘         │   │
│  └─────────────────────────────────────────────────────────────┘   │
│                              │                                      │
│  ┌───────────────────────────▼───────────────────────────────┐     │
│  │              Unified Content Model                         │     │
│  │  • Posts/Pages  • PRDs  • Documentation  • Issues          │     │
│  └───────────┬───────────────┬───────────────┬───────────────┘     │
│              │               │               │                      │
│  ┌───────────▼───┐  ┌────────▼────┐  ┌───────▼───────┐             │
│  │  PostgreSQL   │  │    Redis    │  │    GitHub     │             │
│  │   Database    │  │    Cache    │  │     API       │             │
│  └───────────────┘  └─────────────┘  └───────────────┘             │
│                                                                     │
└─────────────────────────────────────────────────────────────────────┘

Technology Stack

Layer Technology Purpose
Backend Django 4.2+ CMS API, Business Logic
Static Gen Jekyll 4.3+ Fast static site generation
Public Frontend Bootstrap 5.3 Publication site UI (Jekyll themes)
Admin Frontend React 18+ CMS dashboard, content editor, configuration
Database PostgreSQL 14+ Primary data store
Cache Redis API response caching, Celery broker
AI OpenAI GPT-4o / Anthropic Claude / xAI Grok Content generation, analysis
Container Docker + Compose Universal development environment
Deployment GitHub Pages / Azure Static hosting + API backend

Frontend Architecture

┌─────────────────────────────────────────────────────────────────────┐
│                        zer0-pages Frontends                            │
├─────────────────────────────────────────────────────────────────────┤
│                                                                     │
│  ┌─────────────────────────────┐  ┌─────────────────────────────┐  │
│  │    PUBLIC SITE (Bootstrap)  │  │    ADMIN DASHBOARD (React)  │  │
│  ├─────────────────────────────┤  ├─────────────────────────────┤  │
│  │ • Jekyll-generated static   │  │ • Content management        │  │
│  │ • Bootstrap 5.3 + Icons     │  │ • AI prompt configuration   │  │
│  │ • Dark/Light theme toggle   │  │ • GitHub integration setup  │  │
│  │ • Responsive layouts        │  │ • Analytics dashboard       │  │
│  │ • Blog, docs, landing pages │  │ • User/role management      │  │
│  │ • SEO optimized             │  │ • PRD editor & versioning   │  │
│  │ • Privacy consent UI        │  │ • Real-time preview         │  │
│  └──────────────┬──────────────┘  └──────────────┬──────────────┘  │
│                 │                                │                  │
│                 │    Static HTML/CSS/JS          │  REST API calls  │
│                 ▼                                ▼                  │
│  ┌─────────────────────────────────────────────────────────────┐   │
│  │                    Django REST API                          │   │
│  └─────────────────────────────────────────────────────────────┘   │
│                                                                     │
└─────────────────────────────────────────────────────────────────────┘

5. Core Features

5.1 AI Content Engine

Priority: Critical | Status: ✅ Shipped

The AI Content Engine powers all content generation across the platform.

Capabilities

  • Blog Post Generation: Create articles from prompts or outlines with SEO optimization
  • Documentation Generation: Auto-generate docs from code repositories with code examples
  • PRD Generation: Analyze GitHub repos and produce comprehensive PRDs with structured sections
  • Code Analysis: Scan repositories for TODOs, anti-patterns, documentation gaps, and security issues
  • Content Enhancement: Improve existing content for clarity, completeness, and readability
  • Translation: Multi-language content generation (planned v1.1)

API Endpoints

Endpoint Method Description
/api/ai/generate/ POST Generate content from prompt
/api/ai/enhance/ POST Enhance existing content
/api/ai/analyze/ POST Analyze repository or document
/api/ai/chat/ POST Interactive AI assistant

Multi-Provider Support

# Supported AI Providers
PROVIDERS = {
    "openai": ["gpt-4o", "gpt-4-turbo", "gpt-3.5-turbo"],
    "anthropic": ["claude-opus-5-5", "claude-sonnet-5-5", "claude-haiku-5-5"],
    "xai": ["grok-2", "grok-2-mini"]
}

Error Handling & Retry Logic

  • Automatic Retries: Exponential backoff for transient AI API failures
  • Fallback Models: Automatic fallback to cheaper models on quota exhaustion
  • Response Caching: Intelligent caching to reduce API costs and latency
  • Rate Limit Handling: Graceful degradation when rate limits are hit
  • Timeout Management: Configurable timeouts per provider and operation type

5.2 GitHub Integration Hub

Priority: Critical | Status: ✅ Shipped

Deep GitHub integration for repository management and automation.

Features

  • Auto-Issue Generation: AI creates structured GitHub issues from parent issues with proper labels and assignees
  • Code Quality Scans: Automated scanning for TODOs, docs gaps, anti-patterns, and technical debt
  • Feedback to Issues: Convert user feedback into well-formatted GitHub issues with context
  • PRD Synchronization: Keep PRDs in sync with repository changes via webhooks
  • Webhook Processing: React to pushes, PRs, issue events, and repository changes
  • Rate Limit Management: Intelligent request batching and conditional requests to respect GitHub API limits

Supported Chore Types

Chore Type Description Auto-Labels
todo_scan Find and create issues for TODO comments tech-debt, enhancement
code_quality Identify anti-patterns and improvements refactor, quality
documentation Flag missing or outdated docs documentation
dependency_update Track outdated dependencies dependencies
security_scan Identify potential security issues security
test_coverage Flag untested code paths testing

5.3 PRD Machine

Priority: High | Status: ✅ Shipped

Automated PRD lifecycle management.

Capabilities

  • Generate: Create PRDs from GitHub repository analysis
  • Download: Extract existing PRDs from repositories
  • Enhance: Improve PRD completeness and quality using AI
  • Combine: Merge multiple PRDs into unified documents
  • Version: Track PRD changes with full history
  • Export: Convert PRDs to GitHub Issues, Jira tickets

PRD Workflow

┌──────────┐     ┌──────────┐     ┌──────────┐     ┌──────────┐
│ Generate │────►│ Enhance  │────►│ Version  │────►│  Export  │
│ from Repo│     │ with AI  │     │ Control  │     │ to Tools │
└──────────┘     └──────────┘     └──────────┘     └──────────┘
      ▲                                                  │
      └──────────────── Feedback Loop ◄──────────────────┘

5.4 Jekyll Site Builder

Priority: High | Status: ✅ Shipped

Static site generation with AI-powered installation and theming.

Features

  • Zero-Config Deployment: Works immediately on GitHub Pages with automatic CI/CD setup
  • AI-Powered Installation: 95%+ success rate with self-healing errors and automatic dependency resolution
  • Docker-First Development: Universal compatibility across all platforms with consistent environments
  • Bootstrap 5 Integration: Modern responsive design system with customizable components
  • Dark Mode: Built-in theme switching with system preference detection
  • SEO Optimized: Meta tags, Open Graph, structured data (JSON-LD), XML sitemaps, and robots.txt
  • Performance: Optimized asset bundling, minification, and lazy loading

Supported Content Types

  • Blog posts (Markdown + Front Matter)
  • Documentation pages
  • Landing pages
  • Portfolio/Projects
  • API documentation

5.5 CMS Backend & React Admin

Priority: High | Status: ✅ Shipped

Full-featured content management system with Django API and React frontend.

React Admin Dashboard Features

  • Content Editor: Rich text editing with live Markdown preview
  • Media Library: Drag-and-drop image and file management
  • User Management: Roles, permissions, team invitations
  • Prompt Studio: Visual AI prompt builder with testing sandbox
  • Analytics Dashboard: Real-time content performance metrics
  • GitHub Settings: Repository connections, webhook configuration
  • PRD Workspace: Visual PRD editor with version comparison
  • Site Builder: Live preview of Jekyll site changes

React Tech Stack

Package Version Purpose
React 18.x UI framework
React Router 6.x Client-side routing
React Query 5.x Server state management
Zustand 4.x Client state management
Monaco Editor Latest Code/Markdown editing
Recharts 2.x Analytics visualizations
Tailwind CSS 3.x Admin UI styling

REST API

All content exposed via Django REST Framework with OpenAPI/Swagger documentation:

/api/posts/          # Blog posts CRUD with filtering, pagination, search
/api/pages/          # Static pages CRUD
/api/prds/           # PRD management with versioning
/api/issues/         # GitHub issues synchronization
/api/templates/      # Prompt templates management
/api/analytics/      # Usage statistics (privacy-compliant)
/api/auth/           # Authentication (JWT) with refresh tokens
/api/settings/       # Site configuration
/api/preview/        # Live site preview
/api/media/          # Media file upload and management
/api/users/          # User management (admin only)
/api/webhooks/       # Webhook configuration and logs

API Features

  • Pagination: Cursor-based pagination for large datasets
  • Filtering: Advanced filtering and search capabilities
  • Versioning: API versioning strategy for backward compatibility
  • Documentation: Auto-generated OpenAPI/Swagger documentation
  • Throttling: Configurable rate limiting per endpoint

5.6 Privacy-First Analytics

Priority: Medium | Status: ✅ Shipped

GDPR/CCPA compliant analytics with PostHog integration.

Features

  • Cookie consent modal with granular permissions
  • Do Not Track (DNT) browser setting respect
  • Analytics disabled in development
  • Custom event tracking (downloads, external links, scroll depth)
  • A/B testing support (planned v1.1)

6. User Experience

6.1 Installation Flow

# One-command installation
curl -fsSL https://zer0-pages.dev/install.sh | bash

# Or via pip
pip install zer0-pages

# Docker quick start (recommended)
docker-compose up -d

# Development setup
git clone https://github.com/bamr87/zer0-pages.git
cd zer0-pages
docker-compose -f docker-compose.dev.yml up

Post-Installation

  1. Initial Configuration: Run setup wizard to configure AI providers, GitHub tokens, and database
  2. First User: Create admin account via CLI or web interface
  3. Site Setup: Configure site name, domain, and basic settings
  4. GitHub Connection: Connect repositories for automation features
  5. AI Provider Setup: Add API keys for OpenAI, Anthropic, or xAI

6.2 Content Creation Flow

User Input → AI Enhancement → Preview → Publish → Static Build → Deploy
     │              │             │          │           │          │
     │              │             │          │           │          │
     └──────────────┴─────────────┴──────────┴───────────┴──────────┘
                    All steps automated with error recovery

Detailed Steps

  1. Input: User provides prompt, outline, or existing content
  2. AI Processing: Content enhanced with AI (optional, user-controlled)
  3. Preview: Real-time preview of rendered content
  4. Review: User reviews and edits before publishing
  5. Publish: Content saved to database and marked as published
  6. Static Build: Jekyll generates static HTML/CSS/JS
  7. Deploy: Automatic deployment to GitHub Pages or configured host
  8. Notification: User notified of successful deployment or errors

6.3 React Admin Dashboard

Modern single-page application for content management:

View Features
Dashboard Key metrics, recent activity, quick actions
Content Editor Split-pane Markdown editor with live preview
Media Manager Grid/list view, drag-drop upload, image optimization
PRD Workspace Visual editor, version diff, export options
Prompt Studio Template builder, test sandbox, performance metrics
GitHub Hub Repo connections, issue queue, webhook logs
Analytics Charts, funnels, real-time visitors
Settings Site config, user management, API keys

Admin UI Components

┌─────────────────────────────────────────────────────────────┐
│  zer0-pages Admin                              [User] [Logout] │
├────────────┬────────────────────────────────────────────────┤
│            │                                                │
│  Dashboard │   ┌─────────────────────────────────────────┐  │
│  Content   │   │          Content Editor                 │  │
│  ├─ Posts  │   │  ┌─────────────┬─────────────────────┐  │  │
│  ├─ Pages  │   │  │  Markdown   │    Live Preview     │  │  │
│  └─ PRDs   │   │  │  Editor     │                     │  │  │
│  Media     │   │  │             │                     │  │  │
│  GitHub    │   │  │             │                     │  │  │
│  AI Studio │   │  └─────────────┴─────────────────────┘  │  │
│  Analytics │   │  [Save Draft]  [Preview]  [Publish]     │  │
│  Settings  │   └─────────────────────────────────────────┘  │
│            │                                                │
└────────────┴────────────────────────────────────────────────┘

6.4 Public Site (Bootstrap)

Jekyll-generated static site with Bootstrap 5 theming:

  • Responsive Design: Mobile-first layouts across all devices
  • Theme Variants: Light/dark mode with system preference detection
  • Component Library: Cards, navbars, modals, forms, tables
  • Performance: <2s page loads, lazy image loading, minimal JS
  • Accessibility: WCAG 2.1 AA compliant, semantic HTML
  • SEO: Meta tags, Open Graph, structured data, sitemaps

7. Technical Requirements

7.1 Non-Functional Requirements

Category Requirement Metric
Latency Page generation <2 seconds
Latency AI response <30 seconds
Scale Concurrent users 100+
Security Secrets management Zero secrets in code
Privacy Data handling GDPR/CCPA compliant
Reliability Uptime 99.9%
Cost AI API usage <$50/month typical

7.2 Security Requirements

  • Secrets Management: Environment-based configuration with zero secrets in codebase
  • Authentication: JWT token-based API authentication with refresh token rotation
  • Authorization: Role-based access control (RBAC) with granular permissions
  • CSRF Protection: Django CSRF middleware on all state-changing operations
  • Content Security Policy: Strict CSP headers to prevent XSS attacks
  • Rate Limiting: Per-user and per-IP rate limiting on API endpoints
  • Input Validation: Comprehensive input sanitization and validation
  • Dependency Scanning: Automated security scanning of dependencies (Dependabot, Snyk)
  • HTTPS Enforcement: TLS 1.2+ required for all production deployments

7.3 Compatibility Matrix

Platform Support Level Notes
macOS (Intel) ✅ Full Native and Docker support
macOS (Apple Silicon) ✅ Full Native and Docker support
Linux (Ubuntu/Debian) ✅ Full Native and Docker support
Linux (Other distros) ✅ Full Docker recommended
Windows (WSL2) ✅ Full Docker recommended
Windows (Native) ⚠️ Docker only Native Python support limited

7.4 Testing Requirements

  • Unit Tests: >90% code coverage using pytest
  • Integration Tests: API endpoint testing with Django test client
  • E2E Tests: Critical user flows tested with Playwright or Cypress
  • AI Testing: Mock AI responses for deterministic test results
  • Performance Tests: Load testing for concurrent user scenarios
  • Security Tests: OWASP Top 10 vulnerability scanning

7.5 Monitoring & Observability

  • Application Logging: Structured logging with correlation IDs
  • Error Tracking: Sentry integration for error monitoring and alerting
  • Performance Monitoring: APM tools for response time tracking
  • Health Checks: /health endpoint for deployment verification
  • Metrics: Prometheus-compatible metrics for key operations
  • Alerting: Automated alerts for errors, latency spikes, and API failures

8. Data Model

Core Entities

┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│   Content   │────►│   Version   │────►│   Export    │
│  (Post/PRD) │     │   History   │     │  (GH/Jira)  │
└─────────────┘     └─────────────┘     └─────────────┘
       │
       ▼
┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│  AI Model   │────►│   Prompt    │────►│  Response   │
│  Provider   │     │  Template   │     │   Cache     │
└─────────────┘     └─────────────┘     └─────────────┘

Key Models

  • Content: Posts, pages, PRDs, documentation with versioning
  • AIProvider/AIModel: Multi-provider AI configuration with cost tracking
  • PromptTemplate: Versioned prompt management with A/B testing support
  • AIResponse: Cached AI responses for efficiency with TTL management
  • Issue: GitHub issue tracking and generation with sync status
  • PRDState: PRD lifecycle management with change tracking
  • Analytics: Privacy-compliant event tracking with consent management
  • User: User accounts with roles and permissions
  • SiteSettings: Global site configuration and feature flags
  • Media: File uploads with optimization and CDN support
  • Webhook: GitHub webhook configuration and event logs

9. Implementation Roadmap

Phase 1: Foundation (v1.0) ✅ Complete

  • Django backend with REST API
  • Jekyll static site generation
  • AI content generation (OpenAI/Anthropic)
  • GitHub integration (issues, repos)
  • PRD generation and enhancement
  • Docker-first development
  • Privacy-first analytics

Phase 2: Enhancement (v1.1) - Q1 2026

  • Visual content editor (WYSIWYG) with drag-and-drop
  • Advanced A/B testing with statistical significance tracking
  • Headless CMS API with GraphQL support
  • Multi-language support (i18n) with translation management
  • Team collaboration features (comments, reviews, approvals)
  • Advanced media management (video support, image optimization)
  • Custom domain support with SSL automation

Phase 3: Scale (v1.2) - Q2 2026

  • Multi-tenant architecture with isolated data
  • Enterprise SSO integration (SAML, OAuth2, LDAP)
  • Advanced analytics dashboard with custom reports
  • Custom AI model fine-tuning for domain-specific content
  • Plugin/extension system with marketplace
  • White-label customization options
  • Advanced backup and disaster recovery

10. Risk Assessment

Risk Impact Probability Mitigation
AI API cost overruns High Medium Aggressive caching, usage alerts, cheaper model fallbacks, budget caps
GitHub rate limiting Medium Medium Request batching, exponential backoff, conditional requests, webhook optimization
Breaking changes in dependencies Medium Low Version pinning, automated dependency testing, CI/CD validation
Security vulnerabilities High Low Regular audits, dependency scanning, security headers, penetration testing
Data loss or corruption High Low Automated backups, database replication, point-in-time recovery
Deployment failures Medium Medium Blue-green deployments, rollback procedures, health checks
Performance degradation Medium Medium Load testing, caching strategies, database query optimization
User adoption challenges Medium Medium Comprehensive documentation, video tutorials, community support

11. Success Criteria

MVP Definition of Done

  • All pytest tests pass (>90% coverage)
  • Docker Compose builds without errors on all supported platforms
  • Health check endpoint returns 200 OK with system status
  • Admin login functional with proper authentication flow
  • AI generation produces valid, coherent content
  • Jekyll builds successfully with all content types
  • GitHub Pages deployment works with automatic CI/CD
  • Documentation complete with installation and usage guides
  • Error handling and logging implemented throughout
  • Security audit completed with no critical issues

Launch Criteria

  • 10 beta users onboarded successfully with positive feedback
  • Average setup time <10 minutes from installation to first published content
  • Zero critical security issues in security audit
  • Performance benchmarks met (page load <2s, API response <500ms)
  • Privacy compliance verified (GDPR/CCPA requirements met)
  • Documentation reviewed and approved by beta users
  • Monitoring and alerting systems operational
  • Backup and recovery procedures tested

12. Appendix

Glossary

Term Definition
CMS Content Management System - software for managing digital content
PRD Product Requirements Document - specification of product features and requirements
SSG Static Site Generator - tool that generates static HTML from templates and content
AI Provider Service providing AI capabilities (OpenAI, Anthropic, xAI)
Jekyll Ruby-based static site generator used for GitHub Pages
Django Python web framework providing backend API and admin interface
DRF Django REST Framework - toolkit for building Web APIs in Django
RBAC Role-Based Access Control - authorization system based on user roles
JWT JSON Web Token - stateless authentication token standard
WYSIWYG What You See Is What You Get - visual content editor
SSO Single Sign-On - authentication allowing users to log in once for multiple services

Contact

  • Repository: https://github.com/bamr87/zer0-pages
  • Documentation: https://zer0-pages.dev/docs
  • Issues: https://github.com/bamr87/zer0-pages/issues

This document is maintained by zer0-pages and auto-updated via PRD Machine.