Skip to content

membranehq/unified-api-example

Repository files navigation

Unified API Example

A comprehensive example application demonstrating how to use Membrane to create a application that connects to multiple CRM, marketing, and business applications. This project showcases fetching, creating, updating, and deleting records across various integrations through a single, consistent interface.

📋 Prerequisites

Before you begin, ensure you have:

🛠️ Setup Instructions

1. Clone and Install Dependencies

git clone https://github.com/membranehq/unified-api-example.git
cd unified-api-example
pnpm install

2. Import the elements into your workspace

This example uses the following integration elements:

  • Data Sources: Pre-configured data models for Contacts, Companies, Users, Jobs, Job Applications, and other objects in our Universal Data Model
  • Integrations: These are third party apps like Hubspot, Salesforce, etc.
  • Actions: Entities that represent a simple request to an integration. e.g Create Contact, Update Contact, ...

They can be imported into your workspace using the Membrane CLI, to import the elements:

  1. Install the Membrane CLI
npm install -g @membranehq/cli
  1. Populate the config file with your workspace key and secret (This will open your browser to the workspace and get the workspace key and secret)
membrane init
  1. Push the elements into your workspace
membrane push

3. Configure Environment Variables

Create a .env.local file in the root directory with your workspace key and secret

# Integration.app Configuration
INTEGRATION_APP_WORKSPACE_KEY=your_workspace_key
INTEGRATION_APP_WORKSPACE_SECRET=your_workspace_secret

4. Configure Integrations

In your Membrane workspace:

  1. Navigate to your Integrations page
  2. For each integration you want to use, add the necessary credentials, some integrations like Hubspot use our Auth Proxy so providing adding credentials isn't required.

5. Start the Development Server

pnpm dev

Open http://localhost:3000 to view the application.

🔗 Links

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

Releases

No releases published

Packages

No packages published