Giter VIP home page Giter VIP logo

gumroad-front-end's Introduction

This project is written in Vanilla JS using TypeScript. Webpack is used for bundling the JS files. "main.js" is a single JS file that is used in this project. This file will be generated once the project is built.

Steps to run this project

Step 1: Run `npm install`

Step 2: Run `npm run build`

Step 3: Run `npm run start``
    
Step 4: Open your browser and navigate to http://localhost:3000

Features supported

  • Build your own overlay and embed code
  • Supports custom subdomain for embed
  • Auto Payment Form
  • Reading data-attrs of the anchor tags

This project contains two HTML files:

  1. index.html file
  2. test-widgets.html file

In index.html file you can create an overlay or an embed element. A code will be generated for you depending on your selection - similar to Gumroad widgets.

You would then need to copy this code and paste it in test-widgets.html in order to integrate the overlay/embed functionality.

For the purpose of this project, I am using two Gumroad products

How it works?

In the src/public/classes folder, you'll find 4 classes that I created.

  1. Widgets Class - This is the parent class. Although, it just has a domain property, in future more properties & methods could be added.
  2. Build Class - This class deals entirely with constructing the overlay and the embed code.
  3. Overlay Class - This class deals with the creation of overlay iframe and communication b/w the website and the iframe.
  4. Embed Class - This class deals with the creation of the embed iframes.

The below diagram should help in understandng the flow and the architecture of the system:

Overlay Flow Chart

Embed Flow Chart

gumroad-front-end's People

Contributors

szohaib avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.