Rocket.Chat
Articles
Ghost Installation
Currently Ghost can be installed and setup from an npm package(ghost-cli) and Docker image.
For our version of Ghost a similar npm package(rc-ghost-cli) is created which will install and setup the modified version of Ghost(rc_ghost).�
Docker image uses ghost-cli package
Install from source code.
Uses ghost-cli
SideNav Articles Icon
Admin Panel for Articles
Set Title
Tokens for webhook calls
Enable
Url
API CALLBACKS
During Setup
Is ghost setup?
GET /ghost/api/v2/admin/authentication/setup
TRUE
FALSE
Redirects and open new tab with Ghost URL.
Is rc_uid and rc_token valid?
GET /api/v1/me
TRUE
Creates a new session for the user.
Setup Ghost
POST /api/v2/admin/auth..on/setup
TRUE
Redirects and open new tab with Ghost URL.
How User will be added and authenticated?
For adding user, Admin will have two options:
For Authentication:
Since Ghost will be using values from cookies, ghost server must be hosted under the domain RC.�E.g. RC: open.rocket.chat�Ghost: articles.open.rocket.chat
After setup, Redirections
Is ghost setup?
GET /ghost/api/v2/admin/authentication/setup
TRUE
FALSE
User exist?
GET /ghost/api/v2/admin/userexist
TRUE
Creates a new session for the user.
Is rc_uid and rc_token valid?
GET /api/v1/me
FALSE
Inviteonly setting in Ghost?
GET /ghost/api/v2/admin/invitesetting
FALSE
Add User
POST /api/v2/admin/auth...on/adduser
TRUE
LogOut
Destroy ghost session
DEL /ghost/api/v2/admin/session (with token in cookie)
Before Setup, if you visit the Ghost URL.
After Setup, if you visit the Ghost URL, w/o login in RC.
Public View
Setting options for Owner and Admin Only
Rocket.chat related settings
Roles in Ghost
Roles in RC and Ghost
Since Editor and above can add users from RC, we are using token to fetch user details which contains users emails. As RC does not allow user to fetch another user’s email.
Parent editor of Contributor
Database syncing
Ghost will be using RC mongoDb directly(readonly), for the details which are required on Ghost side.
This way we don’t have to worry about datasync issue.
API will also be used along with Mongo.
Still we will use webhook callback for two functions:
User profile details which are fetched from RC, will not be allowed to change in Ghost side.
Functions for RC interaction M: directly fetching from MongoDB, A: using RestAPI call.
getUser(M):
args- username/_id
It requires for the purpose of adding users in Ghost.
getMe(A):
args- _id, token
Used to verify if the userId and login token are correct. Requires during setup and creating user session.
getRoom(M):
args- _id/name
Used to validate the room to announce, or discussion room is fetched. Only roomId is stored in the Ghost DB, name/type is being fetched every time.
getSelfRoom(M/A):
args- _id
The direct room between user with him/herself. Need the id of the room to create Discussion room. First fetch will directly from M in subscriptions, if subscription doesn’t then API will be used to create one.
createDiscussion(A):
args- _id/token
API call is used to create discussion room with pid as fetched above.
validateSubscription(M):
args- rid, uid
To validate if a user is a member of a particular group.
Public View of Articles
To make the site private
This will allow only RC users and anyone with password to access the content.
For private Site
Password will be for the people who are not a member of RC, but want to access the site.�
For the members of RC, this authentication is not required, they will be authenticated from rc_uid and rc_token set in cookie by RC.
1) Post can be created in two mode: private, public:
2) But the post which are available on the site, will be available to internet users or only RC users will be decided by, if blog is private or not.
Post accessibility
Authors page
Author page
Creating new post
Collaboration allows other users from announcing room to collaborate on post.
Room to announce post
Collaborate with room
Private discussion
Announce the post
Post announcement message in channel/group
Customization message for announcement
Post View
Comment room in Iframe
Comment room is actually a discussion room with parent room as the direct room between user with himself/herself.
Scalability Limitation of Ghost
MODIFICATIONS
Improving Scalability
Thank you