My-Patreon-Manager
Описание
Full LLM driven Patreon space management
Языки
- Go55,3%
- HTML38,5%
- Shell3,3%
- PowerShell0,6%
- Dart0,6%
- PLpgSQL0,5%
- Остальные1,2%
My Patreon Manager
Automate tier-gated content creation for Patreon from your Git repositories.
My Patreon Manager scans repositories across GitHub, GitLab, GitFlic, and GitVerse, generates quality-scored content through an LLM pipeline, and publishes tier-gated posts to Patreon. CLI-first, idempotent, and safe to re-run.
Find What You Need (Landing)
Jump directly to the information you're looking for:
Setting up for the first time
- Quick Start (below) — 5 steps from clone to publish
- Quickstart Guide (long-form) — the full 10-minute walkthrough
- Obtaining Credentials — step-by-step signup flows for every token-issuing service with direct links (Patreon · GitHub · GitLab · GitFlic · GitVerse · OpenAI DALL-E · Stability AI · Midjourney proxies · OpenAI-compatible providers · LLMsVerifier)
- Configuration Reference → Required / Optional at a Glance — every env var grouped by flow with mandatory/optional markers and direct signup links
- Minimum viable
recipe — the smallest config that delivers multi-org scanning + articles + illustrations.env
Running the pipeline
command design — the versioned, revision-aware pipeline that replacesprocesssyncimplementation plan — task-by-task walkthrough of what's built and howprocess- Configuration Reference → Process Pipeline — every
,MAX_ARTICLES_*, drift-check, and lock knobGENERATOR_VERSION - CLI: process · scan · generate · publish · validate
Migrations and schema
- Migration system refactor spec — why the versioned Migrator exists
— CLI for schema migrationspatreon-manager migrate up | status | down- SQL Schema reference
Articles + illustrations
- Content Generation Guide — LLM pipeline, quality gates, tier mapping
- Illustration Generation + Image Providers — DALL-E 3 · Stability AI · Midjourney · OpenAI-compat
- LLMsVerifier Setup — the quality-gate service all LLM calls route through
Patreon specifics
- Patreon Tiers Guide — tier configuration and access control
- Obtaining Credentials § Patreon — OAuth walkthrough + campaign-ID lookup
Deployment, operations, security
- Deployment Guide · Docker · Podman · systemd · Kubernetes · Bare Binary
- Admin Manual — webhooks, monitoring, SLOs, credential rotation
- Security docs · Runbooks · Troubleshooting FAQ
- Local Verification (15-step pre-publish checklist)
Architecture and development
- Architecture Overview · ADRs
- Developer Manual — adding providers, renderers, migrations, tests
- Tutorial — first sync · server setup · security scanning · testing · content pipeline
- OpenAPI spec · CLI reference
- Main specification
Project status and future work
- Known Issues, Unfinished Work & Future Enhancements — the canonical "what's not done and why" document. Covers product non-goals (multi-tenancy, drift auto-merge, article scheduling, separate REVIEWER_KEY), infrastructure gaps (Postgres integration harness, coverage.sh measurement semantics, submodule mirrors), deferred enhancements (
, illustration cleanup on repo delete, preview UI SPA, webhook-driven sync, multi-node parallelism, migrate-down backups), documentation deferrals (video course scripts, legacy planning artifacts), and environmental caveats (Semgrep auth, COVERAGE_MIN default). Each entry has a workaround and a concrete path to resolution.models.Post.URL
Full documentation index with every file: see "Documentation" section below.
Features
- Multi-platform Git scanning -- GitHub, GitLab, GitFlic, and GitVerse as first-class, interchangeable sources with mirror detection
- Multi-organization support -- scan repositories across multiple organizations and groups in a single sync run
- LLM-powered content generation -- quality-scored model selection with automatic fallback chains and configurable quality thresholds
- Tier-gated Patreon publishing -- maps repository content to Patreon tiers with deduplication via content fingerprinting
- CLI subcommands --
(top-level pipeline),process,scan,generate,validatewithpublish,--dry-run,--schedule,--org,--repo,--pattern,--json.--log-levelis retained as a deprecated alias forsync.process - HTTP server -- Gin-based server on
with health checks, Prometheus metrics, admin endpoints, and webhook handlers:8080 - Resilience patterns -- circuit breakers, exponential backoff, per-provider rate limiting
- Observability -- structured JSON logging, Prometheus metrics, Grafana dashboards
- Idempotent operations -- content fingerprinting and checkpointing ensure safe re-runs after failures
- Database flexibility -- SQLite (default) or PostgreSQL for production
- Security-first -- twelve-factor credential management, HMAC-signed webhooks, credential redaction in all logs
Quick Start
is still accepted as a deprecated alias forsyncand prints a warning to stderr. Preferprocessfor new automation.process
Environment Variables Quick Reference
Full reference with mandatory/optional tables by flow: docs/guides/configuration.md § Required / Optional at a Glance Step-by-step signup flows with direct links to every token-issuing service: docs/guides/obtaining-credentials.md
Required
Legend: ❗ mandatory · ○ optional.
Patreon API (all ❗)
| Variable | Description | Obtain from |
|---|---|---|
| OAuth client ID | Patreon Platform Portal |
| OAuth client secret | Same page |
| Access token | Patreon OAuth flow or Creator's Access Token |
| Refresh token | Returned alongside access token |
| Campaign ID | |
Security
| Variable | Required | Description | Obtain from |
|---|---|---|---|
| ❗ | Signs download URLs | Self-generated: |
| ❗ (if using preview UI) | Gates approve/reject/edit/resolve-drift endpoints | Self-generated: |
| ○ | Shared secret for webhook signatures | Self-generated |
Recommended
Git Provider Tokens (at least one ❗ for multi-org scanning)
| Variable | Description | Obtain from |
|---|---|---|
| Scopes: (classic) or (fine-grained) | GitHub · Personal access tokens |
| Scopes: , | GitLab · Personal access tokens |
| Repository read scope | GitFlic account settings |
| Repository read scope | GitVerse account settings |
Each provider also supports a token for failover (e.g., ).
Multi-Organization (all ○)
| Variable | Default | Description |
|---|---|---|
| personal repos | Comma-separated GitHub organization logins; scans every accessible org |
| personal repos | Comma-separated GitLab group paths; subgroups auto-included |
| personal repos | Comma-separated GitFlic organization names |
| personal repos | Comma-separated GitVerse organization names |
Illustration Providers (set at least one ❗ to generate per-article images)
| Variable | Description | Obtain from |
|---|---|---|
| Enables DALL-E 3 (recommended minimum) | OpenAI Platform · API keys (requires paid billing) |
| Enables Stability AI (SDXL) | Stability Platform · API keys |
+ | Enables Midjourney proxy (both required; no official API) | GoAPI, UseAPI.net, or self-hosted midjourney-api |
+ | Enables an OpenAI-compatible endpoint | Venice, Together, self-hosted LiteLLM; optional |
Illustration behavior is controlled by (default ), (default ), , , , and . See Illustration Generation and Image Providers for full reference.
LLMsVerifier (required for content generation)
| Variable | Description |
|---|---|
| LLMsVerifier service URL (default ) |
| LLMsVerifier API key |
Optional
Content Generation
| Variable | Default | Description |
|---|---|---|
| | Minimum quality score for generated content |
| | Daily token budget across all LLM providers |
| | Max concurrent in-flight LLM calls |
| | Tier mapping strategy |
Database
| Variable | Default | Description |
|---|---|---|
| | Database driver ( or ) |
| | SQLite database path |
| | PostgreSQL host |
| | PostgreSQL port |
| | PostgreSQL user |
| | PostgreSQL password |
| | PostgreSQL database name |
Server
| Variable | Default | Description |
|---|---|---|
| | HTTP server port |
| | Gin mode ( or ) |
| | Log level (ERROR, WARN, INFO, DEBUG, TRACE) |
| | Per-IP rate limit (requests/second) |
| | Per-IP burst budget |
Multi-Org Configuration
Configure multi-organization scanning to discover repositories across multiple GitHub organizations and GitLab groups in a single sync run:
When unset, each provider scans the token owner's personal repositories. All organizations are iterated with full pagination, and cross-org deduplication is applied through the existing mirror detection pipeline.
See Multi-Org Support for complete documentation.
Documentation
Getting Started
| Document | Description |
|---|---|
| Quickstart Guide | Getting started in 5 minutes |
| Configuration Reference | Complete environment variable and config reference |
| Obtaining Credentials | How to obtain Patreon and Git provider tokens |
| Multi-Org Support | Multi-organization repository scanning setup |
Architecture
| Document | Description |
|---|---|
| Architecture Overview | System design and component interactions |
| SQL Schema | Database schema reference |
| ADRs | Architecture Decision Records |
Guides
| Document | Description |
|---|---|
| Git Providers | Provider-specific setup and configuration |
| Content Generation | LLM pipeline, quality gates, and tier mapping |
| Patreon Tiers | Tier configuration and access control |
| LLMsVerifier Setup | LLMsVerifier service integration |
| Deployment Guide | Production deployment guide |
| Local Verification | 15-step pre-publish checklist |
API Reference
| Document | Description |
|---|---|
| OpenAPI Specification | HTTP API specification |
| CLI Reference | CLI subcommands and flags |
Tutorials
| Tutorial | Description |
|---|---|
| First Sync | Zero to first published Patreon post in 12 steps |
| Server Setup | Start the server, configure webhooks, verify endpoints |
| Security Scanning | Run every scanner locally, read findings, fix them |
| Testing Guide | Run and write every test type (unit, fuzz, bench, chaos, leak) |
| Content Pipeline | LLM generation, quality gates, tiers, rendering, fingerprints |
Manuals
| Manual | Description |
|---|---|
| End-to-End Walkthrough | Complete operator walkthrough |
| Admin Manual | Webhooks, monitoring, SLOs, credential rotation |
| Developer Manual | Adding providers, renderers, migrations, tests |
| CLI: sync | Full pipeline subcommand |
| CLI: scan | Discovery-only subcommand |
| CLI: generate | Content generation subcommand |
| CLI: validate | Configuration validator |
| CLI: publish | Publish pre-generated content |
| Deploy: Docker | Docker + docker-compose |
| Deploy: Podman | Podman + systemd integration |
| Deploy: systemd | Bare binary + systemd unit |
| Deploy: Kubernetes | K8s deployment + CronJob |
| Deploy: Binary | Cross-compile and run |
Video Course (11 modules)
| Module | Script |
|---|---|
| 1. Introduction & Core Concepts | Script |
| 2. Installation & First Sync | Script |
| 3. Configuration Deep-Dive | Script |
| 4. Content Templates & Customization | Script |
| 5. Filtering & Mirror Detection | Script |
| 6. Advanced Features & Integrations | Script |
| 7. Deployment & Production Readiness | Script |
| 8. Extending the System | Script |
| 9. Concurrency Patterns | Script |
| 10. Observability | Script |
| 11. Multi-Org Scanning | Script |
See also: Course Outline | Recording Checklist | Distribution Plan
Operations
| Document | Description |
|---|---|
| Security | Security policies and baselines |
| Runbooks | Operational procedures |
| Troubleshooting FAQ | Common issues and solutions |
| Main Specification | Full system specification |
Development
License
See the project license file for terms and conditions.