---
title: "IGA Social: 303 clips built, 293 on YouTube, and a week of Facebook posts from one button"
url: https://phatdev.net/en/case-studies/iga-weekly-content-ai
lang: en
updated: 2026-11-08
alternate:
  vi: https://phatdev.net/vi/case-studies/iga-weekly-content-ai
markdown: https://phatdev.net/en/case-studies/iga-weekly-content-ai.md
---

# IGA Social: 303 clips built, 293 on YouTube, and a week of Facebook posts from one button

> A gemstone shop has to post steadily, but hand-written captions vary every time and free-running AI tends to make things up. I gathered the work in one internal app: AI only drafts inside rules, and a person always decides.

- Client: IGA (Infinity Gems An Thịnh), a gemstone store
- Industry: Gemstones and feng shui items, social media content
- Year: 2026
- Role: Planning, architecture and operations (code written with Claude Code)
- Duration: Recorded from Oct 2026, in daily internal use
- Stack: Next.js 15, React 19, Docker, FFmpeg, Sharp, Playwright, Facebook API, YouTube API

## Key results

- 303: video clips built and stored
- 293: clips already on YouTube
- 4,556: products in the catalogue, synced daily
- 77: API endpoints in the app

## Background

IGA (Infinity Gems An Thịnh) sells gemstones, semi-precious stones and feng shui items. A shop like that has to post steadily: product photos, short videos, captions, posts on Facebook and YouTube.

Before this tool, the work was scattered. Clips shot on a phone sat on the phone or in a chat group. Product details lived on the shop's website. Captions were written by hand, a different style every time.

I built IGA Social, an internal web app that gathers all of this in one place. It does not post everything on its own. AI drafts, a person reviews and decides, and only then does a post go out.

![Diagram of the path from the shop website and phone clips, through AI drafting and video building, to a person who approves, then out to the Fanpage, YouTube and landing pages](https://phatdev.net/uploads/case/iga-weekly-content-ai/flow-en-1920.webp)

## The problem

Three things make it hard for a gemstone shop to post steadily.

First, effort. Every post needs a product picked, photos chosen, text written, a video built and a time set. That work is spread over many places, so it breaks off easily.

Second, free-running AI gets things wrong. It invents details that are not true, or promises feng shui effects far too strongly. That kind of content is easy for Facebook to remove and it hurts the shop's credibility. A public caption must not show a price, either.

Third, the data lives in several places: the shop website lists over four thousand items, clips sit on phones, and YouTube descriptions were typed by hand. When each channel says something slightly different, the information drifts apart.

## How it was done

### 1. One app, with data you can copy as files

IGA Social is a Next.js 15 app packaged in Docker. It has an admin interface, 77 API endpoints (the addresses the app and its extension use to exchange data) and a worker (a background process) that checks for jobs every minute.

I chose not to use a database. Each data set (products, photos, captions, videos, the calendar, accounts) is one JSON file. The reason is practical: backing up or restoring means copying a folder. Every write goes to a temporary file first and is then renamed, so a power cut halfway through cannot damage the main file.

Sign-in uses the same authentication service as the shop's other internal apps, and a session lasts 14 days.

### 2. A week of posts from one button, with AI writing inside rules

In the FB Sync section, pressing "Plan new week" produces 7 posts waiting for review. The system picks products in rotation, favouring the ones posted least. It rotates 7 writing angles (product, knowledge, tip, Q and A, behind the scenes, gift, feng shui) and alternates 3 tones: expert, emotional and closing a sale. Lunar calendar occasions such as the 1st and 15th of the month, Buddha's Birthday and Vu Lan come pre-tagged with a suggested angle.

Each post shows as a Facebook card with four buttons: Approve, Edit or give feedback, Rewrite, Drop. Auto-posting is off by default.

![Diagram of seven writing angles, three tones and three checks before publishing](https://phatdev.net/uploads/case/iga-weekly-content-ai/week-en-1920.webp)

The writing rules go straight into the instructions for the AI: feng shui stays light, promised effects are forbidden, and the stock phrases typical of AI writing are banned. After the AI writes, a rule-based filter checks the text again. At publishing time a price blocker keeps public captions free of prices, hand-written ones included. If the same product was posted a few days ago, or the opening resembles an older post, the system asks again before publishing.

### 3. From a phone clip to a vertical video

Clips come in three ways: uploaded by hand, dropped into an inbox folder, or pulled from a chat group through a messaging bot. Each clip goes through a build queue run by FFmpeg, at most 2 jobs at once. The video gets an intro, a two-line spec card, background music and an outro, and is exported at 1440x2560 H.264. If a clip has speech, the speech stays and the music is lowered.

Every video passes three checks: at build time, against the product's current details (if the details change, it is rebuilt), and a final look at each file before sending. A clip with missing details is flagged and kept out of the batch.

![Diagram of four steps: raw clip, build queue, three checks, publish](https://phatdev.net/uploads/case/iga-weekly-content-ai/video-en-1920.webp)

### 4. Real data first, AI wording second

YouTube descriptions are not free-written by AI. They are assembled from a template: an intro about the stone type that the shop wrote itself, then lines for stone type, size and weight taken from real data. A clip not yet linked to a product on the website gets a description with no price line.

The product catalogue mirrors the in-stock items of the shop website and stores only name, code, link, group and status, with no photos yet. Only when an item is picked for content does the system download the photos, convert them to WebP and create a public landing page with structured data for search engines. The original photos are always kept for posting.

![The public category page on desktop: element filter buttons and a grid of stone products](https://phatdev.net/uploads/case/iga-weekly-content-ai/list-desktop-1440.webp)

## Results

The numbers below come from the project page and the IGA Social documentation, recorded on 22 Oct 2026. They are counts inside the running app. They show the scale of what was built, not views or revenue, and I have not measured the time saved.

| Number | What it means |
|---|---|
| 303 | video clips built and stored |
| 293 | clips already on YouTube |
| 4,556 | products in the catalogue, synced daily from the shop website |
| 77 | API endpoints in the app |

Each week, 7 draft posts are ready to review instead of every post being written by hand. YouTube descriptions and the specs on the videos come from the same data, so channels do not drift apart. The app is in daily internal use.

![A public landing page for one stone product](https://phatdev.net/uploads/case/iga-weekly-content-ai/m-landing-780.webp)

![The public product list](https://phatdev.net/uploads/case/iga-weekly-content-ai/m-list-780.webp)

One thing is not done. The TikTok channel already has sign-in and the video-posting API connected, but it waits for TikTok to approve the app, so videos are not public there yet.

## Lessons

To run AI inside a shop, write the rules first and switch the AI on afterwards. The rules sit both before writing (the instructions) and after it (the filter, the price blocker, the duplicate check). One layer is not enough. How to word a request so the AI does not make things up is in [How to Ask an AI So It Gets It Right and Stops Making Things Up](https://phatdev.net/en/blog/prompt-engineering-for-developers).

Build facts from real data and do not let AI guess. Specs, sizes and YouTube descriptions all come from the product record. AI only handles the soft wording.

A person always makes the final call. Auto-posting is off, and new posts wait for review. I chose this because a wrong caption that has already gone out is hard to take back.

JSON files are enough for one shop. But remember that my nightly backup keeps the data only, while photo and video files sit outside it. Original photos are kept so the web versions can be rebuilt, while videos and other media files need a separate way to be kept.

## Need something similar?

If your shop posts in a scattered way, or you want AI to draft content without making things up, send me a few lines about how you work today. I will look at your existing product data and clips first, then tell you plainly which parts a machine should do and which parts a person should keep.

- See the project page: https://phatdev.net/en/projects/iga-social.md

## More case studies

- [Media Studio: photos, banners and review videos from one link, AI photo match from 72 to 89](https://phatdev.net/en/case-studies/media-studio-review-content.md)
- [Tan Doanh: a custom theme, a PC build tool and installments, mobile PageSpeed from 65 to 96](https://phatdev.net/en/case-studies/tandoanh-theme-buildpc.md)
- [IGA: 5,256 gemstone products on a new design, mobile speed from 61 to 99, page addresses kept](https://phatdev.net/en/case-studies/iga-website.md)
