Build complete own FrontEnd for RocketChat possible? - rocket.chat

I would like to integrate Rocket.Chat into my website. I found out, that I can embed RocketChat via iframe and customize the style with the built in "Embedded Layout". However I would like to so to say build my own Web-Frontend-Client for a Rocket.Chat-Server with PHP and jQuery. Is that possible? So let us say I have 2 VMs running on my server, one for my homepage, one for Rocket.Chat. Could I somehow access the Rocket.Chat Server via jQuery Websocket Connection or with the Rocket.Chat API and login users and get and write messages (private and channel)? If yes, is there any documentation or example on this out there? Thank you very much.

Related

How can I let others read and edit a google sheet (not shared with them) using googleapi, without them having to download credential?

I am a beginner trying out api for fun.
The problem is, lets say, I want to write a simple windows program with golang to let my friends read and edit one of the sheets saved on my google drive. How can I do this without having them download a credential file?
What I want it to do is simply redirect them to the Oauth Page right away, and if their email address is one recognized by the app it will grant them access to that google sheet.
What i think you need is to integrate your go app with Oauth protocol.
More specifically, with the Google provider.
This is mainly 3 steps:
add the oauth client to your application
something like this: https://github.com/golang/oauth2
See their docs on how to do it.
go to google dev documentation and see how to integrate google auth flow into the client: https://developers.google.com/identity/protocols/OAuth2
I'm not sure if google has something more specific for google drive integration and/or go-lang client in particular. Please do some searching.
make the glue code on your go app so that the user can interact with this (the login button (or command, if it is terminal based), error messages, logout, etc)
More questions will appear when you start to do this, however it is a great example to learn Oauth as well.
General guidelines:
https all the queries or oauth is basically useless
oatuh has many auth-flows and you must choose which one(s) you support. use whatever google documentation recommends for m2m scenario (machine 2 machine)
log errors so that your friends can send you a log file for you to debug issues
maybe set some feature flag so that you can simply disable this feature to run/test localhost ? maybe useful? you decide.

Sending web push notifications from Laravel

I have a website running Laravel in the back-end, where users can create reports for other users.
When the report is created I would like to send a push notification to recipient user's desktop.
Do I need to use services like Pusher, OneSignal?
Any useful site with examples would be appreciated.
Your question
You could use Pusher, Redis/Socket.io, Pubnub, etc. Which one to use? well, this is more an opinion-based question.
These services broadcast events, then in your client apps (like your web front-end) you configure the client-side libraries of the service you choose to subscribe (to channels) and listen to those events. The documentation explains it better.
Examples/tutorials
Pusher
This is a tutorial published by the Pusher team.
Redis/Socket.io
This one
is a Laracasts series about this.
Just google.
Update
There is a Laravel-specific alternative, a package created exclusively for Laravel:
Laravel WebSockets
This is the post talking about the package and its inner working.
This is the repo.
Here you have the documentation.
If you like to show Native Desktop notification then i would suggest Web Push notification. In this way once user subscribed to push notification ,they will get real time notification and does not need to be on your website.
https://github.com/laravel-notification-channels/webpush

How to get only a backend rocket.chat instance

Is there any way to get only a backend rocket.chat proyect?
I don't want to use the frontend from rocket. I want to create some app and do some request to the rocket backend to interact with all the server features in rocket.
Its currently not possible.
Rocket.Chat is built using the Meteor framework. Unfortunately with meteor this is no way to disable the browser platform as a target. See this ticket for more details
It doesn't hurt to have the UI there and just not use it though.
If you are wanting to prevent UI access. I would maybe look at adding rules to your reverse proxy to return 404 for things such as:
index.html
theme.css
*.js

Kendo UI Without Server Side been hosted

OK Planing to Build small twitter App with Kendo UI . just wondering if that mean part of the app will be hosted in my server in order to get that work ?
I don't want host any part of the app at the server . i want this App to work directly Forward and backward from the app at user Device to twitter API
Please don't tell me it's just script will be hosted and the App that going to be created with Phonegap or whatever is just a Browser . Please don't tell me that
I am not sure I understand your question right but you can create a JavaScript only (no-server side code required) twitter client. You can embed all required JavaScript files and deploy them using PhoneGap.

Any way to push Javascript from NodeJS server to client for updates?

In Scala's Liftweb there are some classes which allow for Javascript to be pushed to the browser via comet/ajax after the page has loaded. Some documentation here.
The usage could be for example when someone submits a form to the server, the form would submit via AJAX and then some Javascript can be sent from the server to the client to show some error message. Well this is just for example, there are better ways to do form validation.
Is there any way to push Javascript from the NodeJS server to the client to do updates? Any standard way to do this? Why I want to do this is that its nicer to have all client and server code located in one server file.
Also as a secondary question, can I access the page data from the server side? It would be nice to be able to query a page element from the server side or query some page data from the server side.
You can build this functionality into socket.io, either by predefining functions based on dynamic objects that are sent bi-directionally, or by building a system which will parse and run javascript from both sides. Depending on what you are trying to do it might take a while to get that working for you securely (not just throwing everything in eval());
http://socket.io/
Alternatively there is a library built on node.js that has this functionality built in. I have not personally used it so I can't attest to the reliability or security of the system, but it should be a good place to start.
http://www.nowjs.com/
https://github.com/Flotype/now
Hope this helps!

Resources