This is "just" an example repository for "vendor" that will try to estimate work to implement CORE by PushPushGo in their system. It's not stand alone project. It's not optimized and cannot be used in production.
Full journey.
- Create new project
- Integrate Website (copy & paste integration code)
- Register Subscriber (on integrated website)
- Send mass campaign (title & content) for example
- Collect & see subscription statistics
- Collect & see campaign statistics
- Get list of subscribers and campaigns
In domain
directory it's full raw implementation for push notifications model
without any "dependences". It contains, subscription, campaign, etc. In
routes/api
you can find some poor api implementations. Example endpoints for
"get subscription" or "events" for statistics. In routes/pages
you will find
ui pages and elements. Example raw views.
To run this example you will need:
- Deno
curl -fsSL https://deno.land/x/install/install.sh | sh
or
https://deno.land/manual/getting_started/installation
-
Localtunnel.me
npm install -g localtunnel
-
For example-website integration preview:
npm install -g live-server
- Create a tunnel (you can change this subdomain name, but remember to change also API_ENDPOINT env var later):
lt --port 8000 --subdomain saas-example-full
Make sure that you will get this subdomain! if not, please provide new name in next steps.
- Run app:
API_ENDPOINT="https://saas-example-full.loca.lt" PPG_CORE_ENDPOINT="https://api-core.pushpushgo.com/v1" PPG_CORE_TOKEN="..." deno task start
Need testing token? please join us on Discord or contact via email
-
Go to website
https://saas-example-full.loca.lt
and authorize your IP address for tunnelcurl ipv4.icanhazip.com
-
Create new project
-
Go to "integration details" and copy codes and paste in ./example-websites/example-1 directory (worker, and index)
-
Run live-server
live-server ./example-websites/example-1
-
Subscribe for notifications on
open http://localhost:8080
-
Create new campaign and send notification.
In directory ./example-websites
there is example of websites using during
tests - it's need to be rewrited with "new project" integration code. Just keep
for directory "structure".
Example websites can be run with live-server ./example-websites/example-1
To run tests type deno task test