Front PageProjectsBlogAbout
Language

2024

PedroSauer.com: Corraling a Global Organization

E-commerce, Video Streaming Platform, Association and Payment Management - all in one?

PedroSauer.com: Corraling a Global Organization

Overview

The Pedro Sauer Brazilian Jiu-Jitsu Association is a global martial arts brand of over 150 sports academies world-wide, spanning 5 continents (North America, South America, Europe, Australia, Asia), missing only Africa and Antarctica.

PedroSauer.com is the main interface by which all the association business members pay their membership fees, and all the myriad practitioners, customers, and clients purchase merchadise, consume online content, and sign up for regular physical events planned yearly.

Goals and Motivation

Most Sports or Martial Arts brands do not leverage the best web tools for their business, but very few sports businesses have the legitimate business need and scale for reliable business systems that the Pedro Sauer Brazilian Jiu-Jitsu Association operates at.

Utilizing tools like WordPress and plugins can only take you so far, and paying for a variety of separate 3rd party services connected via webhooks and Zapier can get expensive fast.

The goal was to revamp the entire website with modern web tech and create long-lasting custom solutions that specifically address the challenges of managing hundreds of business-to-business as well as business-to-consumer transactions.

The Tech Stack Used

Leverage Shopify API for physical product sales, A Reliable and Performant Video Hosting service like Vimeo, Teachable, and Bunny.net, oAuth2 for Node.js, PostgreSQL, Stripe API, Resend API, Next.js, Express.js, and Docker to deliver all the various business needs.

PostgreSQL

Stores all franchisees as well as customer data, tracks and manages payment data, user authorization data, membership data, online content data. PostgreSQL is invaluable for this business's usecase because of relationships that existed between their clients and customers.

Express.js

Powers the back-end, written in Typescript, the biggest reason for using Express.js is mostly just for developer experience - Javascript/Typescript on the front and backends allow for ease of building. Node.js's main sales point being ideal for low processing, high traffic I/O operations is another reason that we found it ideal for this usecase.

Next.js

SEO is specifically a gigantic concern for this website's client/frontend, every page needs to be crawlable and we want maximum visiblity to the public and on social medias to increase the Association's membership.

Notable Problems We Solved

Video Data Migration

The Pedro Sauer Association has over 24 Terabytes of video footage amassed over 20 years since 1995. To make matters worse, the data was distributed in across a variety of 3rd party services and physical media.

The goal was to join all of the videos into a single organized library, and then implement a form of data replication with redundancies so that this valuable collection of video footage would be able to persist on the cloud.

To perform the hard work of the transfer, we leveraged the agentic AI tool, Claude Code, to design bash scripts that orchestrated API and CLI level access a variety of cloud video hosting solutions and physical drives which were plugged in locally.

The bash scripts were then designed to run on an ephemerally provisioned DigitalOcean Linux Ubuntu droplet (cheap and generally reliable) in order to leverage the lower latency, high bandwidth, and superior network infrastructure (in comparison to a local home computer).

The scripts implemented:

Duplicate detection:

  • Queried the Bunny.net API for existing videos by title/GUID before uploading
  • Checked a locally updated json file that tracked which files had already been processed
  • Reused existing Bunny video GUIDs to avoid creating duplicates when needing to resume uploads on discontinued files

Background execution:

  • nohup — standard Unix tool to detach the process from the terminal so it survives logout

Resumability:

  • Progress tracking JSON files — locally updated files tracked every uploaded file so the script could pick up where it left off after interruption
  • SIGTERM/SIGINT handlers — graceful shutdown that saved progress before exiting, so re-running the script would resume rather than restart

Database Normalization

Given the history of the company and the many years of accumulated data across a variety of 3rd party services, we knew that a relational SQL database would be absolutely necessary. The important part was to properly figure out the relationships and patterns of the data within the business processes and day-to-day operations that would dictate the design and normalization of the data.

Over the course of multiple face-to-face meetings, studying the various business workflows that created the sales events, and perusing through multiple sources of data, we were able to establish key customer bases, their relations to the data that the Pedro Sauer Association collected, and further identified the goals and desired outcomes of the processing and utilization of their data.

Leveraging PostgreSQL and sticking as best as we could to best practices for data normalization, we were able to create multiple database table relationships and a variety of new intermediary tables that further the longevity and future of the PSBJJA.

Explore more projects