§1The problem
The clinic needed a fast website, well ranked in search engines and in 4 languages, without anyone having to write articles by hand every week.
§2What I built
- SiteNext.js with static export, 4 languages (pt, en, fr, es), SEO (sitemap and redirects generated at build time, SEO audit) and checks before the build.
- Daily robotTakes the day's Instagram post, generates 4 articles (one per language), validates them, saves them to the site's database, notifies by email and makes the commit that triggers the deploy.
- Weekly planContent plan (trend research + email) and an undo/republish button for posts.
- DeployGitHub Actions: S3 + CloudFront on every push to main.
- Email forwarderOn AWS (SES + S3 + Lambda), with a repeatable setup script.
§3The hard parts
5 entries- 01
Feed source
Switched from BrightData to Meta's Graph API (free, original-resolution images, real timestamps). The old source changed format and the robot spent ~2 weeks reporting “0 posts” with no error at all; now I compare real posts with what the fetch returns when investigating.
- 02
Resilient pipeline
A rolling 48 h window to recover late runs without duplicating published posts; exit codes that tell permanent errors from temporary ones.
- 03
Meta token
The token is long-lived (~60 days) and the robot renews it at the start of every run.
- 04
Content in 4 languages
With automatic checks before publishing.
- 05
A concurrency trap
The robot rewrites the whole config file at the end; editing it during a run silently lost the edit (documented).
§4Result
- languages
- 4
- articles per daily run
- 4
The site is live and the robot generates articles in 4 languages per run (the latest automatic run, in November 2026, published 4 posts in 4 languages). I don't have traffic or conversion numbers.
§5Stack
- Next.js 16 (static export)
- React 19
- next-intl
- Tailwind 4
- TypeScript
- SQLite (better-sqlite3)
- Meta Graph API
- LLM via command line (text generation)
- AWS (S3, CloudFront, SES, Lambda)
- GitHub Actions
- Lighthouse / Yoast SEO audits