Skip to content
JM.
Back to work

InstaPlug — Instagram Feed Widget

Backend behind an embeddable Instagram widget trusted by 1000+ users — Meta Graph API integration, multi-account feeds, and a cache layer that keeps embeds alive even when Instagram goes down.

Stack
Node.js · Instagram API · GraphQL · PostgreSQL · Redis · Docker
Links
Live

The challenge

InstaPlug puts an Instagram feed on any website in about a minute — grids, sliders, masonry, galleries — with moderation, shoppable posts, custom CTAs, and analytics. It serves 1000+ users: e-commerce stores, creators, and agencies managing fleets of client accounts.

Every one of those embeds depends on Instagram — OAuth tokens that expire, per-account rate limits, and an upstream that can go dark at any time. The backend has to make all of that invisible.

What I engineered

This project was my deep dive into the Meta Graph API — configuring Facebook developer apps, building the OAuth connect flow, managing permissions, and owning the full token lifecycle.

  • Seamless account connection. Users link one or many Instagram accounts through Meta's OAuth flow; long-lived tokens are stored securely and refreshed before they expire.
  • Feed sync engine. Posts are pulled from Instagram and persisted, so widgets read from our infrastructure instead of Instagram's on every page view.
  • Multi-account aggregation. Multiple Instagram accounts merged into a single widget — a core feature for agencies.
  • Resilience by design. When Instagram goes down, widgets keep serving the last synced feed until the API recovers. Visitors never see a broken embed.

Architecture

InstaPlug architecture: Meta OAuth tokens and per-account feed sync into PostgreSQL; widgets served from a Redis cache instead of Instagram.

GraphQL API on Node/Express → PostgreSQL (Sequelize) for accounts, tokens, and synced posts → Redis caching the feed payloads that every embed requests on every page load → Meta Graph API upstream. Shipped with Docker.

The cache layer is what makes the product viable at all: thousands of websites loading embeds would exhaust Instagram's rate limits in minutes if every view went upstream.

Impact

  • Embeds served to 1000+ users without depending on Instagram per request
  • Zero broken widgets during Instagram outages, thanks to cached fallback
  • Proactive token refresh that keeps connections alive without user action

What I took from it

Third-party platforms set the rules — and the rules change. Caching aggressively, refreshing proactively, and failing soft mattered more than any single feature.

Next projectKuppa — Home Energy Analytics