Skip to content

Repository files navigation

Autoblogger Agent

A Cloudflare Workers-based autonomous blogging agent that generates and publishes content to Cloudflare Pages.

Current Status

The project is partially implemented but NEEDS SECURITY IMPLEMENTATION before going live.

What's Implemented

  • Basic agent structure using Cloudflare Workers
  • Content generation capability
  • Hugo-based blog structure
  • Cloudflare Pages integration for publishing

Critical TODOs

  1. SECURITY (URGENT): The agent is currently deployed but needs authentication:

  2. Pages Integration:

    • Hugo site structure is set up
    • Build process needs testing
    • Theme (PaperMod) integration needs verification

Project Structure

autoblogger-agent/
├── src/
│   ├── index.ts         # Main agent code
│   ├── pages-integration.ts # CF Pages deployment logic
│   └── types.ts         # TypeScript types
├── content/            # Hugo blog structure
├── wrangler.toml       # Cloudflare configuration
└── package.json

Environment Variables Set

  • ACCOUNT_ID
  • PAGES_PROJECT_NAME (set to "autoblog-site")

Next Steps

  1. Choose and implement authentication method:

    • Option A: Basic API key authentication
    • Option B: Cloudflare Access integration
  2. Test Hugo build process on Pages:

    • Verify theme installation
    • Test post generation and routing
    • Confirm build commands
  3. Add rate limiting and additional security measures

API Endpoints (Once Secured)

# Generate a post
POST /generate
{
    "topic": "Your Topic Here"
}

# Publish a post
POST /publish
{
    "postUrl": "post-url-here"
}

Notes for Next Developer

  • The agent is built on Cloudflare's Agent SDK
  • Uses Hugo static site generator for blog structure
  • PaperMod theme is configured but needs verification
  • All necessary wrangler configurations are in place
  • Current deployment throws errors (intentional until security is implemented)

Security Implementation Options

Option A: API Key Authentication

Quick implementation via:

  1. Add a secret key via wrangler
  2. Add middleware to check Authorization header
  3. Update agent code to verify key

Option B: Cloudflare Access

More robust but requires:

  1. Setting up Access application
  2. Configuring policies
  3. Implementing token verification
  4. Updating agent to check CF Access headers

Choose an implementation approach before proceeding with development.

About

Automated blog generation tool with Cloudflare Pages integration

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages