Git Product home page Git Product logo

saelos's Introduction

Saelos

Saelos

Requirements

  • PHP 7.1+
  • MySQL 5.7.8+ or MariaDB 10.2.7+ (due JSON Datatype support)

Installation

  • Download the latest release from the releases tab.
  • Unzip in a web accessible directory.
  • Navigate to your site.
  • Follow installation instructions.

Development

Saelos uses prettier with its default settings for code style formatting. code style: prettier

Developer Installation

  • Clone this repository
  • run composer install && npm install && npm run watch
  • Nav to site and go through install process.

Notifications

Saelos supports both Pusher and Socket.IO for in app notifications.

Pusher Setup

Pusher is a good option for notifications if you want to get up and running quickly. The service is free up to 100,000 notifications per day, so it should meet the notification needs of most medium-sized Saelos installations.

To get started, create a pusher account and a new Channel App to get your credentials. You're going to need the app_id, app_key, app_secret, and know which cluster your app is running in. (All of these settings are available after creating an app.) Enter those values in the appropriate places within your .env file at the root of your Saelos directory, and you're good to go.

Socket.IO Setup

Handling in app notifications with Socket.IO requires a bit of techinical setup, but is an Open Source alternative to Pusher.

Requirements

  • Redis Server
  • Node Server
Configuration

If your Saelos server allows you to run Node along side of PHP and it has Redis installed, the setup process is fairly straigtforward. Enter your Redis settings inside of your .env:

BROADCAST_DRIVER=redis
REDIS_BROADCAST_URL=http://YourBroadcastUrl
REDIS_BROADCAST_PORT=6001
Running the Broadcast Server

Start the notifications server by running the npm run notification-server command. If everything is set up correctly, you'll see output similar to:

dgilbert ~/Sites/saelos (master) $ npm run notification-server

> @ notification-server /Users/dgilbert/Sites/saelos
> node websocket.js


L A R A V E L  E C H O  S E R V E R

version 1.3.6

⚠ Starting server in DEV mode... // <-- Only shows if you're APP_DEBUG is set to true in .env

✔  Running at http://laelos.test on port 6001
✔  Channels are ready.
✔  Listening for http events...
✔  Listening for redis events...

If you're missing that last line (✔ Listening for redis events...), then there is a misconfiguration for your redis server that you'll need to debug. If everything looks good, go ahead an navigate to your Saelos installation in your browser. Once loaded, you should see something similar to [9:44:57 AM] - DSx0QG5SGhaseyu_AAAA joined channel: saelos in your terminal where you ran the npm run notification-server command.

You can test the notification system by opening http://YourSaelos/notification_test in your browser while logged into Saelos. You'll see the notification in the top right of your screen. If you do, you're all set!

Redis Wrap Up

The last thing you'll need to do for Socket.IO is to run your Node server as a daemon. There are various ways to do this depending on the server you're running on, but the most common would be Supervisor. The basic supervisord config would be:

[program:saelos-notifications]
command=/path/to/node /path/to/your/saelos/websocket.js

saelos's People

Contributors

davevurby avatar dongilbert avatar luizeof avatar naomicbush avatar pborreli avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.