Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
npm install @friggframework/api-module-hubspot
in the backend
Default display override by adding to ConfigManager
Override or add helper functions by creating a HubSpotManager.js in /managers/entities
Copy over ExampleIntegrationManager.js and corresponding test file
Good to go!
Aloha! Let’s test out running Frigg locally by cloning and installing a quick start template app.
You'll need to do the following before continuing:
Make sure you have node and npm installed
Create a free hosted MongoDB cluster through MongoDB Atlas OR install MongoDB locally
You'll need to create a db admin user and you'll want your connection string.
Create Frigg App will generate a Frigg application that within a few minutes is deployable to your own infrastructure accounts. Let's get Create Frigg App going and unpack the "magic" as we go.
Running npm start
at the root of your Frigg application repo will run npm start
on both the /backend
and /frontend
directories. Let's unpack each.
The frontend is a cookie cutter React application built with Create React App and Tailwind CSS and Tailwind UI. It leverages the Frigg React component library for the Integration Management page. This is the core piece to pay attention to for your own application. You can read more about Frontend options and concepts with Frigg here.
We provide a very lightweight/basic user login flow and dashboard. Go ahead and try logging in or creating an account.
// Image of login screen
Note that when you attempt to log in, you will receive an error. We'll come back to this in a moment, but the TL;DR is that we need to plug in a database for the backend to talk to.
The backend is oriented around the serverless.com framework. When you run npm start
, it runs the command to use the serverless-offline plugin. Critical to note is that this supports basic functionality (API => function invocation, or schedule => function invocation), it does not support all events that you may be relying on to power your integrations. In other words, you can run Authentication and Configuration, but the entirety of your Frigg applications' backend will not run using this command. For that, see "Running Frigg Locally."
The Backend is comprised of the following folder structure:
As you might have noticed, you use both a serverless instance and a client side react app to access the Frigg API modules. The flow looks like this:
Deeper dive into What Makes an Integration
Reach out to Left Hook or the community for help!
Add your own API Module
Integrate Frigg into your existing stack
Customize the authentication
Add more complexity to your integration
Think in categories
Use npx
to use the latest generator code, and just pass it whatever you want to name your Frigg application.
Note on naming: we recommend thinking of your Frigg app as a microservice that powers integrations; naming it something like "my-app-integrations" is a good fit
Congrats! You've just successfully scaffolded and installed your Frigg application.
You will have to set up your own config files for the frontend of your application with:
Currently, configuration is managed in two places for the backend. You can see the backend configuration here: backend/src/configs/*.json
but you will also need a .env
file in /backend
.
Let's spin it up to explore more:
Your browser should open to http://localhost:3000
, and the backend should spin up an API route at http://localhost:3001/dev/api
HubSpotIntegrationManager.js
getExample
function, add
Go to HubSpot, sign up for a developer account
Create an Application
Navigate to Settings
OAuth
Copy Client ID and Secret into /config/dev.json
under HUBSPOT_CLIENT_ID
and HUBSPOT_CLIENT_SECRET
respectively
Add http://localhost:3000/redirect/hubspot
to the redirect URI
Navigate to backend, run npm start
Go to the dashboard and reload if you haven't yet. Tada! Your first integration
Mocks
proxyquire
If you're using queues...
Local Development vs. Contributing
Local Development
Private API Modules
IntegrationManager (logic)
Events and workflows
Sync logic
UI customizations
Contributing
Publishing API Modules
Adding to Core
Bigger feature development
Suggestions
Copy template
Every Modules needs
API Class
Manager Class
standard config
Entity model
Credential model
For any OAuth app, you'll need to create your own set of OAuth credentials to store in the ENVs of your Frigg deployment
Core is great, can't do anything without Modules
Effectively SDKs that talk to Frigg
Over time, more templated code and normalization and static definitions
Frigg's backend needs to authenticate requests
Frigg also needs to identify the user
Frigg also needs to be authenticated to your API
Frigg has a fairly straightforward data model
Currently we connect to a MongoDB cluster using Mongoose. Recommendation is MongoDB Atlas, fast and free to spin up a test cluster.
Follow instructions to create
Copy and paste yours to the config/dev.json
file
Simply put- Frigg is what you would build into your product if you had unlimited resources and time, with the added benefit of being Open Source, where it's not just you but a community of developers collaborating to solve the same core set of problems over and over again. Something you could never do internally.
The Frigg Framework is an opinionated integration framework built with modern software development teams in mind. The aim of the framework is to have you up and running out of the box with a flexible set of tools to help rapidly add integrations to your software that your end users can manage individually without any intervention.
The framework handles integration listing, authentication, and configuration "out of the box," built on a scalable serverless architecture with a growing library of prebuilt API Modules to greatly reduce time to wow. Along with the core "out of the box" features, the framework contains primitives to help address and flex to any use case.
We've got a lot to unpack! These docs should be your go-to resource for all things Frigg related. Over time, there will doubtless be other properties and places (courses?) where you'll get more deep dives into topics and example implementations (and we expect example implementations contributed by the community?), but for now, this is the place.
In general, there are five main areas of the docs
^ Here you'll find Quick Start tutorials and examples, along with deeper dive documentation on how to develop integrations with Frigg.
^ This is the main area where you'll find documentation around all Frigg concepts
^ Here's where we lay out how to get involved in contributing to the Frigg core project. And oh boy are we glad to have you!
^ Ah, the ever-expanding documentation section! At some point when we've reached critical mass (read: 1,000+ API Modules), "we're going to need a bigger boat". But for now, basic docs around any specific module live here.
^ Yup, we all need support sometimes. When it comes to Frigg-related support, you've got a few options. Hit us up in those places! Or in person. Novel concept these days.
^ This is probably both the most exciting and most daunting part of the whole enterprise. So much possibility! We're using an external tool for now, so we're just linking out to there and giving a high level short-medium-long term road map on which you can anchor your expectations. Or if you want to sponsor pieces of the roadmap, you can greatly change its shape.
See CONTRIBUTING.md for details about getting started as a Frigg contributor.
When you work on code in this repo, make sure you are using Node 14.x and Npm 7.20.2. Npm > 7 is needed to use npm workspaces, but there is a bug using workspaces in certain situations on Npm > 7.20.2. See here for more info: https://github.com/npm/cli/issues/3637
There are different ways to switch versions of Node/NPM, here is one:
Make sure n is installed
The easiest way is npm install -g n
.
You may prefer to install n with Homebrew: brew install n
More info: https://github.com/tj/n#installation
Run npm run use:engine
in the root directory. This is a shortcut for n install 14 && npm install -g npm@7.20.2
. However, when you use npm run use:engine
, the version numbers are automatically read from the root package.json's "engines" key.
The first time you set up the monorepo, run npm install
in the root directory. This will automatically link up all the workspaces in the monorepo so that each is depending on the local copies.
In the case where you want to link a package from the monorepo into a package from another repo for local development, npm link
is still needed. This is only needed when editing packages locally, that aren't all in the same monorepo. See here for more info: https://docs.npmjs.com/cli/v8/commands/npm-link#workspace-usage
If the monorepo is in a directory called frigg, and we want to use the local copy of the logs module in project B while we develop:
Now, the local copy of the logs package is linked into project B's node_modules directory. Any local edits to the logs package will be immeidately available to your local copy of project B
https://docs.npmjs.com/cli/v7/using-npm/workspaces
To test all workspaces, you can run npm run test:all
in the root directory. This will be useful for local development, but won't catch everything in CI (specifically missing npm modules in a package).
You can run a command in all workspaces like so: npm run lint:fix --workspaces
You can run a command in just one workspace, for example: npm test --workspace=logs
To create a new workspace: npm init --workspace=new-package
A good rule of thumb is to name the package based on what it provides. This can help avoid a lot of "utils" packages. Obviously nothing wrong with "utils", "tools," or "helpers" packages per se, but it is often an indication the code can be organized more modularly.
Be sure each package has:
a README.md (which is displayed on npmjs.com).
a LICENSE.md file (make sure the attribution and date are correct)
a package.json file with repository, description, correct license, and other important fields filled in
When fixing a bug or making small tweaks use npm version patch
When adding a feature that doesn't alter the public interface to existing features, use npm version minor
When making a change that alters the public interface use npm version major
.
After merging or rebasing a branch into main:
72 hours are given to unpublish a version without complications: https://docs.npmjs.com/policies/unpublish
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our community include:
Demonstrating empathy and kindness toward other people
Being respectful of differing opinions, viewpoints, and experiences
Giving and gracefully accepting constructive feedback
Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
Focusing on what is best not just for us as individuals, but for the overall community
Examples of unacceptable behavior include:
The use of sexualized language or imagery, and sexual attention or advances of any kind
Trolling, insulting or derogatory comments, and personal or political attacks
Public or private harassment
Publishing others' private information, such as a physical or email address, without their explicit permission
Other conduct which could reasonably be considered inappropriate in a professional setting
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT METHOD]. All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
Community Impact: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
Consequence: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
Community Impact: A violation through a single incident or series of actions.
Consequence: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
Community Impact: A serious violation of community standards, including sustained inappropriate behavior.
Consequence: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
Community Impact: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
Consequence: A permanent ban from any sort of public interaction within the community.
This Code of Conduct is adapted from the Contributor Covenant, version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.
Community Impact Guidelines were inspired by Mozilla's code of conduct enforcement ladder.
For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
View and search for all our available API Modules in our interactive library. Thanks to our friends at PartnerPage for their directory tool.
Each API Module has its own page in this documentation. Over time we'll add helpful notes about each module listed.
API Modules are the Lego bricks that make Frigg-powered integrations develop faster. An API Module is the code that wraps your target partner's API and represents that API back to Frigg.
Frigg's library of API Modules is available for free. Translation: if your target partner's logo is in this library already, Frigg just saved your developers many hours of work, becuse these API Modules are plug n' play.
See the full library with categories and filtering.
Frigg is available both as an and on .
Frigg leverages (and requires) the , which means it can run on many different cloud services including:\
Note that Frigg's creators () sell professional services to help SaaS leaders implement Frigg, add features, and customize Frigg to your specific needs. Visit to connect and discuss your needs.
Frigg was created by developers at , who uses Frigg to build integrations for many SaaS leaders. Left Hook provides both consulting and contract development services to help SaaS leaders plan, execute, and maintain their Frigg-powered integrations. Contact for more information.
You should read our .
Any time you want to use Frigg/have Frigg talk to your own App/API, you'll need your own API module.
See the API Module Development section
Frigg comes out of the box with an Integration Management API
See flow
See postman collection/fork for your own
Backend
Frontend
Database
Eventing
Polling Triggers
Webhooks
Queues
Scheduled Tasks
User Interaction (API Route)
Other
Logging
Retry
Error Handling
Scoping/understanding the integration use case
Integration Lifecycle Methods
Create
Get Config Options
Update
ReceiveNotification
Delete
Eventing
Webhooks
User interaction
Polling
Simple
Complex
Scheduled
Tying it all together
Versioning
Migrating users
Scaling
Long-running processes
Syncs
Extending UI options
Hybrid Integrations
We've got a dedicated roadmap tool to help you track specifics, and to let you make suggestions. Wherever you're comfortable, since it's integrated to GitHub.
At a very high level, however, here's what we want to accomplish in the near, mid, and long terms:
This is in the next 3-6 months, heading into 2023.
Rapidly add more API Modules
Add unit tests to all core modules to harden them up for future iteration
Simplify the install process
Add more documentation
Add notes for deploying using popular services
In the next 6-12 months, through 2023
Add support for major databases
Postgres
Redis
MySQL ?
DynamoDB
Add support for all major cloud providers
Google Cloud
Microsoft Azure
Add CLI for rapidly adding integrations
Add robust versioning system
Analytics and Management API and corresponding code
Sometime in the future, end state goal
Make Frigg easily deployable with docker/kubernetes if desired
Support multiple languages for runtime
Optimize the primitives so Frigg is the fastest possible service
We have three ways to interact with Frigg's creators and community:
Message Board —
Slack Channel-
Use the "Chat with Us" Widget in the lower-right-hand corner of this website
Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
All new code requires tests to ensure against regressions
We have an active shared Slack channel where Frigg community members can ask questions or interact.
You can send yourself an invitation here.
Frigg's creators (Left Hook) are sometimes available for a live chat to discuss Frigg. Look for the HelperBot in the lower right-hand corner and click to chat!
Postman Collection