How tapcartinc/custom-block-templates works
Project type and purpose
• This repo is an open-source collection of front-end template “Custom Blocks” for the Tapcart platform. Each top-level folder is a self-contained HTML/JS/CSS snippet (and sometimes JSON sample data) that implements a specific UI or integration pattern for Tapcart mobile apps.
• The goal is to help developers quickly scaffold and customize reusable block components (e.g., accordions, carousels, payment badges) in the Tapcart Custom Blocks Editor.
File structure
• Top-level: dozens of folders named after individual block templates (e.g., “Accordion”, “Add To Cart Replacement”, “YouTube Video”). Every folder contains its own README.md plus the source files (index.html, scripts.js/index.js, styles.css, and occasionally variable-preview-values.json).
• Root also contains a global README.md explaining the repo’s purpose.
• No build scripts or backend code—this is purely front-end assets meant to be copy-pasted into the Tapcart Editor.
README for additional insights
• Custom Blocks are drag-and-drop UI components inside the Tapcart app builder.
• Developers pick a template folder, follow its README to import HTML/CSS/JS into the Tapcart Custom Blocks Editor, then OAuth-protected API calls deliver these blocks into a live mobile app.
• There is an implied flow: local template → Custom Blocks Editor → Tapcart CMS → published mobile app.
Capturing essential elements
• Break out each piece of the pipeline as its own component.
• Both the authoring (designer/developer) flow and the runtime (end-user) flow.
• Extensibility point: each folder = pluggable block.
• Don’t overcomplicate: keep external integrations as “optional” branches off the runtime path.