Skip to content

Commit

Permalink
Merge pull request #29 from sumithprabhu/readme-changes
Browse files Browse the repository at this point in the history
Readme changed
  • Loading branch information
pranshurastogi authored Apr 5, 2024
2 parents 5d2e485 + 3e2130e commit f69339e
Showing 1 changed file with 101 additions and 16 deletions.
117 changes: 101 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,105 @@
<h1 align="center">
<a href="https://push.org/#gh-light-mode-only">
<img width='20%' height='10%' src="https://res.cloudinary.com/drdjegqln/image/upload/v1686227557/Push-Logo-Standard-Dark_xap7z5.png">
</a>
<a href="https://push.org/#gh-dark-mode-only">
<img width='20%' height='10%' src="https://res.cloudinary.com/drdjegqln/image/upload/v1686227558/Push-Logo-Standard-White_dlvapc.png">
</a>
</h1>

<p align="center">
<i align="center">Push Protocol is a web3 communication network, enabling cross-chain notifications, messaging, video, and NFT chat for dapps, wallets, and services.🚀</i>
</p>

<h4 align="center">

<a href="https://discord.gg/pushprotocol">
<img src="https://img.shields.io/badge/discord-7289da.svg?style=flat-square" alt="discord">
</a>
<a href="https://twitter.com/pushprotocol">
<img src="https://img.shields.io/badge/twitter-18a1d6.svg?style=flat-square" alt="twitter">
</a>
<a href="https://www.youtube.com/@pushprotocol">
<img src="https://img.shields.io/badge/youtube-d95652.svg?style=flat-square&" alt="youtube">
</a>
</h4>


# PUSH Showrunners (Server)

The PUSH Showrunners handles the channels created and maintaned by us. It also shows how easy it is to interact with the protocol to build highly customized notifications for your dApp, smart contracts or even centralized services.
The showrunners framework is a scaffold that developers can use to build out notifications for their use cases. Showrunners framework provides the tools and helpers required for constructing the payload and sending the notification using the Push protocol infrastructure.

---

## Installation and Set Up Guide

- Install docker
- Clone the repo
``` git clone https://github.com/ethereum-push-notification-service/epns-showrunners-staging-v2.git```
- Open the root folder in a terminal and enter
```docker-compose up```. This initalises mongodb, redis and ipfs local instances
```
git clone https://github.com/push-protocol/push-showrunners-framework
```
- To make it easier to use, we will be using Docker. You can initialize it using the code below code , but if looking for a manual setup then [Refer this](#external-services).
```
docker-compose up
```
- Open the root folder in another terminal and enter
```npm install```
```npm start```
```
yarn install
```
```
yarn start
```

### To exit
- To stop running the showrunners server, press ```Ctrl + C```
- To stop running the docker, press ```Ctrl + C``` and enter
```docker-compose down```

---
## Channel Structure
Before we dive into an example ,Let's understand the requirements for the folder structure inside the src/showrunners folder and how you can use them to quickly refine / debug / deploy your channels.

Each folder inside ```src/showrunners``` is treated as their own channel. Showrunners is designed to be a plug and play solution for your channel which means that each of the folders designated filenames are used to add-on various functionalities.

1. channelChannel.js [.ts] (Mandatory)
- Example: helloWorldChannel.js
- This file contains all the logic functions of your channel, it can for instance have a way to poll all opted in users of your channel and based on certain conditions that are met, fire notifications out.
1. channelKeys.json (Mandatory)
- Example: helloWorldKeys.json
- This file contains all your private keys that you either belong to the channel you created or have authorized the wallets to send notification on your channel's behalf.
1. channelRoutes.js [.ts]
- Example: helloWorldRoutes.js
- This file contains the routes that you will enable to ensure you are able to manually trigger notification or any other logic points in your channelChannel.js [.ts]
- You will ideally use the route of this files in postman to trigger logic functions / test them out.
1. channelJobs.js [.ts]
- Example: helloWorldJobs.js
- This file contains your cron jobs to trigger logic points in your channelChannel.js [.ts]
- The file is based on node-schedule and can handle a wide variety of automated cron jobs to enable sending wide array of notifications based on triggers.
1. channelAWSSNS.js[.ts]
- Example: helloWorldAWSSNS.ts
- This file contains the webhook helpers and handle the logic points for consuming a webhook.
- This file is based on AWS-SNS and can handle the variety of logics for consuming webhook to enable sending wide array of notifications based on webhook triggers.

## Showrunner Channels
---

## Examples :

- To subscribe to channels, please visit our [Alpha dApp](https://app.epns.io)
- Currently notifications can be recieved through our [Google Play Alpha App](https://play.google.com/store/apps/details?id=io.epns.epns)
- The alpha protocol and product are working and are in ropsten network
- **Have an idea for protocol or product?** Awesome! get in touch by joining our [Telegram Group](https://t.me/epnsproject) or following us on [Twitter](https://twitter.com/epnsproject)
Now lets have a quick tour into example and understand How to actually run a Showrunner framework over a demo HelloWorld channel

[Hello World Example](https://docs.push.org/developers/developer-tooling/showrunners-framework/hello-world-channel)

For more examples [Refer this](https://github.com/push-protocol/push-showrunners-framework/tree/main/src/sample_showrunners).

---

## Technical Details

Following definitions are used in the rest of the spec to refer to a particular category or service.
<!-- Following definitions are used in the rest of the spec to refer to a particular category or service.
| Term | Description
| ------------- | ------------- |
| Showrunners | Showrunners are Channels on PUSH protocol notification protocol that are created and maintained by us |
| Showrunners | Showrunners are Channels on PUSH protocol notification protocol that are created and maintained by us | -->

### Tech Specs
<!-- ### Tech Specs
The Showrunners run on node.js server and are modularized on the ideas and architecture of [Bulletproof NodeJS](https://github.com/santiq/bulletproof-nodejs), the essential features in the architeture are as follows:
Expand All @@ -47,9 +112,9 @@ The Showrunners run on node.js server and are modularized on the ideas and archi
### Credits
- [Bulletproof NodeJS](https://github.com/santiq/bulletproof-nodejs)
- [Bulletproof NodeJS](https://github.com/santiq/bulletproof-nodejs) -->

### External Services
## External Services

We would need external services of:

Expand All @@ -59,3 +124,23 @@ We would need external services of:

For local ease of development, we make use of [Docker](https://docs.docker.com/get-docker/).

---

## Contributing

Push Protocol is an open source Project. We firmly believe in a completely transparent development process and value any contributions. We would love to have you as a member of the community, whether you are assisting us in bug fixes, suggesting new features, enhancing our documentation, or simply spreading the word.

- Bug Report: Please create a bug report if you encounter any errors or problems while utilising the Push Protocol.
- Feature Request: Please submit a feature request if you have an idea or discover a capability that would make development simpler and more reliable.
- Documentation Request: If you're reading the Push documentation and believe that we're missing something, please create a docs request.

Not sure where to start? Join our discord and we will help you get started!


<a href="https://discord.gg/pushprotocol" title="Join Our Community"><img src="https://www.freepnglogos.com/uploads/discord-logo-png/playerunknown-battlegrounds-bgparty-15.png" width="200" alt="Discord" /></a>

---

## License
Check out our License <a href='https://github.com/push-protocol/push-showrunners-framework/blob/main/license-v1.md'>HERE </a>

0 comments on commit f69339e

Please sign in to comment.