Inspiration

A single wrong price or an unproven superlative in a public post can cost a brand trust, money, and legal trouble — and it usually gets caught only after publishing. I wanted a gate that sits between creation and publication: it checks copy against approved facts, rules, terminology, and palettes before anything goes public, and it never flags something it cannot prove. That rule became the product: no citation, no flag.

This project was built solo and submitted as a Top 50 finalist (of 1000+ teams) in Codex 48. It did not place in the Top 3 there. I am submitting the same working product here, unchanged in its core claims.

What it does

BrandGate is a pre-publish brand-governance platform. A creator pastes copy or uploads a document, and the gate checks it against a single source of truth called the Brand Vault.

  • Deterministic review first. Price contradictions, superlatives without approved evidence, restricted terminology, missing image alt text, and palette/contrast issues are checked by rules — not by vibes. Every finding cites an exact vault ID (for example F-12, R-04, R-09). A finding with no valid citation is never shown.
  • Advisory AI only. Google Gemini gives clearly labelled advisory suggestions, grounded in retrieved vault items and validated by a citation check. It never overrides the deterministic gate.
  • One-click fixes. Each finding carries a vault-approved replacement. Applying a fix rewrites the copy and creates a new version — the old version is never overwritten.
  • Approval workflow. The creator requests approval, a reviewer approves, creator self-approval is blocked, approval is disabled while findings are open, and the approved copy locks as an immutable snapshot. Editing a locked copy creates a fresh draft.
  • Multi-brand workspaces. Two fully isolated brands — Demo Brand (Seeded, 12 vault items) and NovaTech Audio (Demo, 5 vault items) — each with its own vault, drafts, and Insights. No cross-brand leakage.
  • DOCX/PDF extraction. Document drafts (max 10 MB, text-based only) go through the same gate as typed copy. Findings on multi-page PDFs carry Page badges. Scanned PDFs are not OCR'd, and that limit is stated on the page.
  • Insights v2. Per-brand aggregates from PostgreSQL: drafts evaluated, total flags, most-repeated citation, dominant violation type, trend by draft, fix-first guidance, and full distribution by citation ID.
  • Image governance. Palette sampling is labelled "Approximate" and produces Human Decision findings only, never Contradiction. Logo verification (A-02) is reviewer-confirmed only — no automatic logo detection is claimed. Alt text is enforced under R-09.
  • Guest Demo mode. The full judge path works with no sign-in: Try Demo Draft → Review Draft (1× F-12 + 2× R-04) → Apply Fix → Request Approval → Reviewer Approve → Locked Snapshot.

Try it: Live demo · Source code

How I built it

  • Frontend: React + TypeScript (Vite) + Tailwind CSS, deployed on Vercel.
  • Backend: Python FastAPI (Uvicorn + Pydantic v2), deployed on Render (free tier — the first call after idle can take 30–60 seconds, and the frontend shows "Waking up server…" while it retries).
  • Database & storage: Supabase PostgreSQL + pgvector (keyword-retrieval fallback active, embeddings unpopulated), Supabase Auth, and the public Storage bucket brandgate-creatives.
  • AI: Google Gemini via AI Studio, retrieval-only and citation-validated. The deployed model string is shown on the live Report panel, not hardcoded in docs.

Data flow: guest opens the live link → loads the demo draft → Submit sends text (or extracted document text) to FastAPI → the deterministic engine checks it against the active brand's vault only → Report shows cited findings → Apply Fix creates a new version → approval re-runs the deterministic review on the backend and locks the snapshot.

Challenges I faced

  • Image findings disappearing on re-review. An image uploaded on Submit did not propagate to a Report re-review, and a remove-then-reupload in the same session was lost. I made image/alt/removal state a single source of truth, made image/alt/removal changes create a new version even when body text is unchanged, and made Report re-review pass the full image state to the backend. The same session now gives exactly 1× R-09 + P-01 on an off-palette, blank-alt re-upload.
  • Cross-brand leakage in one display line. The Report palette line showed the other brand's colours while findings themselves were correctly scoped. I scoped the palette line to the active brand's vault only (NovaTech now shows only P-10/P-11).
  • A dishonest button. Report showed an "Apply Fix" button for missing alt text, but alt text cannot be set from Report — it silently did nothing. I replaced it with an honest navigation action: "Add alt text on Submit".
  • Free-tier cold starts. The Render backend sleeps when idle. Instead of hiding it, the frontend shows the wake-up state and retries automatically.

What I learned

  • A governance tool is only as trustworthy as its citations. If a check cannot point to a rule, it should stay silent — a false flag is worse than no flag.
  • The hardest bugs lived at the seams between pages (Submit → Report → Review), not inside one function. Testing the full journey, twice, with bad input and double-clicks, caught what unit-style checks missed.
  • Honest limitations score better than invented completeness. The product openly states what it does not do: no minimum-length rule, no OCR for scanned PDFs, no per-version image history, and mobile/zoom not verified.

What's next

In order: (1) per-version image history via a proper migration, (2) a version selector on Report, (3) a Supabase storage-domain allowlist for remote image fetch, (4) a minimum-content warning (warning only, not a new block), (5) an on-page explanation of the Insights trend average, (6) mobile 360px and 120% zoom verification, (7) visually distinct disabled Approve styling. The core rule stays unchanged: no citation, no flag.

Built With

Share this project:

Updates

Submission history