← Back to portfolio

Case study

Headless Digital Cookbook Commerce and Access Control Platform

The resulting platform delivers an optimized, secure storefront backed by event-driven serverless webhooks and automated cloud infrastructure.

Outcomes

  • Modular Headless Execution: Demonstrated AIKWARE’S ability to link disparate SaaS ecosystems (Wix eCommerce) with enterprise AWS cloud architectures and Next.js web applications.
  • Secure Access Control: Enforced multi-tier digital rights access control ensuring unauthenticated users browse public previews while recipe unlocks are strictly tied to authenticated payment verifications.
  • Production-Grade Infrastructure: Established streamlined development-to-production deployment cycles using Amplify sandboxes, secret isolation (ampx secret), reproducible infrastructure-as-code, and documented operator runbooks.

The situation

Black Baltimore Vegan wanted to add a digital cookbook as an extension to their existing Vegan Restaurant business. Vegan for The Root is a digital cookbook allowing customers to purchase and unlock modular digital assets. Assets include full cookbooks, individual chapters, or single recipes. Administrative users then have fine grained control over catalog items and customer access.

What we did

Cookie cutter platforms, such as Wix was unable to satisfy the granular access control, custom dynamic data modeling, and server-side rendering requirements needed for digital asset unlocks. AIKWARE engineered a modern headless architecture that decoupled the user experience and access control layer (Next.js 15 on AWS Amplify Gen 2) from payment processing (Wix Headless and hosted checkout). The resulting platform delivers an optimized, secure storefront backed by event-driven serverless webhooks and automated cloud infrastructure.

Headless commerce architecture for Vegan for the Root, showing the cookbook storefront on a laptop and chapter access on a phone

Client (Project): Vegan For The Root (Baltimore Black Vegan). Delivered by: AIKWARE LLC. Role: Full-Stack Cloud Architect and Principal Engineer.

Core technologies: Next.js (App Router, React 19), AWS Amplify Gen 2, AWS Cognito, AWS DynamoDB / Amplify Data, AWS Lambda, AWS S3, Wix Headless/ eCom API, Tailwind Css 4, Sharp.

Black Baltimore Vegan wanted to add a digital cookbook as an extension to their existing Vegan Restaurant business. Vegan for The Root is a digital cookbook allowing customers to purchase and unlock modular digital assets. Assets include full cookbooks, individual chapters, or single recipes. Administrative users then have fine grained control over catalog items and customer access.

Cookie cutter platforms, such as Wix was unable to satisfy the granular access control, custom dynamic data modeling, and server-side rendering requirements needed for digital asset unlocks. AIKWARE engineered a modern headless architecture that decoupled the user experience and access control layer (Next.js 15 on AWS Amplify Gen 2) from payment processing (Wix Headless and hosted checkout). The resulting platform delivers an optimized, secure storefront backed by event-driven serverless webhooks and automated cloud infrastructure.

Building an enterprise-ready headless architecture across separate hosting, data, and payment providers presented several engineering hurdles:

Decoupled Architecture vs. Access Control

Standard Wix setups could not support the required custom catalog modeling, Cognito-based role/access management, nor the custom Next.js SSR workflows. The platform required a seamless bridge between hosted payment gateways and custom entitlement state management.

System Architecture and Implementation

AIKWARE designed an end-to-end serverless and event-driven architecture using AWS Amplify Gen 2 code-first infrastructure paired with Next.js App Router:

AIKWARE system architecture for a headless e-commerce and event-driven digital rights platform. Layer 1 is the Next.js client: public storefront, customer dashboard, and admin portal. Layer 2 is AWS Amplify Gen 2: Cognito, Amplify Data, the media pipeline, and the entitlement engine. Layer 3 is Wix Headless checkout and payments, with an order-paid webhook that grants entitlements after payment.
Open the full-size architecture diagram.

Wix eCom and digital Fulfillment Constraints

Wix Catalog V3 requires physical file uploads for digital products to be added to cart. To maintain Amplify Data as the single source of truth for all digital content, items had to sync down to Wix as physical SKUs solely for checkout feasibility. Also, official SDK checkout pathways initially returned 404s. This required custom public REST API integrations.

Checkout Metadata and Identity Linking

Custom checkout fields could not carry user unlock metadata without exposing internal technical attributes on the public hosted checkout form. Pending purchase records had to be keyed directly to Wix checkout IDs then synced downstream.

Caching, Asset Performance and DNS Complexities

Admin catalog modifications risked stale content across the Full Route Cache and Amplify CDN. Raw signed S3 catalog media added overhead. Domain cutover required navigating DNS apex/subdomain routing conflicts between Wix and Amplify CloudFront distributions without ALIAS/ANAME support on the Wix platform.

High-Performance Frontend and SSR (Next.js 16 + React 19)

  • Built modular interfaces for the public storefront, customer unlock library, and administrative catalog management using Next.js App Router and Tailwind CSS 4.
  • Utilized Server Components, Server Actions, and Next.js middleware integrated with Amazon Cognito session management for role-based route protection (Admin vs. Customer vs. Guest).
  • Implemented tagged “use cache” public reads alongside path/tag revalidations triggered on catalog mutations to maintain strict cache consistency without stale content.

Cloud Infrastructure and Data Modeling (AWS Amplify Gen 2)

  • Defined code-first infrastructure via defineBackend, leveraging Amazon Cognito with custom authentication challenge Lambdas for email and Google sign-in workflows.
  • Modeled hierarchical data schemas (Book -> Chapter -> Recipe) with sync metadata and authorization rules in Amplify Data (AppSync / DynamoDB).
  • Maintained public catalog read permissions via IAM identity pools while restricting content unlocks to verified Cognito owner attributes (sub).

Headless Checkout and Event-Driven Fulfillment Pipeline

  • Catalog Synchronization: Authored Lambda workers that mirror catalog items to Wix Stores as physical SKUs to satisfy Wix checkout prerequisites while keeping core digital assets protected in Amplify Data and S3.
  • Stateful Checkout Handoff: Engineered a checkout flow orchestrating Wix visitor OAuth tokens, direct REST checkout generation, and redirect domain configurations.
  • Asynchronous Unlocks: Implemented secure Lambda Function URL webhooks listening for Wix order events. The handler validates paymentStatus === PAID, resolves the transaction against pending Purchase entities via checkout IDs. The handler then issues customer entitlements mapped to the authenticated Cognito user.

Media Optimization Pipeline

  • Created a dedicated image optimization route using Sharp.
  • Transforms private, signed S3 assets into responsive WebP formats on demand, adding edge/memory caching headers to cut latency and bandwidth costs.

Engineering Impact and Key Takeaways

  • Modular Headless Execution: Demonstrated AIKWARE’S ability to link disparate SaaS ecosystems (Wix eCommerce) with enterprise AWS cloud architectures and Next.js web applications.
  • Secure Access Control: Enforced multi-tier digital rights access control ensuring unauthenticated users browse public previews while recipe unlocks are strictly tied to authenticated payment verifications.
  • Production-Grade Infrastructure: Established streamlined development-to-production deployment cycles using Amplify sandboxes, secret isolation (ampx secret), reproducible infrastructure-as-code, and documented operator runbooks.

Cookie cutter platforms, such as Wix was unable to satisfy the granular access control, custom dynamic data modeling, and server-side rendering requirements needed for digital asset unlocks. We can discuss a headless architecture that decouples the user experience and access control layer from payment processing.