Back to projects

Autopost

Solo design and build

Autopost is a Python automation system that schedules and publishes content across Reddit, X, and LinkedIn from one place. The interesting engineering isn't the posting — it's everything around it: three different OAuth2 flows with token refresh for long-running sessions, per-platform formatting rules (hashtags, character limits, link previews), and a priority queue that respects each platform's rate limits so automated accounts stay in good standing instead of getting banned.

Resilience was the design priority for a system that runs unattended: API failures, expired tokens, and network timeouts are all handled with retry-on-failure, and critical failures trigger email alerts rather than silent drops. On top of the delivery layer sit reusable content templates with variable substitution, A/B testing of post variations, and per-post engagement analytics rolled into daily cross-platform reports — so the system learns what actually engages, not just what shipped. A final security pass moved every credential into environment variables and added automated dependency updates with vulnerability scanning.

Built With

PythonOAuth2REST APIsScheduling

Highlights

  • OAuth2 integrations for three platforms (Reddit, X, LinkedIn) with token refresh for long-running unattended sessions.
  • Rate-limit-aware priority queue with retry-on-failure — designed to keep automated accounts in good standing under each platform's content policies.
  • Platform-aware formatting engine: hashtags, character limits, and link previews handled per destination.
  • A/B testing on post variations plus per-post engagement analytics rolled into daily cross-platform reports.
  • Resilient unattended operation: handles API failures, expired tokens, and network timeouts, with email alerts on critical failures.

Security Considerations

  • Every credential moved into environment variables — no secrets in the repo.
  • Automated dependency updates and vulnerability scanning keep the supply chain monitored.
  • OAuth token lifecycle managed explicitly (refresh, expiry handling) rather than storing long-lived secrets.

Project Timeline

Platform Research

Mar 2024

Researched social media APIs (Reddit, Twitter/X, LinkedIn) for programmatic posting. Documented rate limits, auth flows, and content policies.

OAuth Integration

Apr 2024

Implemented OAuth2 flows for each platform with a token refresh mechanism for long-running sessions.

Posting Engine

Jun 2024

Built the core scheduler with support for text, images, and link posts. Added per-platform formatting (hashtags, character limits, link previews).

Queue Management

Jul 2024

Implemented a post queue with priority levels, retry-on-failure, and rate-limit-aware scheduling to avoid platform bans.

Content Templates

Sep 2024

Added reusable content templates with variable substitution, plus A/B testing for post variations to learn what actually engages.

Analytics & Reporting

Oct 2024

Tracked likes, shares, and comments per post and rolled up daily reports across platforms.

Error Recovery

Nov 2024

Built resilient handling for API failures, expired tokens, and network timeouts. Added email alerts for critical failures.

Refactoring & Cleanup

Jan 2025

Standardised file structure, normalised logging, and removed debug noise. Locked in consistent naming across modules.

Security & Maintenance

Feb 2025

Moved every credential into environment variables. Added automated dependency updates and vulnerability scanning.