Book a call
One specialist, on your team Hourly, part-time or dedicated monthly, with working-hour overlap for the US, UK and EU. Book a call →
15 roles across AI, web, marketing and security How hiring works →
Book a free call → Lahore, Pakistan · working with the US, UK and EU

WD Client project · SaaS web application

ClickIt: building a secure event photo-sharing platform from scratch

Built from scratch for a founder in Norway: a QR-code event photo-sharing platform where guests upload without an app or an account, with resellers, white-label, AI moderation and five languages, then hardened for launch.

Client
ClickIt.camera (Norway)
Industry
Events & weddings
Case study by
Muhammad Aqib Azhar
Published
  • Cloudflare R2
  • GitHub Actions
  • NestJS
  • Next.js
  • PostgreSQL
  • Prisma
  • Railway
  • Sentry
  • Sightengine
  • Stripe
  • TypeScript
  • Upstash Redis
  • UptimeRobot
  • Vercel
concurrent guest uploads load-tested clean
25–30
automated tests on auth, roles and payments
~90
added monthly cost for backups, monitoring and rate limiting
$0

The project

ClickIt.camera is a QR-code event photo-sharing platform built for a founder in Norway. At weddings, birthdays, corporate events, festivals and nightlife events, guests scan a QR code and upload photos and videos straight from their phone browser. There’s no app to install and no account to create. Everything lands in one shared digital album that the host can moderate, download and share long after the event ends. The first markets are Kosovo and Norway, but the platform had to support multiple countries, languages and currencies from day one.

The founder had sketched a first prototype himself, but it had never gone live, and he wanted the product built properly, from scratch. We started on 6 August 2026 with his written specification, which set a handful of rules that shaped everything that followed:

  • Guests never create an account. Only the people creating or managing an event need one.
  • Scan to uploaded in under 10 seconds, on a phone, at a venue, on whatever signal is available.
  • One permanent QR code per event. It must keep working even when the name, date or design changes.
  • No uploaded photo or video is ever lost, and nothing is marked as uploaded until it is actually stored.
  • Mobile first, multilingual, secure and simple enough for anyone, regardless of technical experience.

How we worked

The build ran from August to November 2026, entirely remotely between Lahore and Norway, over WhatsApp. From the second week the founder had a live staging link, so he could test every change on his own phone instead of waiting for a finished product. His feedback came as screenshots and screen recordings, more than 200 of them by the end, and we settled into a simple rhythm that kept a fast-moving project organized: he sent numbered lists of issues, and each item came back marked done, ready to check.

  1. Kick-off from a written specGuest upload flow first, then event management and QR code generation.
  2. First staging linkThe guest page and event dashboard live for testing on a real phone.
  3. Resellers and white-labelPartner dashboards, credits and branding, plus the first super-admin tools.
  4. Mobile polish, landing page and guidesResponsive fixes, a conversion-focused landing page, and written guides for every role.
  5. Languages, filters and collagesMultilingual interface, disposable-camera filters, Polaroid collages and the site content editor.
  6. Roles and sign-inClear Customer, Admin and Super Admin roles; Google and Apple sign-in built, ready to switch on.
  7. Pre-launch review and hardeningThe founder’s code review, an honest audit, and the production-readiness work described below.

Along the way we wrote a feature guide and separate guides for each role (Super Admin, Admin, Reseller, Organizer and Customer), so the founder and his future staff could understand every screen without a call.

What we built

Guests
Scan, shoot or pick, upload. Done.The camera opens straight from the event page, or guests choose photos they’ve already taken; the host decides whether gallery uploads are allowed or only live photos. Photos save to the phone’s camera roll, not a downloads folder, and can be shared in one tap.
The QR code
One code, three statesBefore the event it shows the invitation, during the upload window it opens the camera, and afterwards it becomes the album. Same code, same link, whatever the host changes.
Organizers
A guided event wizardEvent type, name, date and upload window, with suggested titles (“Celebrate Emma”), design templates with live preview, shareable invitations, and album privacy: public, private or password-protected, or hidden until a chosen date.
Moderation
The host’s gallery, the host’s rulesPhotos can appear instantly or wait for approval. Sightengine AI flags nudity, violence and gore and holds flagged uploads for review.
Memories
Filters and collagesDisposable-camera filters that are applied to the downloaded file, not just the preview, and Polaroid-style collages for one to six photos, with captions.
Resellers
Credits, referrals and white-labelPhotographers, planners and venues buy event credits at partner prices and resell them at their own price, or earn commission on referred sales. White-label partners show their own name, logo and colours, with ClickIt powering everything behind it.
Super Admin
Run the whole platformUsers, events, resellers, credits (including credits for cash sales), pricing, discount campaigns, premium templates and site content (images, FAQs, testimonials), with an activity log of who changed what.
Languages
Multilingual from day oneEnglish, Norwegian, Albanian, Bosnian and German at launch, with a structure that makes adding the next language a translation job, not a code change.

Decisions worth sharing

Flag and hold, don’t auto-delete

Discarding anything the AI flags sounds safe, until you picture a beach party or a pool event, where a strict model could quietly throw away half the night’s photos. So flagged uploads go to a review queue instead of the bin: the host stays in control, safe photos still appear instantly when auto-approval is on, and nothing is lost to a false positive.

Keep the reseller money flow simple at launch

Automatic split payouts between the platform and its partners are possible, but they add cost and compliance work before a single partner exists. The launch model is deliberately simple: partners buy credits at their own price and charge their customers however they like. Collecting payment on a partner’s behalf is built in but switched off, and the Super Admin can enable it per partner later.

Never use real guests’ photos to market the product

Showcasing photos from real events on the landing page would have been easy and convincing. But those are private moments from private events, and guests never agreed to appear in an advert. The landing page uses purpose-made imagery instead, and the testimonials section stays hidden until there are real customers to quote.

Roles that can’t lock the owner out

Customers manage only their own events. Admins can run day-to-day operations (organizers, events, moderation, packages) without touching money, other admins or site settings. Super Admins can do everything, and the system refuses to demote or delete the last Super Admin, so the owner can never accidentally lock himself out of his own platform.

Technology stack and rationale

Backend
NestJS (TypeScript), Prisma ORM, PostgreSQLA structured, dependency-injected framework keeps a growing domain (events, guests, payments, moderation, roles) organized into isolated modules instead of one sprawling codebase.
Frontend
Next.js 16, TypeScriptServer rendering for fast first loads on a guest’s phone at a venue with patchy signal, with the same type-safety discipline as the backend.
Storage
Cloudflare R2, direct-to-bucket presigned uploadsS3-compatible object storage with no egress fees, paired with an upload pattern that keeps large files off the API server entirely.
Payments
Stripe Checkout SessionsHandles PCI compliance and card data entirely off our servers; supports both direct event purchases and reseller commission splits.
Content safety
Sightengine AI moderationEvery guest upload is automatically screened for nudity, violence and gore before it is visible in a public gallery, with no manual review bottleneck.
Rate limiting
Upstash Redis (serverless, REST-based)Pay-per-request pricing with no server to provision or patch, right for a workload that is bursty around events rather than constant.
Observability
Sentry (errors), UptimeRobot (uptime)Both run on free tiers. Visibility into production health shouldn’t be the thing cut to save money, so it wasn’t.
CI/CD and hosting
GitHub Actions, Railway (API), Vercel (web)Every push to main is tested and auto-deployed; GitHub Actions also runs the nightly backup pipeline, reusing infrastructure already in place.

How an upload actually works

The first version did what most first versions do: the guest’s phone sent the file to the API, and the API forwarded it to storage. That works in testing, but with files of up to 200 MB it is the wrong shape at any real scale, because every guest’s multi-megabyte photo or video passes through a single server process twice, for no reason. Before launch it was rebuilt so the API only ever hands out a short-lived, single-use upload link; the actual file transfer happens directly between the guest’s phone and storage.

Guest’s phone NestJS API PostgreSQL Cloudflare R2 (photo storage) ① request upload URL ② presigned URL ④ confirms upload ⑤ records metadata ③ uploads the photo directly: never touches the API
The multi-megabyte file transfer (③) happens directly between the guest’s phone and Cloudflare R2. The API only ever issues a short-lived link and records a small confirmation; it never handles the file bytes themselves.

This single architectural choice is what makes 25–30 guests uploading simultaneously a non-event for the API server: it is issuing small JSON responses, not proxying megabytes of image data. Content moderation (Sightengine) and gallery updates then happen asynchronously once the confirmation lands, so a guest’s upload never waits on a moderation check to complete.

Access control and the reseller model

ClickIt isn’t single-tenant. It serves guests, event organizers, reseller partners who white-label and sell the platform, and platform administrators, each with a different scope of access. A role-based guard sits in front of every protected endpoint, backed by its own test suite, so a reseller can manage their own clients’ events without ever being able to reach another reseller’s data, and only platform admins can reach cross-tenant administrative tools.

The reseller model also drives the payments logic: when a reseller’s client pays for an event package, the order is split automatically between the platform fee and the reseller’s commission at checkout time, with no manual reconciliation and no spreadsheet.

The pre-launch review

Before launch, the founder (a solution architect himself) went through the code and asked the questions every serious launch needs answered. Do uploads go straight to storage? What happens if the moderation service is slow or down? Are there automated tests and backups? What happens when hundreds of guests upload at once?

We answered honestly, and not every answer was “yes”. Uploads still passed through the API server. Moderation ran inline, so a slow Sightengine response would hold up an upload. There was no CI and no meaningful test suite, no error or uptime monitoring (an outage had already gone unnoticed once until someone reported it), no confirmed automatic database backup, and a single server instance. The founder set the priorities and the constraint in one message:

“Keeping Clickit secure, stable, scalable and cost-efficient, without overengineering things or adding unnecessary monthly costs.”

The founder’s brief for the pre-launch work

That became the plan, in order: verified database backups, monitoring, direct uploads to storage, moderation in a background queue (files stay private until approved), automated tests and CI for the critical flows (sign-in, payments, credits, uploads), and finally a load test.

Engineering highlights

A production-readiness pass isn’t one feature; it’s a series of specific, real problems found and fixed. Here’s what that actually looked like, including the parts that didn’t go right the first time.

Catching a concurrency bug before a guest ever found it

Each event can cap how many photos a single guest uploads. Under concurrent requests (exactly what happens when someone double-taps “upload” on a slow connection, or opens the camera in two browser tabs) a check-then-create race condition could let a guest slip past that limit entirely.

Without a lock: a race Request A check: 4/5 create #5 Request B check: 4/5 create #6 Both read the same stale count; neither sees the other’s write in time. ✕ limit bypassed: 6 photos saved With an advisory lock: serialized Request A lock check + create unlock Request B waits, then checks ✓ limit correctly enforced
The fix scopes a PostgreSQL advisory lock to each guest, so only requests from the same guest ever wait on each other; every other guest uploads at full speed, unaffected.

Rather than reaching for new infrastructure (a distributed lock service, a queue), the fix used a lightweight PostgreSQL advisory lock keyed to the specific guest and event, wrapped around the existing check-then-create logic in a transaction. Zero new moving parts, zero added cost, and every guest except the one triggering the race is completely unaffected.

Simulating the actual wedding-day scenario

Rather than testing against an arbitrary number, the load test modelled the client’s real expected traffic: 25–30 guests uploading photos simultaneously, the worst-case pattern for a live event’s first hour, when excitement is highest and everyone reaches for their phone at once. The test ran against production-grade infrastructure with fully isolated, disposable test data (created, verified and cleaned up without touching a single real guest’s photos), confirming the system holds up before a real event ever depended on it.

Free, automated backups that prove themselves every night

The hosting plan in use didn’t include database backups, and upgrading to a tier that did wasn’t justified against the client’s “no unnecessary costs” mandate. The alternative: build it, for free, on infrastructure already being paid for.

Production DB backup.dump (pg_dump) R2 storage Throwaway DB (this run only) Verify row counts dumps uploads downloads & restores Runs automatically every night, and fails loudly if the restore ever doesn’t work
Most “we have backups” setups stop after the upload step. This one goes further: it proves the backup is actually usable by restoring it and checking real data comes back, every single night, inside one automated job at no added monthly cost.

Old backups beyond a two-week retention window are automatically deleted from storage, so the cost never grows unbounded either. The whole pipeline can also be triggered manually in seconds, which is useful right before a risky database migration.

Finding out about problems before customers report them

Sentry now captures every unhandled production error in real time, and UptimeRobot checks the API’s health every five minutes and alerts on downtime. Both run on free tiers: genuine visibility into production health without adding a line item to the monthly bill.

Stored now, moderated later

Moderation used to run inline: if Sightengine was slow, the guest waited; if it was down, the upload failed. Now every upload is stored first and moderation runs as a background job. A guest’s upload completes immediately, files stay private until they are approved, and a slow or unavailable moderation service delays approval instead of losing a photo.

Rate limiting, and the bug it took to prove it worked

Login, registration, password reset and guest upload endpoints are now rate-limited against brute-force and scripted abuse. Shipping this cleanly meant more than writing a guard class: verifying it under real traffic surfaced a genuinely subtle production bug.

The hosting platform sits in front of the app behind its own internal proxy layer, and, unexpectedly, the number of proxy hops wasn’t constant between requests. The “obvious” way to recover a client’s real IP address (trusting a fixed number of hops) kept landing on one of the platform’s own internal addresses instead of the guest’s, which silently scattered every client’s requests across different buckets and meant the rate limit never actually accumulated.

X-Forwarded-For header, as received by the app: 203.0.113.5 , 10.4.0.12 (changes next request) ✓ Fix: always read this entry directly Set once, by the first hop; never rewritten ✕ Bug: “trust N hops” counted from here Rotates every request, so the count never accumulates
Diagnosed with a temporary, removed-after-use debug endpoint rather than guesswork: the client’s real IP is stable as the header’s first entry, while the “trusted hop” approach landed on an address that changes every request.

The fix reads the first entry directly, regardless of how many hops the platform happens to add: correct under any proxy topology, not just the one observed during testing. It was verified against live production traffic (not just locally) before being signed off, including a separate credential issue caught along the way: a cloud database that had been silently auto-deleted after a long period of being unused, replaced and re-verified end to end.

Test coverage built from zero

Authentication, role-based permissions and payment logic, previously untested, now have comprehensive automated test coverage running in CI on every change: nearly 90 tests covering login, registration, OAuth flows, role enforcement, Stripe checkout, webhook signature verification and reseller commission math. The kind of safety net that turns “I think this still works” into “I know this still works”, on every single push.

Results

25–30
concurrent guest uploads load-tested clean
~90
automated tests added, from zero coverage
Nightly
backups, with automated restore verification
Real-time
error tracking and uptime alerting
$0
added monthly cost for backups, monitoring and rate limiting
5 min
uptime checks, with alerts on downtime
Before and after the production-readiness pass
AreaBeforeAfter
Per-guest upload limitBypassable under concurrent requestsEnforced correctly, even under a race
Database backupsNone (not included in hosting plan)Nightly, with automated restore proof
Error visibilityFound out from user reportsReal-time alerts via Sentry
Downtime detectionNoneChecked every 5 minutes via UptimeRobot
Brute-force and abuse protectionNone on public endpointsRate limited, verified in production
Test coverage on auth and paymentsNone~90 automated tests in CI

Where it stands

ClickIt is feature-complete and hardened, and is being prepared for launch on its own domain. The remaining steps are configuration rather than code: connecting the domain, switching Stripe to live payments, and adding the founder’s Google and Apple sign-in credentials, which the already-built social login is waiting for. Measured numbers from real events will be added here after launch.

Engineering philosophy

Every decision here was made against the same question: does this actually serve the product, or is it complexity for its own sake? That’s why the concurrency fix is a three-line database lock instead of a new queueing service. It’s why monitoring and rate limiting run on free tiers instead of a paid observability platform. It’s why backups reuse storage already being paid for instead of upgrading a hosting plan.

And it’s why nothing here was marked “done” on faith. The upload fix was tested against a genuine race condition, not just reasoned about. The backup pipeline proves itself by actually restoring data, not just by uploading a file. The rate limiter was checked against live production traffic, which is exactly what surfaced the proxy IP issue: a bug that would never have shown up in a local test, because it only existed under the hosting platform’s real network topology.

Good engineering isn’t about using the most sophisticated tool available. It’s about finding the smallest, most reliable fix for the actual problem in front of you, and proving it works under real conditions before calling it done.

Open the aperture

Ready for sharp?

Tell us what is blurry. You get a clear plan within 24 hours.