Ad Pattern Lab / Jev for marketers
Jev makes ad research
feel like cheating.
A pile of competitor ads is only useful if you can learn from it. This system labels their hooks, offers and creative patterns, puts the examples on a map, and helps you turn the research into a brief for your own product.
By Artem Novitckii · September 30, 2026 · Open-source beta + full setup
What you get
- The complete app on GitHub
- A no-key simulation you can record
- Free local OCR for uploaded ads
- Jev labels across seven dimensions
- Optional Apify + Fireworks or Groq
- Original outlines and brief review
01 / What does what
Collect. Classify. Find examples. Make something.
Bring public ad copy, source links, available dates and creative media.
Extract the words from images and sampled video frames locally. Fireworks or Groq can transcribe speech.
Label format, hook, angle, offer, proof, objection and CTA with explicit choices.
The app groups exact matching evidence, shows the age of active ads, and lets you inspect the original examples. A separate, optional writing model turns a reference pattern and your verified product facts into a brief. Jev reviews clarity, brand fit and claim support.
02 / Start without spending anything
Get the simulation running first.
- Install Node.js, version 22.9 or newer.
- Download the ZIP above and extract it. Open a terminal inside the folder containing
package.json. - Run these commands, then open http://127.0.0.1:5194.
npm ci
npm run setup
npm run doctor
npm startFor the light-mode demo above, open the recording link below. It needs no keys. The thumbnail wall, map and counters advance together: each tile crossing the scan edge counts once. Choose 20, 40 or 80 seconds in the controls. C restores controls, R restarts and Space pauses. The reference layout is wide; the other three variants also offer portrait framing. For actual imports and analysis, open http://127.0.0.1:5194.
http://127.0.0.1:5194/variations.html?variant=reference&clean=1&duration=20The timer is replay time. The starter uses generated artwork. The recording above draws from a local pool of 2,136 public creative images; its processed count follows the visible tiles, rather than the full pool size. Both use synthetic labels, ages and scores. It shows how the interface works, not how quickly a paid workflow will finish.
Full recording guide: controls, image packs and what the counters mean. The included MP4 is a 20-second preview. Screen-record the app to capture your own image pool or a different duration.
Fill the wall with a large public image pack
The starter includes 16 generated examples. For much more variety, install FFmpeg using the instructions below and run:
npm run demo:downloadThis downloads small public reference images from Swipefile into your local cache, with source links. It needs no Apify or AI keys. The examples include digital ads, print ads and other marketing creatives; they are not a verified current Meta campaign dataset. Reload the app after the command finishes.
You can also use your own image folder:
npm run demo:images -- /path/to/your/imagesThe app compresses thumbnails and removes exact file duplicates. It only renders the visible cards. The simulation still uses illustrative labels, graph positions, dates and scores. Use Import ads for actual classification.
Let your coding assistant handle the setup
Set up https://github.com/artemnovitckii/ad-pattern-lab locally. Read README.md, docs/SETUP.md and docs/PRIVACY.md. Run the no-key simulation at /variations.html?variant=reference, doctor, syntax checks and tests. Do not read or print secret values. Ask me to add keys to my local .env only when needed. Start with a five-ad import and tell me what you actually verified. Do not launch paid collection without my instruction.03 / Your first real analysis
Start with ads you can check yourself.
Choose Import ads. Paste ad copy, upload a JSON array, or upload images and videos. The repo includes a small fictional sample JSON so you can see the fields. For a real pilot, use five ads you can open and inspect.
- Jev
- Add a key from TypeSafe to
TYPESAFE_API_KEY. It classifies the words and supplied observations. - Local OCR
- Tesseract.js runs on your computer with no per-image API fee. First use downloads the English language model. Check its output on stylized or tiny text.
TYPESAFE_API_KEY=your_typesafe_key
TRANSCRIPTION_PROVIDER=fireworks
FIREWORKS_API_KEY=your_fireworks_key
PORT=5194For Groq, set TRANSCRIPTION_PROVIDER=groq and fill GROQ_API_KEY. Leave unused keys empty. Save the file and restart the server, then press Analyze / retry unfinished.
Install FFmpeg for video uploads
Both ffmpeg and ffprobe must be on PATH. Uploads support files up to 60 MB; videos must be 10 minutes or shorter. Four frames are sampled for OCR.
brew install ffmpegwinget install --id Gyan.FFmpeg --exactsudo apt update
sudo apt install ffmpegReopen the terminal after installation. Alternative installers: FFmpeg downloads.
JSON and pasted copy replace the current local batch. Uploads append. Export your work before importing another batch. Click a creative to inspect its source text, labels, errors and original link when available.
04 / Optional collection
Bring the Meta Ad Library into the same workflow.
Add your APIFY_TOKEN to .env, restart, and choose Meta collection. The connector uses this Apify Actor. It is implemented but has not had a paid live validation run.
- Paste public Facebook page or Ad Library URLs for a focused category.
- Start with 20 ads and a small Apify cap, such as $1. Check current Actor pricing in your account.
- Click Start paid collection and inspect the run in Apify Console.
- After collection, click Analyze collected ads separately. That is when the AI stages run.
The Apify cap does not cover Jev, speech or writing costs. Collection is a sample, not a promise to retrieve every ad. If a launch response is lost, check Apify Console and attach the existing run ID instead of starting a duplicate.
05 / Turn research into a test
Leave with a brief you can actually shoot.
- Filter a hook, format, angle or offer. Check the number of ads, distinct families and brands behind it.
- Open examples and study the mechanism: the opening problem, the evidence and the offer. Check weaker or different examples too.
- Open Your product → original briefs. Add your audience, real offer and facts you can support.
- Create up to six briefs. With no writer configured, these are editable outlines. Add a compatible text model for original drafts.
- Review the words and product claims, shoot an original version and measure results in your own ad account.
Enable the optional brief writer
LLM_BASE_URL=https://api.fireworks.ai/inference/v1
LLM_API_KEY=your_writer_provider_key
LLM_MODEL=your_available_text_model_idUse an available model that supports chat completions and JSON-object responses. The speech key does not automatically enable writing. Jev scores clarity, fit and claim support; these are rubric judgments, not sales probabilities.
Creative families use exact fingerprints, not visual similarity. Signed URLs and copy edits can split near-duplicates. Several ad IDs can also be placements or variants rather than independent tests. Use the map to find examples, then judge the evidence.
06 / Keep going when something fails
Check the stage that needs attention.
Missing key, 401, 403 or 429
Check the names in .env, save and restart. Doctor only checks whether keys are present. Check provider access, quota and billing. The app keeps completed records and cached results; retry unfinished records after fixing the issue.
Empty OCR, missing speech or unknown format
Inspect the original creative. Import better copy or an existing transcript. For speech, check FFmpeg and your selected provider. Supply factual visual notes if you need visual format labels. Unknown is a valid result when evidence is missing.
Where are the keys and data?
Keys stay in your local .env. Uploads, OCR and cached results stay in data/. Both are ignored by Git. Jev receives text and observations; the optional speech provider receives audio; the writer receives reference text and brand facts. This is a local app, not an authenticated hosted service. Do not expose the server publicly.
How much does it cost?
The simulation has no provider charges. Local OCR has no API fee. All other stages use your provider accounts. The displayed Jev estimate only covers known input-token usage, not the entire workflow or failed requests. Check actual provider billing before increasing your batch.
Start with the demo. Then bring five real ads.
The code, exact data schema, validation status and troubleshooting are maintained in the repository.
Get Ad Pattern Lab + the setup guide
Enter your email to unlock the code, setup steps and the rest of my resource library. You will also get my weekly email. Unsubscribe anytime.
Moshn / AI automation agency
Want AI automation built for your business?
Moshn builds AI systems around the tools your team already uses, from lead qualification and follow-ups to onboarding and reporting.
Book a call. Tell us what your team is doing manually, and we'll show you what can be automated.