A light-weight platform for you to build up a notification system for your own projects.
Users can add account through API and grant account(account operation) push(push notifications) pull(pull notifications) permissions.
root account has all permissions,and can add/remove accounts or push/pull notifications.
Each notification has its own ID Title Content Time Target Source fileds.
Set Target to select specific user to receive this notification,or set Target to _global_ to send this notification to all users.
Programs can pull notifications sent to specific account through APIs.
Programs connect to esn-daemon through APIs to interact with esn-daemon,like the style of MySQL's interacting.
Users can also use Terminal we published to interact with esn-daemon.
| unit | function | repo |
|---|---|---|
| esn-daemon | Handle connections from api | https://github.com/EasyNotification/esn-daemon |
| esn-api-golang | API for Golang projects to connect to esn-daemon | https://github.com/EasyNotification/esn-api-golang |
| esn-api-java | API for Java projects to connect to esn-daemon | https://github.com/EasyNotification/esn-api-java |
| esn-api-python | API for Python projects to connect to esn-daemon | https://github.com/EasyNotification/esn-api-python |
| esn-terminal-swing | Made with esn-api-java,for users to manage notifications or accounts | https://github.com/EasyNotification/esn-terminal-swing |
| esn-terminal-android | A terminal for Android platform | https://github.com/Soulter/esn-terminal-android |
If you don't want to use pre-build files,you can install golang on your device and build it by yourself.
- Install golang(version above 11) on your device.
- Enable GO111MODULE by execute
export GO111MODULE=onon Linux/MacOS orset GO111MODULE=onon Windows. - Clone this repo or download source code from release(recommended).
- Change directory to where the file
go.modin,executego mod tidyto solve requirements. - Execute
go build -o bin/esnd-linux src/main/main.goon Linux/MacOS orgo build -o bin\esnd-windows src\main\main.goon Windows. - You can find executable file in
bindirectory.
Here are the steps to guide you to configure esn-daemon for your own projects.
A host with reachable IP address as server to run esn-daemon.
- Install MySQL on server.
- Add an account in MySQL and grant all permissions to access a specific database.
- Remember the user name,password and database name.
-
Make a work directory for esnd and download pre-build executable file from here.
-
Use
./esnd-linux-x64on Linux or.\esnd-windows-x64.exeon Windows to launch esnd first time. -
Esnd will auto generate config files and exit.
-
Change directory to
config/and editesnd.conf. -
Set
service.portto the port specific for esnd. -
Set
db.userdb.addrdb.passdb.databaseto theMySQL user nameMySQL address and portMySQL user passworddatabase nameas you configured in previous steps. -
Set
root.maskto the password for root account in esnd you expected,root account has all permissions in esnd system. -
If you want to enable debug mode and see more output during esnd runtime,append
debug.enable=truein theesnd.conf. -
Make sure the serivce port is open by firewall and then launch esnd.You can test esnd configuration in esn-terminal now.
Import APIs to your projects,and use provided ways to connect to daemon to push/pull notifications or add/remove accounts.
Please refer to READMEs of API repos.