Skip to content

Commit 8cd79ad

Browse files
committed
hooks readme file
1 parent 671c2ae commit 8cd79ad

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

plugins/hooks/README.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Countly Hooks Plugin
2+
3+
The Hooks plugin provides powerful automation for integrating Countly data with external systems. This plugin can trigger external HTTP endpoints based on internal events and incoming data, and send automated email notifications for events like user profile updates or users entering a cohort. Hooks offers a new way to feed external systems with Countly data, enabling real-time interactions and automating workflows.
4+
5+
## File Structure
6+
7+
```javascript
8+
hooks/ # Main hooks plugin directory
9+
├── api/ # Backend API logic
10+
│ ├── jobs/ # Job scheduling logic
11+
│ │ └── schedule.js # Handles scheduling tasks
12+
│ └── parts/ # Logic for effects and triggers
13+
│ ├── effects/ # Different types of effects used in hooks
14+
│ │ ├── custom_code.js # Handles custom code execution
15+
│ │ ├── email.js # Manages email-related hooks
16+
│ │ ├── http.js # HTTP requests for hooks
17+
│ │ └── index.js # Effect index for organization
18+
│ └── triggers/ # Triggers for executing hooks
19+
│ ├── api_endpoint.js # API endpoint trigger
20+
│ ├── incoming_data.js # Triggers for incoming data
21+
│ ├── internal_event.js # Internal event trigger
22+
│ ├── scheduled.js # Trigger for scheduled tasks
23+
│ └── index.js # Trigger index file
24+
├── api.js # Main API logic for backend requests
25+
├── testData.js # Sample test data for hooks
26+
├── utils.js # Utility functions for hooks
27+
├── frontend/ # Frontend resources
28+
│ ├── public/ # Publicly accessible files
29+
│ │ ├── javascripts/ # JavaScript for frontend logic
30+
│ │ │ ├── countly.hooks.effects.js # Effect logic for frontend hooks
31+
│ │ │ ├── countly.models.js # Model definitions for hooks
32+
│ │ │ └── countly.views.js # View logic for rendering hooks
33+
│ │ ├── localization/ # Localization files for translations
34+
│ │ ├── stylesheets/ # CSS and SCSS for styling hooks UI
35+
│ │ │ ├── vue-main.css # Compiled CSS for UI
36+
│ │ │ └── vue-main.scss # Source SCSS file for styling
37+
│ │ └── templates/ # HTML templates for UI components
38+
│ │ ├── vue-drawer.html # Drawer UI for hooks
39+
│ │ ├── vue-effects.html # Effects UI template
40+
│ │ ├── vue-hooks-detail-error-table.html # Template for error table
41+
│ │ ├── vue-hooks-detail.html # Detail view of individual hooks
42+
│ │ ├── vue-main.html # Main template for hooks
43+
│ │ └── vue-table.html # Table template for hooks display
44+
│ └── app.js # Main frontend application logic
45+
├── install.js # Installation script for the plugin
46+
├── package-lock.json # Lock file for Node.js dependencies
47+
├── package.json # Package configuration for Node.js
48+
├── tests.js # Test scripts for validating hooks functionality
49+
└── uninstall.js # Uninstallation script for removing the plugin
50+
```
51+
52+
## Installation
53+
54+
1. Navigate to the directory where the Hooks plugin is located. This could be a relative or absolute path depending on your environment setup:
55+
56+
```bash
57+
cd /path/to/your/project/hooks
58+
```
59+
60+
2. Install dependencies:
61+
62+
```bash
63+
npm install
64+
```

0 commit comments

Comments
 (0)