I'm writing this as part of my submission for the H0 Hackathon: Hack the Zero Stack with Vercel and AWS Databases. But the database problem I'm about to describe is real and it took me longer to solve than I'd like to admit.

SlothPost is a tool I built for indie developers who want to build in public but can never find the time to actually write posts. It connects to your GitHub, Vercel, and App Store, captures all your activity, and drafts social media posts for X and Threads that you review and approve before they go live.

The part that runs everything is a cron-based scheduler. And the scheduler has an interesting DynamoDB design problem.

The problem

Every user in SlothPost can have multiple "products" — the things they're building. Each product has a posting schedule: something like "post to X every Tuesday and Thursday at 9am, post to Threads on Mondays."