XPANDA: affiliate links for influencers

The client

XPANDA is a startup formed after investigating influencers' affiliate marketing for a bachelor's thesis project. After the founders graduated with honors on their thesis, Luis Velarde (CEO and co-founder) and Arianna Smith (COO and co-founder) wanted to put the idea into reality, so they sought a tech partner to validate the feasibility.

Maor Roizman (current CTO and a very close friend of mine) reached out to analyze the project and make the respective planning. After validating that it is entirely possible to build a platform like that, we both started working on the project.

Project planning

The project planning was one of the challenging phases. Building a social-media-like platform that tracks if a sale was made (if it came through a specific influencer) is not a trivial task.

We identify three major "apps" in our project:

  • The influencer dashboard
  • Back office (for creating businesses and influencers)
  • Shopify service (for keeping a record of the purchases that came from a specific influencer)

Technologies used

We decided to have a Monorepo strategy. This allowed us to store our configurations in the same place and generalize the logic of our database with our apps. Turborepo was our way to go!

We decided to use MongoDB with Prisma (ORM) for our database. This stack combination allowed us to have a fast coding experience, and, thanks to Turborepo, we generalized the logic of the ORM and shared it between our projects.

Our influencer dashboard and back office were built using the Next.js framework, Mantine for the UI components, and Vercel for the deployment.

For the "Shopify service," we created a Lambda function on AWS that would get called every time a client purchase was made. Only if that purchase originated via an influencer. But how do we make this happen?

The heart of XPANDA

The key to making this happen is cookies! After the influencer generates a link to a specific product from a specific business, XPANDA will insert a URL Parameter with the influencer's username.

When the final client opens the link, the Shopify store will read the URL Parameter and create a cookie with the influencer information. And finally, when a purchase is made and Shopify detects a cookie, a request would be made to our AWS Lambda Function, and then the data will be persisted in the XPANDA database.

The workflow is clean but needs a lot of configuration between the actors. To make it happen, we create a specific javascript snippet that needs to be installed on the Shopify store.


You can check the project on the XPANDA web page: https://www.somosxpanda.com/

Influencer dashboard

You can also find our "test" XPANDER here: https://www.somosxpanda.com/@/velardesamanez.

Staff Backoffice

Unfortunately, there's no open access to our back office. The following screenshots walk us through the process of registering an influencer.