Topics:
cloudinaryhackathonnextjsci-cdmedia-processingquality-assurancetypescripttailwindcssdevtools
Build. Test. Repair. Release.
Media Compiler treats visual media like software artifacts. Teams define executable Media Contracts, compile source assets into production variants, run QA, repair safe failures, re-test, and release only verified artifacts.
- Define a versioned Media Contract (variants, technical/visual/policy/accessibility rules, severity, repair budget), or start from a preset.
- Upload a master asset (Cloudinary Upload Widget, direct file upload, or URL).
- Click Compile. Variants generate on Cloudinary; QA streams into a live build log.
- Failures explain themselves with measured actuals. Auto Repair re-derives the artifact and re-tests the full suite.
- Unrepairable cases go to human review with confidence shown.
- Release publishes Cloudinary delivery URLs plus a stored manifest. Compare versions, check regressions, roll back when needed.
Cloudinary is the media execution layer. Media Compiler is the lifecycle layer on top.
| Capability | Use | Status |
|---|---|---|
| Upload | Widget + signed API ingestion | Done |
| Transformations | Variant builds, smart-crop + q_auto/f_auto repairs |
Done |
| Metadata | Contract/build/release context on assets | Done |
| Delivery | Released artifact URLs | Done |
| AI visual analysis | Evaluation framework ready | Roadmap |
flowchart TB
U[User]
C[Media Contract]
S[Source Asset]
B[Build Engine]
CL[Cloudinary]
A[Artifacts]
Q[QA Engine]
D{Decision}
R[Repair Engine]
V[Re-test]
H[Human Review]
G[Release Gate]
L[Released Artifacts]
U --> C
U --> S
C --> B
S --> B
B --> CL
CL --> A
A --> Q
Q --> D
D -->|Pass| G
D -->|Repairable| R
R --> CL
R --> V
V --> Q
D -->|Unrepairable| H
H --> G
G --> L
Thin route handlers; all logic in src/lib/. Only cloudinary.ts knows SDK details. Release gate enforced server-side (409 on violation).
Live: https://media-compiler.onrender.com
3-minute take: contract, upload master, Compile, live log, open the 4:5 failure, why, Auto Repair, re-test, Release, Trace, live URL. Then poster-7.jpg for the review branch.
| Contract | Build detail |
|---|---|
![]() |
![]() |
| Dashboard | Release | Review queue |
|---|---|---|
![]() |
![]() |
![]() |
Measured values from a verified run (Diwali Campaign v3, 500 KB limit):
1:1 pass (190 KB)
4:5 fail (product cropped, 1.3 MB measured). Repair (smart crop, q_auto). Result: v2 pass (193 KB).
16:9 pass (296 KB)
Release: 3/3 passed, 0 unresolved blocking failures
Contracts (versioned, diff) · builds · measured technical QA · visual/policy/accessibility QA · severity + confidence review · bounded repair with explicit rejection · full re-test · regression gate · lineage v1 to v2 · release gate + history + rollback · Trace · review queue · Explain Build · CLI + GitHub Action. Roadmap: AI providers, video, batch, webhooks.
git clone https://github.com/zlynv/Media-Compiler.git
cd Media-Compiler
npm install
cp .env.example .env.local
npm run devOpen http://localhost:3000. Set Cloudinary keys in .env.local (see .env.example). Seeds load automatically.
| Variable | Client? |
|---|---|
CLOUDINARY_CLOUD_NAME, CLOUDINARY_API_KEY, CLOUDINARY_API_SECRET |
No, server only |
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME, NEXT_PUBLIC_CLOUDINARY_UPLOAD_PRESET |
Yes |
npm test # 31 passing
npm run build # clean
npm run lint # cleanImage-first MVP. Visual verdicts are deterministic contract evaluation (AI provider wiring is roadmap). File-backed store suits demo scale; Postgres is the documented next step. No compliance claims.
No vercel.json needed; default Node runtime. On serverless, builds run in-process and the JSON store is instance-local (seeds reload, so demos start identical). For guaranteed live builds use any stateful host with npm run build && npm start.
To be added on public release.





