Build Senja
YESreplaces $29/mosaves $348/yrback to the verdict
Testimonial collection you own: a public submit page, avatars resized safely on your server, a moderation queue where nothing goes public until you approve it, a wall page, and an embeddable widget that renders the wall into any site without an iframe. No third-party hosting a page about you.
Before step 1
Everything below is assumed from the first step. Tick each one when you actually have it, not when you plan to.
- installfree
Why Everything in this build runs on it: the server, the scripts, the tests.
Get it Download the LTS installer from nodejs.org, or install with your package manager (brew install node, or nvm install 22). Restart the terminal afterwards. open ↗
Verify
node --version prints v22 or higher - installfree
Why Every step below is a command you type or a file you edit.
Get it VS Code (code.visualstudio.com), Cursor or Zed. Open a folder for the project and use the editor's built-in terminal. open ↗
Verify
You can open a folder and run a command in its terminal - installfree
Why History for your code, and the way most hosts deploy.
Get it Install from git-scm.com or with your package manager, then run git init in the project folder once it exists. open ↗
Verify
git --version prints a version - have readyfree
Why Phase 5 is tested by rendering the widget on a different origin.
Get it Your existing site, or a blank HTML page served locally on another port.
- decidefree
Why For rate limiting without storing addresses.
Get it openssl rand -hex 32 into .env as IP_SALT.
- accountabout $5 a month
Why This needs one process running all the time with a public address. Uploaded avatars need disk that persists, and the widget needs an HTTPS origin.
Get it Hetzner Cloud (from about 4 EUR), DigitalOcean or Fly.io. Ubuntu 24.04, the smallest size. You need SSH access and a public IP. Only needed for the deploy phase; develop locally first. open ↗
- accountroughly $10 a year, or free on an existing domain
Why A public address you own, so links you share never break when a provider changes.
Get it Register at Cloudflare Registrar, Porkbun or Namecheap, or use a subdomain of one you already own. You add one DNS record in the deploy phase. open ↗
- installfree
Why Automatic HTTPS in front of the Node process. Without TLS the browser features this relies on (and your visitors' trust) do not work.
Get it On the VPS: follow the install steps at caddyserver.com/docs/install for Ubuntu. One Caddyfile with your domain and a reverse_proxy line is the whole config. open ↗
Verify
caddy version prints a version on the server
Data model
Create these before the first phase that stores anything. Changing a table later is the expensive kind of change.
- `testimonials`: id, name, role, company, avatar_path, rating (1-5), body, source_url, approved (bool, default false), created_at, approved_at, ip_hash - `approved` defaults to false and nothing untrusted is ever rendered publicly before a human flips it. Build the flag in Phase 1 even though the public wall arrives in Phase 4 · retrofitting moderation onto a live public page is how strangers' spam ends up on a customer's homepage.
Environment variables
These go in a .env file the app reads at startup. The pack's .env.example is this table as a file · copy it, never commit the filled-in version.
| Variable | Needed | Example | Where the value comes from |
|---|---|---|---|
PORT | required | 3000 | Any free port; Caddy proxies to it. |
DATABASE_PATH | required | ./data/testimonials.db | SQLite file. |
UPLOAD_DIR | required | ./data/avatars | Where resized avatars are written. Back this up with the database. |
MAX_UPLOAD_MB | optional | 5 | Reject files over this before reading them fully. |
SITE_URL | required | https://praise.yourdomain.com | Public base URL for the widget script and JSON endpoint. |
EMBED_ORIGINS | required | https://yoursite.com | Comma-separated origins allowed to load the widget data. |
IP_SALTsecret | required | hex-from-openssl-rand | openssl rand -hex 32, once. |
ADMIN_USER | required | admin | Any username for the basic-auth admin pages. |
ADMIN_PASSsecret | required | change-me-to-a-long-random-string | Generate one: openssl rand -base64 24. Never reuse a real password. |
The build, in order
Submission
Store submissions as unapproved, exactly as typed, escaped only on the way out.
testimonials (id, name, role, company, avatar_path, rating 1-5, body, source_url, approved default false, created_at, approved_at, ip_hash). Build the approved flag now even though the wall arrives in Phase 4.
Files
server.mjsdb.mjsterminalmkdir praise && cd praise && git init && npm init -y && npm pkg set type=module npm install sharp@0.35.3 mkdir -p data/avatars && cp .env.example .env
Name, role, company, rating, body. Cap body at 1500 characters, require rating 1-5, strip control characters. Store text as typed; escape at render time. Works with JavaScript disabled.
done when · tick each as it passeswatch out- Never sanitize on the way in. You will lose the ability to tell a real apostrophe from an attack. Escape on output, every time.
Avatars
Uploads that cannot hurt you: sniffed, resized, stripped, capped.
sharp(buffer).metadata() throws on non-images; reject anything that is not a real image regardless of extension or declared type.
sharp(...).resize(128, 128, { fit: 'cover' }).webp(). Write under a generated filename; never reuse the uploaded name.
Stop reading past MAX_UPLOAD_MB. sharp({ limitInputPixels }) so a decompression bomb cannot exhaust memory.
done when · tick each as it passesModeration
Approve, reject, un-approve, delete, with files cleaned up.
Pending list with approve, reject and delete; approved list with un-approve; a raw view per row.
done when · tick each as it passesPublic wall
Approved testimonials only, responsive, with a designed empty state.
Masonry grid of approved rows: avatar, name, role, company, stars, body. Lazy-load avatars. Mobile-first, dark mode.
done when · tick each as it passesEmbeddable widget
One script tag renders the wall into any page with no iframe and no style leaks.
Cache-Control with a short max-age.
Finds a target div, fetches the JSON, renders cards with every text escaped on injection. Scope styles with a unique class prefix. Inherit the host font.
done when · tick each as it passesAbuse controls and deploy
Spam turned away, backups covering both database and files, live.
Files
deploy/praise.serviceCaddyfileterminaltar czf /tmp/praise-$(date +%F).tgz data/
The embed snippet verbatim, the statement that nothing appears until approved, and the note that avatars live outside the database and must be backed up with it.
Files
README.md
done when · tick each as it passesOperate it like a productproduct builder
Only for the product path: get told about new submissions, keep the box safe, never lose an avatar.
SMTP credentials in .env (Fastmail, Postmark or any provider); fire-and-forget with a timeout so a mail outage never blocks a submission.
- terminal
rclone copy /tmp/praise-$(date +%F).tgz remote:praise-backups/
done when · tick each as it passes
That is the whole plan for Senja. What it deliberately does not cover is below · check the gaps before you call it a replacement.
- In-browser video testimonials: permissions, encoding, storage and playback are genuinely hard and a real reason their price exists.
- Importing reviews from G2, Capterra or Google.
- Their widget template gallery.
- video testimonial recording in-browser
- imported reviews from other platforms
- their widget templates gallery
- a hosted collection URL that isn't yours
- A per-project mode so one server collects for several sites
- Layout options (list, carousel) selected by a data attribute on the embed tag
Need the files? The project pack on the verdict page hands your agent the whole brief · more testimonials.