GithubHelp home page GithubHelp logo

papercups-io / papercups Goto Github PK

View Code? Open in Web Editor NEW
5.6K 69.0 488.0 4.7 MB

Open-source live customer chat

Home Page: https://app.papercups.io/demo

License: MIT License

Elixir 59.26% HTML 0.08% CSS 0.17% TypeScript 40.15% Shell 0.13% JavaScript 0.08% Dockerfile 0.12% Procfile 0.01%
elixir phoenix-framework phoenix react intercom livechat docker heroku frontend typescript

papercups's Introduction

⚠️ Maintenance Mode

Papercups is in maintenance mode. This means there won't be any major new features in the near future. We will still accept pull requests and conduct major bug fixes. Read more here

Papercups

Papercups is an open source live customer support tool web app written in Elixir. We offer a hosted version at app.papercups.io.

You can check out how our chat widget looks and play around with customizing it on our demo page. The chat widget component is also open sourced at github.com/papercups-io/chat-widget.

Watch how easy it is to get set up with our Slack integration 🚀 : slack-setup

One click Heroku deployment

The fastest way to get started is one click deploy on Heroku with:

Philosophy

We wanted to make a self-hosted customer support tool like Zendesk and Intercom for companies that have privacy and security concerns about having customer data going to third party services.

Features

  • Reply from email - use Papercups to answer support tickets via email
  • Reply from SMS - forward Twilio conversations and respond to SMS requests from Papercups
  • Custom chat widget - a customizable chat widget you can embed on your website to talk to your customers
  • React support - embed the chat widget as a React component, or a simple HTML snippet
  • React Native support - embed the chat widget in your React Native app
  • Flutter support - embed the chat widget in your Flutter app (courtesy of @aguilaair ❤️)
  • Slack integration - connect with Slack, so you can view and reply to messages directly from a Slack channel
  • Mattermost integration - connect with Mattermost, so you can view and reply to messages directly from Mattermost
  • Markdown and emoji support - use markdown and emoji to add character to your messages!
  • Invite your team - send invite links to your teammates to join your account
  • Conversation management - close, assign, and prioritize conversations
  • Built on Elixir - optimized for responsiveness, fault-tolerance, and support for realtime updates

Demo

We set up a simple page that demonstrates how Papercups works.

Try sending us a message to see what the chat experience is like!

Blog

Check out our blog for more updates and learnings

Documentation

Check out our docs at docs.papercups.io

Contributing

We ❤️ contributions big or small. See CONTRIBUTING.md for a guide on how to get started.

Thanks to all of our contributors!

License

MIT © Papercups

papercups's People

Contributors

aboutphilippe avatar alisinabh avatar cheeseblubber avatar daskycodes avatar dependabot[bot] avatar edgarkanyes avatar eikooc avatar estevanjantsk avatar flmel avatar fmterrorf avatar imjared avatar insidesmart avatar jalford14 avatar jeepers3327 avatar kamilpikula avatar lorecrafting avatar lukewaring avatar m1ome avatar raditya3 avatar rberrelleza avatar reichert621 avatar rhonsby avatar rlanga avatar ryg-git avatar stopachka avatar sykrish avatar utsav0209 avatar webdeb avatar wlsf avatar zmagod avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

papercups's Issues

Fix how we save IP addresses of customers

Since we currently get very little info on the anonymous customers that interact with the chat widget, we save their IP addresses (so we can eventually do a location lookup)

At the moment, we use conn.remote_ip (https://github.com/papercups-io/papercups/blob/master/lib/chat_api_web/controllers/customer_controller.ex#L17), but this ~seems to only return private IP addresses.

Investigate this as a possible solution? https://www.cogini.com/blog/getting-the-client-public-ip-address-in-phoenix/

Fix Slack messaging if user reconnects to a different channel

If a user starts a conversation in one Slack channel, and then reconnects their account to a different Slack channel, the following messages in that conversation thread get messed up.

We need to either:

  1. Keep sending messages to the old thread
  2. Start a new thread in the new channel

Option 1 makes it easier to see the history of a thread, but Option 2 still seems better (I wouldn't want to have to keep going back and forth to old channels, but maybe this is inevitable either way...)

Reduce delay when closing a message

Need to figure out the best UX for this -- didn't want the message disappearing to feel too jarring, but don't want it to feel slow either... maybe just a quick animation?

Show notifications of closed conversations

There are no notifications for closed conversations in the dashboard. Only an email is sent. Closed conversation notifications should still be displayed.

Alternatively, closed conversations should no longer be displayed in the client and a new conversation should be started.

Set working hours

Users want the ability to set working hours and automatically prompt for Email address when they are away.

Media library

Chat widget

Demo:
demo

Sped up:
demo-v2

Conversations

Demo:
dashboard-v1

Screenshot:
Screen Shot 2020-07-21 at 8 57 16 PM

Slack

Demo:
slack-demo

Getting started

Screenshot:
Screen Shot 2020-07-21 at 8 57 46 PM

Integrations

Screenshot:
Screen Shot 2020-07-21 at 8 57 58 PM

Playground

Kapture 2020-08-04 at 21 53 32

Ability to Disable Registration

Hello,

I couldn't find a way to disable registration after creating the initial account (also tried to look through the source/docs).
Is there a way to prevent anyone from creating a new org on my deployment?

If it hasn't been build/spec'd yet, here's a potential direction:

As an Admin
I want to restrict outside registration
So that my instance of papercups is secure

Options:

  • environment variable like REGISTRATION_DISABLED=true that would default to false if not set (might be the quickest V1)
  • switch in UI

Other considerations:

  • how does an admin know once they set it the deployment that other instances have not been registered?

Like the direction & plan to use this 🤓

Set up integration with Microsoft Teams

Action items

Old notes (can ignore)

Some folks have requested this integration, so let's do some investigation into how difficult it would be. (It sounds like it shouldn't be too difficult.)

Maybe see our Slack integration for some inspiration? https://github.com/papercups-io/papercups/blob/master/lib/chat_api/slack.ex

Add transactions during account creation

During account creation we first create the account then the user. If the user creation fails then you will have an account thats created without a user attached.

Repro:
Register for account
Enter mismatch passwords or empty fields

There would be a new account created in the table but no users associated.

Create user "Profile" tab under the "Accounts" section in the nav

We'll keep this page simple for now... just a profile page with:

  • an input for the user's name
  • an input for the user's profile image url (we'll support image upload in a future ticket)

Let's create a new table user_profiles to store this data, with a name string field and a profile_image_url string field, along with a user_id reference to the users table.

Implement these API endpoints:

  • GET /api/profile - fetch the current user's profile
  • PUT /api/profile - update the current user's profile

Cmd + enter to send message

Having to press the send button every time is tedious. We should support cmd + enter and ctrl enter for windows equivalent shortcuts. We shouldn't have enter by default since longer messages you might want multiple lines and you don't want to accidentally send

Figure out how to map Slack users to Papercups users

...so that when we respond from Slack, it knows who to show in the chat widget.

I'm hoping there's a "clever" way we can just match based on email, but if not we may need to set up a little UI to do it manually :/

(currently we just fall back to showing the sender as whoever the user was that set up the Papercups account)

Webex Teams integration

I would like to see (and contribute to) an integration with Webex Teams. Similar to Slack, i think this could be a great connectivity option for many organizations.

[Preview] Setting up Slack

Setting up Slack

If you plan on self-hosting Papercups, you'll need to set up your own Slack app if you want to handle messaging through Slack.

Creating the app

  • Go to https://api.slack.com/apps
  • Click “Create New App”
  • Name it whatever you’d like, and pick the Slack workspace you’d like to test it against

Subscribing to Slack events

  • Go to “Event Subscriptions”
  • Toggle “Enable Events” to “On”
  • Input your webhook URL in the “Request URL” input
    • It should look like https://YOUR_APP_HOST/api/slack/webhook
    • In my case, this was https://alex-papercups-staging.herokuapp.com/api/slack/webhook

  • Subscribe to the message.channels bot event
  • Subscribe to the message.channels user event

Setting up scopes and permissions

  • Go to “OAuth & Permissions”
  • Click the “Install App to Workspace” button to install your app to your test workspace if you haven’t already

  • Add the redirect URL we’ll be using in the dashboard
    • It should look like https://YOUR_APP_HOST/integrations/slack
    • In my case, this was https://alex-papercups-staging.herokuapp.com/integrations/slack

  • Add the bot scopes we’ll be using
    • channels:history
    • channels:manage
    • chat:write
    • chat:write.public
    • incoming-webhook

  • Add the user scopes we’ll be using
    • channels:history

Enabling distribution of your app

  • Set up your app for distribution
  • Under “Basic Information”, go to the “Manage distribution” section and click “Distribute App”

  • Indicate that hard-coded information has been removed from your code
    • (We’ve handled this for you!)

  • Click on “Activate Public Distribution”

Setting up your environment variables

  • In the “Basic Information” section, scroll down to “App Credentials” to get the keys you’ll be using as environment variables

  • Export the following environment variables:
export PAPERCUPS_SLACK_CLIENT_ID='YOUR_CLIENT_ID_HERE'
export REACT_APP_SLACK_CLIENT_ID='YOUR_CLIENT_ID_HERE'
export PAPERCUPS_SLACK_CLIENT_SECRET='YOUR_CLIENT_SECRET_HERE'
  • If you're using Heroku, set the environment variables on the config:
heroku config:set PAPERCUPS_SLACK_CLIENT_ID='YOUR_CLIENT_ID_HERE'
heroku config:set REACT_APP_SLACK_CLIENT_ID='YOUR_CLIENT_ID_HERE'
heroku config:set PAPERCUPS_SLACK_CLIENT_SECRET='YOUR_CLIENT_SECRET_HERE'

Testing

  • Go to the /integrations path in your dashboard
  • Click on "Connect" for Slack

Screen Shot 2020-08-03 at 7 00 57 PM

  • Go through the OAuth flow for your app
  • Select a channel to connect with

Screen Shot 2020-08-03 at 7 01 18 PM

  • If successful, it should take you back to this page:

Screen Shot 2020-08-03 at 7 01 24 PM

  • To test that it works, go to the "Getting started" tab
  • Try sending a message in the widget on the right:

Screen Shot 2020-08-03 at 7 08 58 PM

  • Check Slack to verify you received a message
  • Try sending a reply through Slack

Screen Shot 2020-08-03 at 7 10 32 PM

  • Verify that the reply was received

Screen Shot 2020-08-03 at 7 11 03 PM

Done!

That should be it! Feel free to open an issue if you have any problems getting set up :)

Future pricing model for the hosted version?

Hi papercups!!!
came from HN, and I just LOVE your work
just wanted to say thanks for democratizing chat widgets, really means a lot for the internet community in general honestly

I just wanted to inquire about the pricing model for the hosted version, since I'm looking to migrate from Hubspot.
Is there a general ballpark on how much the hosted version will cost a month for the enterprise?
Thanks!

User Metadata + documentation

Hello again, writing up info from discord convo with Alex.

Use case, Jane Smith has logged into my SASS app, I'd like to be able to pass in the following to the JSON snippet/metadata if possible... guessing this is on your roadmap if this would be possible - #107:

first_name: Jane
email: [email protected]
user_id: 'ff71ef5f-91c9-4971-9619-36dccdb5e055'
subscription_level: pro
team/group/workspace_name: Acme Co
team/group/workspace_id: '4e2aa643-2b92-4f03-8fb8-f5aefe799594
registration_date: 2020-08-12T19:42:22Z

Extra bonus:

  • if current_page/ url was captured when the chat started.

Notes

  • first name could feed into the bot saying "Hello Jane" if she opened the widget.
  • email could be used for #107
  • team/group/workspace & subscription_level could be used for email filtering as part of the emailing functionality
  • registration_date could be used for filtering/cohort building as well.

User Story:

As a client success rep
I want to pre-identify users I'm chatting with
So that I do not have to ask them for baseline context of who they are

Add ability to delete a conversation

For privacy reasons there should be the possibility to delete a conversation from the server.

[Edit from @reichert621]
Before we can fully support this, we'll need to fix some foreign key issues... namely, when a conversation is deleted, we should probably auto-delete all associated messages/slack threads/etc

Include `account_id` in more Ecto (SQL) `where` clauses

For API endpoints that should be secured (e.g. these: https://github.com/papercups-io/papercups/blob/master/lib/chat_api_web/router.ex#L52-L56) we need to make sure we're always limiting the data returned to the current user's account_id

The account id can be accessed on conn.assigns.current_user in each request like so:
https://github.com/papercups-io/papercups/blob/master/lib/chat_api_web/controllers/conversation_controller.ex#L11 (there are probably more idiomatic ways to do that, but this works for now 🤷‍♂️ )

Here's an example of filtering by account_id in one of the contexts: https://github.com/papercups-io/papercups/blob/master/lib/chat_api/messages.ex#L21

Docker deployment?

I have an almost-functioning Dockerfile, happy to contribute it if this is something you are interested in supporting.

Run on a non-default port

I'm trying to run papercups on a different port than 4000. I set the env var PORT the port to 8080, and started the server using mix phx.server, on the prod configuration

When the server starts, I get this error:

root@papercups-684699d878-57j66:/usr/src/app# export PORT=8080
root@papercups-684699d878-57j66:/usr/src/app# mix phx.server
[info] Running ChatApiWeb.Endpoint with cowboy 2.8.0 at :::8080 (http)
[info] Access ChatApiWeb.Endpoint at http://localhost:8080
Something is already running on port 8080.

No matter the port I put in, it fails. If I remove the part of the code that's reading from an env var, and hardcode port 8080, it all works fine.

Any ideas?

Add support for webhooks

Support for some kind of (web)hooks, for example when a chat is initiated and perhaps email has been entered, initiate hook which might return a list of orders from that customer (visible to the agents only, of course).

Or whenever a message is sent/received, a hook could look at the message and provide additional data (a simple regexp on the message might detect order numbers (x characters long and only numbers) which could then provide the agent with a direct URL to the order in the (ecommerce) backend.

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.