Skip to content

Commit

Permalink
refactor(echo-cli,echo-sdk): relocate to monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
djabarovgeorge committed May 6, 2024
1 parent 45436b7 commit ad85602
Show file tree
Hide file tree
Showing 115 changed files with 22,326 additions and 3,419 deletions.
26 changes: 26 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,32 @@
"eslint-plugin-react": "7.32.2",
"eslint-plugin-react-hooks": "^4.4.0",
"eslint-plugin-spellcheck": "0.0.20",
"eslint-config-adjunct": "^4.13.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-auto": "^0.9.0",
"eslint-plugin-chai-expect": "^3.0.0",
"eslint-plugin-chai-friendly": "^0.7.4",
"eslint-plugin-const-case": "^1.2.2",
"eslint-plugin-html": "^8.0.0",
"eslint-plugin-jest": "^27.9.0",
"eslint-plugin-jest-async": "^1.0.3",
"eslint-plugin-jest-dom": "^5.4.0",
"eslint-plugin-json": "^3.1.0",
"eslint-plugin-markdown": "^3.0.1",
"eslint-plugin-mocha": "^10.4.3",
"eslint-plugin-mocha-cleanup": "^1.11.3",
"eslint-plugin-no-constructor-bind": "^2.0.4",
"eslint-plugin-no-secrets": "^0.8.9",
"eslint-plugin-no-unsanitized": "^4.0.2",
"eslint-plugin-no-use-extend-native": "^0.5.0",
"eslint-plugin-optimize-regex": "^1.2.1",
"eslint-plugin-pii": "^1.0.2",
"eslint-plugin-security": "^2.1.1",
"eslint-plugin-simple-import-sort": "^12.0.0",
"eslint-plugin-sonarjs": "^0.24.0",
"eslint-plugin-switch-case": "^1.1.2",
"eslint-plugin-unicorn": "^51.0.1",
"eslint-plugin-xss": "^0.1.12",
"execa": "^6.1.0",
"globby": "^12.2.0",
"gradient-string": "^2.0.1",
Expand Down
9 changes: 9 additions & 0 deletions packages/cli-next/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
extends: ['../../.eslintrc.js'],
parserOptions: {
project: './tsconfig.json',
ecmaVersion: 2020,
sourceType: 'module',
tsconfigRootDir: __dirname,
},
};
120 changes: 120 additions & 0 deletions packages/cli-next/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# Created by .ignore support plugin (hsz.mobi)
### Node template
# Logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.idea
.build
# Runtime data
pids
*.pid
*.seed
*.pid.lock

dist
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# next.js build output
.next
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/*/workspace.xml
.idea/**/*/tasks.xml
.idea/**/*/dictionaries
.idea/**/*/shelf

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# CMake
cmake-build-debug/
cmake-build-release/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

.serverless
newrelic_agent.log
158 changes: 158 additions & 0 deletions packages/cli-next/README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
<div align="center">

![Logo Dark](https://user-images.githubusercontent.com/8872447/165779319-34962ccc-3149-466c-b1da-97fd93254520.png#gh-dark-mode-only)

</div>

<div align="center">

![Logo Light](https://user-images.githubusercontent.com/8872447/165779274-22a190da-3284-487e-bd1e-14983df12cbb.png#gh-light-mode-only)

</div>

<h1 align="center">Notification management simplified.</h1>

<div align="center">
The ultimate service for managing multi-channel notifications with a single API.
</div>

<p align="center">
<br />
<a href="https://docs.novu.co" rel="dofollow"><strong>Explore the docs »</strong></a>
<br />

<br/>
<a href="https://github.com/novuhq/novu/issues/new?assignees=&labels=type%3A+bug&template=bug_report.yml&title=%F0%9F%90%9B+Bug+Report%3A+">Report Bug</a>
·
<a href="https://github.com/novuhq/novu/issues/new?assignees=&labels=feature&template=feature_request.yml&title=%F0%9F%9A%80+Feature%3A+">Request Feature</a>
·
<a href="https://discord.novu.co">Join Our Discord</a>
·
<a href="https://roadmap.novu.co/">Roadmap</a>
·
<a href="https://twitter.com/novuhq">X</a>
</p>

## ⭐️ Why
Building a notification system is hard, at first it seems like just sending an email but in reality it's just the beginning. In today's world users expect multichannel communication experience over email, sms, push, chat and more... An ever-growing list of providers are popping up each day, and notifications are spread around the code. Novu's goal is to simplify notifications and provide developers the tools to create meaningful communication between the system and its users.

## ✨ Features

- 🌈 Single API for all messaging providers (Email, SMS, Push, Chat)
- 💅 Easily manage notification over multiple channels
- 🚀 Equipped with a CMS for advanced layouts and design management
- 🛡 Built-in protection for missing variables (Coming Soon)
- 📦 Easy to set up and integrate
- 🛡 Debug and analyze multichannel messages in a single dashboard
- 📦 Embeddable notification center with real-time updates
- 👨‍💻 Community driven

## 🚀 Getting Started

We are excited to launch the complete Novu API and admin panel. Want to give it a test before the official release? here is how:

```
npx novu init
```

After setting up your account using the cloud or docker version you can trigger the API using the `@novu/node` package.

```bash
npm install @novu/node
```

```ts
import { Novu } from '@novu/node';

const novu = new Novu(process.env.NOVU_API_KEY);

await novu.trigger('<TRIGGER_NAME>', {
to: {
subscriberId: '<UNIQUE_IDENTIFIER>',
email: '[email protected]',
firstName: 'John',
lastName: 'Doe',
},
payload: {
name: 'Hello World',
organization: {
logo: 'https://happycorp.com/logo.png',
}
},
});
```

## Embeddable notification center

Using the Novu API and admin panel you can easily add real-time notification center to your web-app without the hassle of building it yourself. You can use our React component or an iframe embed if you are not using React.

<div align="center">
<img width="762" alt="notification-center-912bb96e009fb3a69bafec23bcde00b0" src="https://github.com/iampearceman/Design-assets/blob/main/Untitled%20design%20(8).gif?raw=true">

Read more about how to add a notification center to your app with the Novu API [here](https://docs.novu.co/notification-center/introduction)

</div>

## Providers

Novu provides a single API to manage providers across multiple channels with a simple-to-use interface.

#### 💌 Email

- [x] [Sendgrid](https://github.com/novuhq/novu/tree/main/providers/sendgrid)
- [x] [Netcore](https://github.com/novuhq/novu/tree/main/providers/netcore)
- [x] [Mailgun](https://github.com/novuhq/novu/tree/main/providers/mailgun)
- [x] [SES](https://github.com/novuhq/novu/tree/main/providers/ses)
- [x] [Postmark](https://github.com/novuhq/novu/tree/main/providers/postmark)
- [x] [NodeMailer](https://github.com/novuhq/novu/tree/main/providers/nodemailer)
- [x] [Mailjet](https://github.com/novuhq/novu/tree/main/providers/mailjet)
- [x] [Mandrill](https://github.com/novuhq/novu/tree/main/providers/mandrill)
- [x] [SendinBlue](https://github.com/novuhq/novu/tree/main/providers/sendinblue)
- [x] [EmailJS](https://github.com/novuhq/novu/tree/main/providers/emailjs)
- [ ] SparkPost

#### 📞 SMS

- [x] [Twilio](https://github.com/novuhq/novu/tree/main/providers/twilio)
- [x] [Plivo](https://github.com/novuhq/novu/tree/main/providers/plivo)
- [x] [SNS](https://github.com/novuhq/novu/tree/main/providers/sns)
- [x] [Nexmo - Vonage](https://github.com/novuhq/novu/tree/main/providers/nexmo)
- [x] [Sms77](https://github.com/novuhq/novu/tree/main/providers/sms77)
- [x] [Telnyx](https://github.com/novuhq/novu/tree/main/providers/telnyx)
- [x] [Termii](https://github.com/novuhq/novu/tree/main/providers/termii)
- [x] [Gupshup](https://github.com/novuhq/novu/tree/main/providers/gupshup)
- [ ] Bandwidth
- [ ] RingCentral

#### 📱 Push

- [x] [FCM](https://github.com/novuhq/novu/tree/main/providers/fcm)
- [x] [Expo](https://github.com/novuhq/novu/tree/main/providers/expo)
- [ ] [SNS](https://github.com/novuhq/novu/tree/main/providers/sns)
- [ ] Pushwoosh

#### 👇 Chat

- [x] [Slack](https://github.com/novuhq/novu/tree/main/providers/slack)
- [x] [Discord](https://github.com/novuhq/novu/tree/main/providers/discord)
- [ ] MS Teams
- [ ] Mattermost

#### 📱 In-App

- [x] [Novu](https://docs.novu.co/notification-center/introduction)
- [ ] MagicBell

#### Other (Coming Soon...)

- [ ] PagerDuty

## 💻 Need Help?

We are more than happy to help you. Don't worry if you are getting some errors or problems while working with the project. Or just want to discuss something related to the project.

Just <a href="https://discord.novu.co">Join Our Discord</a> server and ask for help.

## 🔗 Links

- [Home page](https://novu.co/)
6 changes: 6 additions & 0 deletions packages/cli-next/nodemon-debug.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"watch": ["src"],
"ext": "ts",
"ignore": ["src/**/*.spec.ts"],
"exec": "node --inspect-brk -r ts-node/register -r tsconfig-paths/register src/main.ts"
}
8 changes: 8 additions & 0 deletions packages/cli-next/nodemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"watch": ["src", "../core/dist"],
"ext": "ts",
"delay": 2,
"ignoreRoot": [".git"],
"ignore": ["src/**/*.spec.ts"],
"exec": "ts-node -r tsconfig-paths/register src/index.ts"
}
58 changes: 58 additions & 0 deletions packages/cli-next/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"name": "@novu/novu-labs",
"version": "0.0.1-alpha.77",
"description": "On-Boarding Cli",
"main": "index.js",
"engines": {
"node": ">=18.17.0"
},
"scripts": {
"build:post": "cross-env mkdir dist/constants/dashboard",
"prebuild": "rimraf dist",
"build": "pnpm prebuild && tsc -p tsconfig.build.json && pnpm build:post",
"build:prod": "pnpm prebuild && pnpm build && pnpm build:post",
"format": "prettier --write \"src/**/*.ts\"",
"precommit": "lint-staged",
"start": "pnpm start:dev",
"start:sync": "cross-env NODE_ENV=development TZ=UTC nodemon sync --backend-url=http://localhost:3000 --echo-url=http://localhost:4000/api --api-key=9185a6719c99faa9142b08c94e3b65ca",
"start:dev": "cross-env NODE_ENV=development NOVU_EMBED_PATH=http://127.0.0.1:4701/embed.umd.min.js NOVU_API_ADDRESS=http://127.0.0.1:3000 NOVU_CLIENT_LOGIN=http://127.0.0.1:4200/auth/login CLI_SEGMENT_WRITE_KEY=GdQ594CEBj4pU6RFldDOjKJwZjxZOsIj TZ=UTC nodemon echo",
"start:test": "cross-env NODE_ENV=test PORT=1336 TZ=UTC nodemon init",
"start:debug": "cross-env TZ=UTC nodemon --config nodemon-debug.json",
"start:prod": "cross-env TZ=UTC node dist/index.js",
"release:alpha": "npm i && npm version prerelease --preid=alpha && npm run build && npm publish"
},
"author": "Novu Labs Team.",
"license": "ISC",
"bin": {
"novu-labs": "./dist/index.js"
},
"devDependencies": {
"@types/configstore": "^5.0.1",
"@types/inquirer": "^8.2.0",
"@types/mocha": "10.0.2",
"eslint-config-adjunct": "^4.13.0",
"ncp": "^2.0.0",
"nodemon": "^3.0.1",
"rimraf": "^5.0.5",
"ts-node": "~10.9.1",
"tsconfig-paths": "^4.2.0",
"typescript": "4.9.5"
},
"dependencies": {
"@novu/shared": "^0.23.1",
"@novu/studio": "^0.0.1-alpha.87",
"@segment/analytics-node": "^1.1.4",
"axios": "^1.6.2",
"chalk": "4.1.2",
"commander": "^9.0.0",
"configstore": "^5.0.0",
"cross-env": "^7.0.3",
"dotenv": "^8.2.0",
"get-port": "^5.1.1",
"gradient-string": "^2.0.0",
"inquirer": "^8.2.0",
"jwt-decode": "^3.1.2",
"open": "^8.4.2",
"uuid": "^9.0.0"
}
}
Loading

0 comments on commit ad85602

Please sign in to comment.