Skip to content

Commit

Permalink
Restructuring the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tsutomi committed Oct 28, 2023
1 parent ec45663 commit d094267
Show file tree
Hide file tree
Showing 23 changed files with 64 additions and 165 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/manual-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ jobs:
run: dotnet pack --configuration Release --no-restore --no-build --include-symbols -p:PackageVersion=${{ inputs.version }} --output ./nuget

- name: Push Packages to GitHub NuGet
run: dotnet nuget push ./nuget/**/*.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
run: dotnet nuget push ./nuget/**/*.nupkg --skip-duplicate --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ The libraries currently provided by the framework are the following:
| **Deveel.Webhooks.Sender** | [![Nuget](https://img.shields.io/nuget/v/Deveel.Webhooks.Sender?label=latest&logo=nuget)](https://www.nuget.org/packages/Deveel.Webhooks.Sender) | [![GitHub](https://img.shields.io/static/v1?label=GitHub&message=preview&color=yellow&logo=github)](https://github.com/deveel/deveel.webhooks/pkgs/nuget/Deveel.Webhooks.Sender) |
| **Deveel.Webhooks.Service** | [![Nuget](https://img.shields.io/nuget/v/Deveel.Webhooks.Service?label=NuGet&logo=nuget)](https://www.nuget.org/packages/Deveel.Webhooks.Service) | [![GitHub](https://img.shields.io/static/v1?label=NuGet&message=preview&color=yellow&logo=github)](https://github.com/deveel/deveel.webhooks/pkgs/nuget/Deveel.Webhooks.Service) |
| **Deveel.Webhooks.MongoDb** | [![Nuget](https://img.shields.io/nuget/v/Deveel.Webhooks.MongoDb?label=NuGet&logo=nuget)](https://www.nuget.org/packages/Deveel.Webhooks.MongoDb) | [![GitHub](https://img.shields.io/static/v1?label=GitHub&message=preview&color=yellow&logo=github)](https://github.com/deveel/deveel.webhooks/pkgs/nuget/Deveel.Webhooks.MongoDb) |
| **Deveel.Webhooks.EntityFramework** | [![Nuget](https://img.shields.io/nuget/v/Deveel.Webhooks.EntityFramework?label=NuGet&logo=nuget)](https://www.nuget.org/packages/Deveel.Webhooks.EntityFramework) | [![GitHub](https://img.shields.io/static/v1?label=GitHub&message=preview&color=yellow&logo=github)](https://github.com/deveel/deveel.webhooks/pkgs/nuget/Deveel.Webhooks.EntityFramework) |
| **Deveel.Webhooks.DynamicLinq** | [![Nuget](https://img.shields.io/nuget/v/Deveel.Webhooks.DynamicLinq?label=NuGet&logo=nuget)](https://www.nuget.org/packages/Deveel.Webhooks.DynamicLinq) | [![GitHub](https://img.shields.io/static/v1?label=GitHub&message=preview&color=yellow&logo=github)](https://github.com/deveel/deveel.webhooks/pkgs/nuget/Deveel.Webhooks.DynamicLinq) |
| **Deveel.Webhooks.Receiver.AspNetCore** | [![Nuget](https://img.shields.io/nuget/v/Deveel.Webhooks.Receiver.AspNetCore?label=NuGet&logo=nuget)](https://www.nuget.org/packages/Deveel.Webhooks.Receiver.AspNetCore) | [![GitHub](https://img.shields.io/static/v1?label=GitHub&message=preview&color=yellow&logo=github)](https://github.com/deveel/deveel.webhooks/pkgs/nuget/Deveel.Webhooks.Receiver.AspNetCore) |

Expand All @@ -54,11 +55,11 @@ While working on a .NET Core 3.1/.NET 5 _PaaS_ (_Platform-as-a-Service_) project
* Microsoft's _experimental_ projects never implemented any capability of handling subscriptions, and eventually removing also the _sender_ capability, focusing exclusively on _receivers_
* Alternative implementations providing similar capabilities are embedded and organic part of larger frameworks (like [ASP.NET Boilerplate](https://github.com/aspnetboilerplate/aspnetboilerplate)), that would have forced me to adopt the the entirety of such frameworks, beyond my design intentions

## Usage Documentation
## Documentation

We would like to help you getting started with this framework and to eventually extend it: please refer to the **[Documentation](docs/README.md)** section that we have produced for you.
We would like to help you getting started with this framework and to eventually extend it: please refer to the **[Documentation](docs/README.md)** section, or to the **[Gitbook](https://deveel.gitbook.io/webhooks)** website that we have produced for you.

The easiest way to get started is to follow the **[Quick Start](docs/QUICKSTART.md)** guide, but you can also refer to the **[Frequently Asked Questions](docs/FAQS.md)** section to get answers to the most common questions.
The easiest way to get started is to follow the **[Getting Started](docs/getting-started/README.md)** guide, but you can also refer to the **[Frequently Asked Questions](docs/FAQS.md)** section to get answers to the most common questions.

## Simple Usage Example

Expand Down
71 changes: 14 additions & 57 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,23 @@
<!--
Copyright 2022-2023 Deveel
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

# Deveel Webhooks Documentation

Here you can find a documentation of the `Deveel Webhooks` framework, to help you getting started with the libraries and functions that compose it and to understand how it works.

## Introduction

## Basic Concepts

To set the domain model of the framework, we need to introduce some basic concepts that are used in the framework.

| Topic | Description |
| ---------------------------------------------------- | ------------------------------------------ |
| **[Webhook](concept_webhook.md)** | What is it a 'Webhook' and why I need it? |
| **[Subscriptions](concept_webhook_subscription.md)** | How does a subscription to an event works? |
| **[Senders](concept_webhook_sender.md)** | What is a sender of webooks? |
| **[Receivers](concept_webhook_receiver.md)** | What is a receiver of webooks? |
| **[Notifications](concept_webhook_notification.md)** | What is a notification of events? |

## Basic Usage

The following tutorials will guide you through the basic usage of the framework, showing how to use the different components to send, receive and manage webhooks.

| Topic | Description |
| ------------------------------------ ------------------- | --------------------------------------------------------------------- |
| **[Getting Started](getting_started.md)** | Getting started with `Deveel Webhooks` |
| **[Sending Webhooks](basic_usage_send.md)** | Manually sending webhooks (no subscriptions) |
| **[Subscription Management](basic_usage_management.md)** | Manage subscriptions to events (no sending) |
| **[Notify Webhooks](basic_usage_notify.md)** | Notify webhooks subscribers (management, transformations and sending) |
| **[Receiving Webhooks](basic_usage_receive.md)** | Receive webhooks from external sources |

## Advanced Usage

A more advanced usage of the framework is possible by implementing custom components that can be used to extend the framework functionalities.
The framework is composed by a set of libraries that can be used, at different degrees, to implement a system that allows applications to send and receive webhooks.

| Topic | Description |
| ----------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| **[Filtering Subscriptions](advanced_usage_filters.md)** | Allow subscribers to filter webhooks on dynamic parameters |
| **[Custom Data Factories](advanced_usage_custom_datafactory.md)** | Implement a component that transforms event data |
| **[Custom Receivers](advanced_usage_custom_receiver.md)** | Implement parsers for receiving webhooks |
| **[Using MongoDB Data Layers](advanced_usage_mongodb.md)** | Use the MongoDB data layer for the persistence of the webhook information model |
| **[Using Entity Framework Data Layers](advanced_usage_ef.md)** | Use the Entity Framework data layer for the persistence of the webhook information model |
* **Sending Webhooks** - Using libraries of the framework you can send webhooks to receivers, based on your own logic and rules.
* **Receiving Webhooks** - The framework provides a set libraries implementing the capabilities for receiving webhooks from senders, reacting to events from external systems (such as Twilio, SendGrid, Facebook, etc.).
* **Notifications** - The framework provides a set of libraries that can be used to manage subscriptions to events, notify subscribing applications of events occurred in your system.

## Receivers
---

The framework provides a set of libraries that can be used to receive webhooks from external sources.
Read more about this framework:

| Receiver | Description |
| ------------------------------------ | -------------------------------------------------- |
| **[Facebook](facebook_receiver.md)** | Receive webhooks from Facebook Messenger |
| **[SendGrid](sendgrid_receiver.md)** | Receive webhooks and emails from SendGrid |
| **[Twilio](twilio_receiver.md)** | Receive webhooks and SMS/WhatsApp messages from Twilio |
| Topic | Description |
| ------ | ------------- |
| **[Concepts](concepts/README.md)** | A list of basic concepts used in the framework |
| **[Getting Started](getting_started.md)** | A quick guide to start using the framework |
| **[Sending Webhooks](send_webhooks.md)** | Sending webhooks messages to receivers |
| **[Receiving Webhooks](receivers/README.md)** | Receiving webhooks from senders |
| **[Notifications](notifications/README.md)** | Notify subscribing applications of events occurred in your system |
11 changes: 11 additions & 0 deletions docs/concepts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Concepts

The following concepts are used in this project:

| Topic | Description |
| ------- | ------------- |
| **[Webhook](webhook.md)** | What is it a 'Webhook' and why I need it? |
| **[Subscriptions](webhook_subscription.md)** | How does a subscription to an event works? |
| **[Senders](webhook_sender.md)** | What is a sender of webooks? |
| **[Receivers](webhook_receiver.md)** | What is a receiver of webooks? |
| **[Notifications](webhook_notification.md)** | What is a notification of events? |
18 changes: 2 additions & 16 deletions docs/concept_webhook.md → docs/concepts/webhook.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
<!--
Copyright 2022-2023 Deveel
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

# What is a Webhook?

Briefly, we can say that a webhook is the notification of an event that has occurred somewhere, and that is sent to a listening application that is interested in such event.

## The Event Model

If we consider the overall model of _processes_, where an activity is performed, and eventually preceding other activities, until a final result, we can define the _events_ as the triggers of such activities (eg. _something has occurred, and therefore we must perform some subsequent activities_).
Expand Down
File renamed without changes.
20 changes: 2 additions & 18 deletions docs/getting_started.md → docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
<!--
Copyright 2022 Deveel
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

# Getting Started

The overall design of this framework is open and extensible (implementing the traditional [Open-Closed Principle](https://en.wikipedia.org/wiki/Open%E2%80%93closed_principle)), that means base contracts can be extended, composed or replaced.
Expand All @@ -24,7 +8,7 @@ It is possible to use its components as they are provided, or use the base contr

The overall set of libraries are available through [NuGet](https://nuget.org), and can be installed and restored easily once configured in your projects.

At the moment (_May 2023_) they are developed as `.NET 6.0` and thus compatible with all the profiles of the .NET framework greater or equal than this.
At the moment (_November 2023_) they are developed as `.NET 6.0` and thus compatible with all the profiles of the .NET framework greater or equal than this.

The core library of the framework is `Deveel.Webhooks` and can be installed through the `dotnet` tool command line

Expand All @@ -44,7 +28,7 @@ Or by editing your `.csproj` file and adding a `<PackageReference>` entry.
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Deveel.Webhooks" Version="1.1.6" />
<PackageReference Include="Deveel.Webhooks" Version="2.1.1" />
...
</ItemGroup>
</Project>
Expand Down
5 changes: 5 additions & 0 deletions docs/notifications/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Webhook Notifications

The notification process of a webhook introduces elements of automation, putting together the _[subscription management](webhook_subscription_management.md)_ and the _[sending of webhooks](../sending-webhooks/README.md)_ processes, and an optional step of _[data transformation](custom_datafactory.md)_ (to resolve event information in a full formed object to be transferred).

The _Deveel Webhook_ framework implements these functions through an instance of the `IWebhookNotifier<TWebhook>` service, that uses a `IWebhookSubscriptionResolver` and the `IWebhookSender<TWebhook>` instance configured.
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
<!--
Copyright 2022 Deveel
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

# Producing Custom Data Factories

In automated scenarios of notification, when an event triggers a process of construction of the webhooks and their delivery to subscribers, there could be a need to _transform_ the original data carried by those triggering events.
Expand Down
Loading

0 comments on commit d094267

Please sign in to comment.