Skip to content
Baptiste Ringler's portfolio
Clap-itStudio

Private network: no public address

Prepare, review and post on Instagram, without leaving the team.

The internal tool that prepares, reviews, schedules and posts Clap-it's Instagram content, and manages the account.

Duration
2 days
for the first version, November 7 and 8, 2026
Commits
49
six batches, shipped and reviewed
Tests
320
117 in Go, 203 with Vitest
Coverage
81 to 96%
of Go tests, depending on the module
Go modules
11
about 14,200 lines, layered

Overview

A back office for Clap-it's two co-founders: a casting call or a clap-it.fr article becomes a post, a carousel or a story, reviewed on the real files before it goes out, posted on time through Instagram's official API. It is sealed off from clap-it.fr and invisible from the Internet.

Role
Design and development, solo: product, design, front end, back end, infrastructure, Meta integration
Period
November 2026: in use within two days, a sixth batch on the 10th
Status
In use since November 8, 2026, on a private network, connected to @clapitcastings
Sign-in: two-factor authentication is mandatory

Product side

The problem

By hand

  • A designer for every visual
  • Screenshots passed around in chat
  • A “can you have a look?” review that leaves no trace
  • A phone to post at the right time

With the Studio

  • A casting call or a clap-it.fr article becomes a post in one click
  • Visuals drawn in the brand colors, live in an iPhone
  • A review before every post, on the real files, with a record of who approved
  • Posting at the scheduled time, on its own, through the official API
  • The account managed in one place, with a log of every action

The principle: sealed off from clap-it.fr. If the Studio were compromised, it would give access to nothing on the site.

The life of a piece of content

Screenshots taken on a local copy, with demo data and a fake Meta server: nothing was posted to Instagram.

A 4:5 post, a 10-slide carousel or a 9:16 story, from a casting call or an article: the slides come pre-filled.

Create: the format, then the source on clap-it.fr

What goes out on Instagram

A six-slide carousel and a story, rendered by the server as 1,080 px JPEGs, in clap-it.fr's art direction. Nine templates to choose from, slide by slide: here an article cover, a true or false, a list, an idea, a key figure and an ending.

“Casting scams” carousel
“Finding extras” story

The Studio's rules

Each one is enforced by the server, and often a second time by the database.

  • Always a review

    Nothing goes out without the JPEGs being approved. The other co-founder does it, or the author when alone: the history says who approved.

  • Frozen = reviewed

    What goes out is byte for byte what the reviewer saw.

  • Never post twice

    Each step is recorded: resuming after a crash posts nothing again.

  • The code, asked again

    Post now, retry, delete: a single-use proof, tied to that action.

  • No emoji in visuals

    A slide only accepts what the font can draw, in the browser and on the server.

  • Go easy on Meta

    Few calls, short caches, one read at a time: a blocked account stops everything.

  • “Maybe done”, never “try again”

    A slow action must not go out twice in public.

Managing the account

@clapitcastings
  • The profile, read live
  • Stories and posts, made in the Studio or not
  • Reply to, hide, delete or turn off comments
  • Delete a post, with the code
  • The log: who did what, when, append-only

Only what Meta's API does on its own: nothing hacked together for the bio or story highlights.

What comes next

  • Real statistics

    The screen is designed, on sample data flagged by a banner.

  • TikTok, then Meta ads

    Two-person approval, spending caps enforced by the server, an emergency stop.

  • Claude to suggest copy

    The button is in place, disabled: a human will always review.

More screens

The Library: the nine visual templates
The Instagram account as it is
Statistics (sample data, until Meta's are plugged in)
Settings: two accounts, two-factor enabled

Code side

The architecture

The two co-foundersInvisible from the Internet
TAILSCALE

VPS, separate Docker project: sealed off from clap-it.fr

The Studio's Traefik

Certificate through a DNS challenge

Next.js 16

Interface, Better Auth, JPEGs rendered with Takumi

LOOPBACK ONLY

Go API (Echo)

Re-checks the session on every request

  • PostgreSQL

  • RustFS

  • Meta Graph API

  • clap-it.fr public API

The only public endpoint

Meta

Has to download the images

Public endpoint

Read-only, links signed for 15 min

Frozen JPEGs

Fingerprint re-checked

A separate process, without Meta's token or the session secret, in a read-only container.

A state machine for content

  1. Draft
  2. To review
  3. Scheduled
  4. Posting
  5. Posted

Failed“Retry” reopens the same attempt without posting what already exists

Editing scheduled content sends it back to draft: the review starts over

Every rule is checked in the service and restated in the WHERE clause, with a version number: a conflict between two tabs says who changed what, instead of overwriting.

The job that posts

  1. 1

    Take due content

    FOR UPDATE SKIP LOCKED

  2. 2

    Re-read each JPEG

    Against its fingerprint

  3. 3

    Read the quota

    Before posting

  4. 4

    Create the containers

    At Meta, then wait

  5. 5

    Final order

    Publish

  6. 6

    Read the link

    Of the post

CancellablePoint of no returnFinal
  • Transient error: three attempts
  • Repeated internal error: stop at the fifth
  • Server shutdown: the current outcome is written

The point of no return and the cancellation request live on the same database row: the database decides.

The connectors

  • Meta Graph API

    A system user's token, on the server only, sent in a header with appsecret_proof.

  • clap-it.fr public API

    Read like a visitor: 5 min cache, silent on a 429, redirects refused.

  • Takumi

    Each slide as a 1,080 px JPEG, in 30 to 50 ms, with no network resource.

  • RustFS

    The approved JPEGs, checked before storage, append-only.

  • Better Auth and WebAuthn

    An allowlist of 13 routes: every other one answers 404.

  • Tailscale

    The Studio on the private network; only the public endpoint goes through Funnel.

Security

Four PostgreSQL roles, with minimal rights

The website
Manages sessions and keys, without creating or deleting accounts.
The API
Reads no token, email or secret: a dedicated function says whether a session is valid.
Enrollment
The only command that creates a member.
The public endpoint
Runs a single function.
  • Mandatory two-factor authentication

    A passkey, or a password and a TOTP code. No sign-up, 12-hour sessions never extended.

  • Defense in depth

    Before any action, the API checks with Meta that the post is really ours.

  • Invariants held by the database

    Slides per format, a date required to schedule, at most two active members.

Quality

Go test coverage, by module

  • networks96 %
  • account88 %
  • content87 %
  • public endpoint88 %
  • Meta86 %
  • visuals82 %
  • publishing81 %

50 % → 100 %

Tests

117 Go test functions against a real PostgreSQL and a fake Graph server, and 203 Vitest tests.

Before every push and in CI

  • React Doctor at 100
  • ESLint
  • Vitest
  • Production build
  • golangci-lint
  • go vet
  • go test
  • govulncheck
  • Trivy

Reference files shared by Go and TypeScript: changing a rule on one side breaks the other side's tests.

A few interesting problems

  • One drawing for the preview and the JPEG

    Same templates, measured in hundredths of the width: at most 0.04% of pixels differ.

  • Cancel without half-posting

    A point of no return and a cancellation request, mutually exclusive on the same row.

  • “Failed” or “partly posted”?

    Before concluding, the job checks at Meta what is already online.

  • Invisible, yet Instagram must download

    Hence the public endpoint, rate-limited only after the signature check.

  • Two proxies on a single port 443

    Tailscale hands the Studio to its proxy over the PROXY protocol, real address included.

  • A Turkish “İ” and a final sigma

    Go and the browser read hashtags differently: a shared test-vector file settles it.

AI side

Claude Code

In the product

No AI in the Studio yet. The “Suggest with Claude” button is in place, disabled: Claude will suggest hooks, captions and hashtags, and a human will always review (EU AI Act, article 50).

MCP connectors

  • Playwright, with a virtual WebAuthn
  • Notion, for user stories

In the making: six batches, with Claude Code

Six batches, each planned, tested, checked in a real browser and reviewed

  1. 1Accounts and two-factor authentication
  2. 2Content and the review
  3. 3Frozen JPEGs
  4. 4Posting, tracking and cancellation
  5. 5Account management
  6. 6Nine templates and their catalog

Guardrails

  • No real post without my approval
  • Meta's pages never driven by a bot
  • Meta's token never displayed

Two art directions that never mix

The interface

A calm work tool, inspired by Listy: Poppins, solid ink, the blue kept for selection.

  • Background#FFFFFF
  • Ink#161827
  • Brand blue#5364F9

The highlighter: one word per page.

The posted visuals

clap-it.fr's art direction, so the account looks like the site: Inter, three backgrounds, the logo bars at the top and the logo at the bottom.

  • Night#070708
  • Cream#F2F1ED
  • Brand blue#5364F9

The strong element: the preview sits under Apple's official iPhone 17 Pro render, Dynamic Island on top, as 20 to 25 KB WebPs.

In numbers

days for the first version
2
commits
49
Next.js pages
14
React components
73
lines of TypeScript
~12,900
lines of Go
~14,200
API routes
~30
SQL migrations
11

The stack

Front end

  • Next.js 16
  • TypeScript
  • Tailwind CSS v4
  • shadcn/ui
  • Zod

Back end

  • Go
  • Echo
  • PostgreSQL 16
  • RustFS (S3)

Security

  • Better Auth
  • WebAuthn
  • Tailscale
  • Trivy

Networks

  • Meta Graph API
  • Instagram
  • TikTok

Infra

  • Docker Compose
  • Traefik
  • GitLab CI/CD

Tools

  • Claude Code
  • Playwright
  • Notion
  • Vitest
Next projectClap-it Clipping