Git Product home page Git Product logo

webhook-contentful-app's Introduction

Contentful App Tests Action Status

Webhook Contentful app

A Contentful App to trigger a custom webhook from the sidebar.

Screenshot of the Configuration Screen and the Webhook app in the sidebar

This project was bootstrapped with Create Contentful App.

Setup

The Contentful App Framework allows developers to extend the Contentful UI with custom functionality. You can install the app and use its hosted version without editing any code.

To install this app head over to your organization settings and create a new app.

Installation dialog

Define the application name you prefer and the following App URL: https://webhook-contentful-app.vercel.app.

While anyone is free to make use of the public app be aware that USAGE IS AT OWN RISK. The public version is tightly coupled to my use case and can change. There is no guarantee for backwards-compatibility.

It's recommended to fork the repository and deploy your own version.

This app supports the following locations in the Contentful UI:

  • (Required) App configuration screen (app-config) โ€“ configure and define webhooks that will be trigger from the sidebar
  • (Required) Entry sidebar (entry-sidebar) - trigger HTTP webhooks

Make sure to enable the App configuration screen to configure the application.

App configuration dialog

Install the app into your preferred space. Create and save a new webhook in it's app configuration.

Content type sidebar configuration dialog

Enter the content modelling section in your space and modify the sidebar configation of a content type to show the app in the sidebar.

Development

Prerequisites

The following dependencies should be installed:

Getting started

  1. Run the following commands in your console.
git clone [email protected]:yn5/webhook-contentful-app.git
cd webhook-contentful-app
npm ci
  1. Start the development server
npm run start

Creates or update your app definition in contentful, and runs the app in development mode on http://localhost:3000. Open your app to view it in the browser.

The page will reload if you make edits. You will also see any lint errors in the console.

  1. Generate the built app
npm run build

Creates a production bundle that you can host on various hosting platforms.

Styling

For styling @emotion/styled-components is used.

For positioning a component emotion's "Styling any component" functionality for extending styles is preferred in order to keep the DOM elements to a minimum:

import styled from '@emotion/styled';
import Menu from './menu';

const StyledMenu = styled(Menu)`
  top: 96px;
  left: 96px;
  margin-bottom: 16px;
`;

export default function Example() {
  return <StyledMenu />;
}

Committing

Husky is used to run the lint, format and test scripts before every commit and only allows the commit if all scripts pass successfully.

For commit messages, conventional commits is used.

The Git workflow is lightly based on Gitflow Workflow.

Please branch a new feature branch of the develop branch for every new feature with the following title: feature/name-of-the-new-feature.

All bugfixes should be developed inside a new bugfix/name-of-the-bug branch.

All (npm) dependency additions / installs and removals / uninstalls should be in a separate commit.

Please rebase your feature branch on the most recent version of develop in order to update your feature/ or bugfix/ branch with the latest develop and before creating a pull request.

Tests

Write tests. Not too many. Mostly integration.

Guillermo Rauch

For testing Jest, React Testing Library and jest-dom are used. The tests can be found in the src/__tests__/ folder. The filename of a test file should end with .spec.ts(x).

To run the tests:

npm run test

To run the test in watch mode:

npm run test:watch

Built with

Please review the documentation of these libraries before you start developing:

These are the most fundamental dependencies. For a complete list of dependencies see package.json

Learn More

Read more and check out the video on how to use the CLI.

Create Contentful App uses Create React App. You can learn more in the Create React App documentation and how to further customize your app.

License

MIT, see LICENSE for details.

webhook-contentful-app's People

Contributors

dependabot[bot] avatar yn5 avatar tailic avatar stefanjudis avatar

Stargazers

 avatar

Watchers

 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.