Skip to content

PolyXGO/api_data_builder_sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API Data Builder Sample — Perfex CRM Module

Companion sample module for Data Builder — Visual Reporting, REST API & GraphQL for Perfex CRM.

This module helps customers understand and integrate with the REST API and GraphQL endpoints provided by Data Builder through interactive, working demos inside your Perfex CRM admin panel.


✨ Features

🔌 REST API Demos

  • CRUD Operations — Full Create, Read, Update, Delete examples for any Data Builder resource
  • Resource Selector — Switch between resources (Projects, Staff, Payments, Invoices, Tasks, Clients, …) via dropdown
  • Pagination & Sorting — Demonstrates page, per_page, sort, fields query parameters
  • Live Response Viewer — See raw JSON responses, HTTP status codes, and timing
  • Auto-generated Sample Code — PHP code snippets generated for every request

📊 GraphQL Playground

  • Query Editor — Write and execute GraphQL queries with syntax highlighting
  • Quick Templates — One-click templates for Projects, Tasks, Staff, Invoices, and Ping queries
  • Mutation Templates — Pre-built Create Task, Create Staff, and Delete Invoice mutations
  • Variables Support — Pass JSON variables to parameterized queries
  • Result Table — Structured data display with column headers extracted from response
  • Raw Response — Full JSON response viewer for debugging
  • Sample Code Generator — Auto-generates PHP integration code for every executed query

🔔 Webhooks

  • Event Listener — Demonstrates how to receive and process Data Builder webhook events
  • Payload Inspector — View the exact JSON payload structure for table.create, table.update, table.delete events
  • Integration Guide — Ready-to-use templates for connecting webhooks to third-party services

⚙️ Settings & Connection

  • API Configuration — Manage API Base URL, Token, and HMAC Secret from a settings panel
  • Connection Test — One-click connectivity verification with status indicator
  • Admin Session Bypass — Toggle for development environments to simplify testing

🛡️ Security

  • HMAC Signature Support — Full HMAC-SHA256 request signing implementation
  • Client-Side Fetch — All API calls use browser-side fetch() with proper CORS headers, avoiding server-side cURL loopback deadlocks
  • Robust Error Handling — Graceful handling of non-JSON responses (HTML error pages) with clear diagnostic messages

📋 Requirements

  • Perfex CRM 3.0.0 or later
  • Data Builder module v2.0.0+ installed and activated
  • A valid API Token created in Data Builder → API Tokens

🚀 Installation

  1. Download this repository as a ZIP file (or git clone)
  2. Extract the api_data_builder_sample folder into your Perfex CRM modules/ directory:
    modules/
    └── api_data_builder_sample/
        ├── api_data_builder_sample.php
        ├── controllers/
        ├── helpers/
        ├── views/
        ├── install.php
        └── README.md
    
  3. Go to Admin → Setup → Modules
  4. Find "API Data Builder Sample" and click Activate
  5. Navigate to API Samples → Settings in the sidebar
  6. Enter your API Base URL, API Token, and (optionally) HMAC Secret
  7. Click Test Connection to verify

📁 Module Structure

api_data_builder_sample/
├── api_data_builder_sample.php   # Module registration & sidebar menu
├── install.php                    # Activation hook
├── controllers/
│   └── Api_data_builder_sample.php  # Admin controller (dashboard, rest, graphql, webhooks, settings)
├── helpers/
│   └── api_data_builder_sample_helper.php
├── views/admin/
│   ├── dashboard.php              # Connection status & overview
│   ├── rest.php                   # REST API interactive demos
│   ├── graphql.php                # GraphQL playground
│   ├── webhooks.php               # Webhook listener demos
│   └── settings.php               # API connection settings
├── .gitignore
└── README.md

🔗 Related Links

  • Data Builder ModuleView on CodeCanyon
  • Public API Documentation — Available at https://your-domain.com/api_docs (generated by Data Builder)
  • AuthorPolyXGO

📄 License

This sample module is provided free of charge as a companion to the Data Builder module. It is intended for educational and integration reference purposes.

MIT License — feel free to modify and adapt for your own projects.

About

This module helps customers understand and integrate with the REST API and GraphQL endpoints provided by Data Builder through interactive, working demos inside your Perfex CRM admin panel.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages