Case study 03 / 09
Client project · 2026
Perfect Energy
Company and product website for Perfect Energy Drinks, a Kabul beverage maker, with a CMS-managed catalogue, a spam-resistant inquiry form and QR business cards for staff.
- Role
- Sole developer
- Stack
- Next.js
- React
- TypeScript
- Tailwind CSS
- Sanity
- Motion
- Zod
- Resend / SMTP
- Vitest

01
Overview
Perfect Energy Drinks is a Kabul beverage maker within Arabzada Group, producing carbonated drinks in cans and juices in Tetra Pak cartons. The website introduces the company, its products, manufacturing and distribution, and takes inquiries from distributors and wholesalers.
I built it with Next.js 16 and an embedded Sanity Studio, so the team can manage products and homepage campaigns themselves.
02
The brief
Distributors, wholesalers and partners need one place to see the product range and get in touch, and the company needs to update products and campaigns without a developer.
03
Role and scope
- Role
- Sole developer
- Scope
- Next.js build, Sanity content model and embedded Studio, inquiry email delivery, staff QR cards and technical SEO.
04
Main features
Product catalogue
A page for each drink, with its own social-preview image, managed in Sanity.
Editable homepage
Hero campaigns and featured products are edited in Sanity Studio at /studio and published straight away through webhook revalidation.
Inquiry form
Distribution, wholesale and export inquiries through a server action with validation, a honeypot, a timing check and per-IP rate limiting, delivered as a branded email.
Staff QR cards
Each employee gets a QR badge that opens a digital business card with a one-tap “save contact” vCard.
Company story
Sections on packaging formats, manufacturing, the distribution fleet, quality and partnerships.
Technical SEO
Sitemap, robots rules, structured data for the organization and products, and generated social-preview images.
05
How it’s built
Content with fallbacks
CMS queries are validated with Zod, and the site falls back to built-in content when Sanity is not configured, so no page renders empty.
Secure by default
A strict Content Security Policy (with a separate policy for the Studio), HSTS, and environment variables validated separately for server and browser.
Tested where it matters
13 Vitest suites cover the inquiry flow, spam and rate limiting, request-origin checks, structured data and metadata.
Integrations
- Sanity CMS with webhooks
- Resend or SMTP email
- QR code and vCard generation
- WhatsApp contact link
06
Screenshots

ScreenshotProducts page on the live site. Screenshot captured October 2026. 
ScreenshotHomepage on a phone. Screenshot captured October 2026.
07
Challenges and decisions
Stopping spam without a CAPTCHA
An origin check, a honeypot, a minimum fill time and per-IP rate limits filter automated submissions while the form stays simple for people.
Business cards that stay private
Card addresses use random IDs, are marked noindex and are blocked in robots rules, so staff details are not indexed by search engines.
08
What was delivered
- A live company and product website at perfect-energydrink.com, with an embedded CMS
- Inquiry handling by email, with spam protection
- Digital business cards with QR codes for staff
- Technical SEO and security headers, covered by unit tests
