Coder Social home page Coder Social logo

valdesche / whatchat Goto Github PK

View Code? Open in Web Editor NEW
39.0 7.0 15.0 6.88 MB

A web chat application clone of Whatsapp web using Elixir / Phoenix, VueJs and PostgreSQL.

Home Page: https://www.youtube.com/watch?v=Kha_Y7a4yrs

License: BSD 3-Clause "New" or "Revised" License

Elixir 37.96% JavaScript 16.90% HTML 0.39% Vue 44.73% Procfile 0.01%
elixir-lang elixir-phoenix elixir-programming-language whatchat phoenix-framework genserver supervisor-worker vuejs vue-router phoenix-server

whatchat's Introduction

Build Status codecov License Heroku

WhatChat

A WhatsApp web simple clone using Elixir/Phoenix, VueJs and PostgreSQL.

Screenshots

Screenshot

LIVE DEMO : https://whatchatapp.herokuapp.com/

VIDEO DEMO v0: https://www.youtube.com/watch?v=Kha_Y7a4yrs

Requirements

  • Inotify-tools (see the following guide )
  • Erlang 24.0
  • Elixir 1.11.4
  • Nodejs 14.16.1

Installation

To start your Phoenix server:

  • Install dependencies with mix deps.get
  • Create and migrate your database with mix ecto.setup
  • Install Node.js dependencies with cd assets && npm install
  • Start Phoenix endpoint with mix phx.server

Features

  • User authentication
  • User registration
  • 'Friends'/Groups Chat messages
  • Profile settings

Now you can visit localhost:4000 from your browser.

Ready to run in production? Please check our deployment guides.

Contacts

Get in touch with the authors

Learn more

whatchat's People

Contributors

dependabot[bot] avatar faymir avatar valdesche 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

whatchat's Issues

Error during WebSocket handshake: Unexpected response code: 403

Websocket connection failled in production while trying o initialize it.

WebSocket connection to 'wss://whatchatapp.herokuapp.com/socket/websocket?token=SFMyNTY.g3QAAAACZAAEZGF0YWEBZAAGc2lnbmVkbgYAUdXLhW8B.6kYNw64gpMJ-wcJZzXAq75kbBopqd9ovzgZLXk0dWiw&vsn=2.0.0' failed: Error during WebSocket handshake: Unexpected response code: 403

Here is the error log message :
Origin of the request: https://whatchatapp.herokuapp.com 2020-01-08T15:40:53.769584+00:00 app[web.1]: 2020-01-08T15:40:53.769585+00:00 app[web.1]: This happens when you are attempting a socket connection to 2020-01-08T15:40:53.769587+00:00 app[web.1]: a different host than the one configured in your config/ 2020-01-08T15:40:53.769588+00:00 app[web.1]: files. For example, in development the host is configured 2020-01-08T15:40:53.769589+00:00 app[web.1]: to "localhost" but you may be trying to access it from 2020-01-08T15:40:53.769591+00:00 app[web.1]: "127.0.0.1". To fix this issue, you may either: 2020-01-08T15:40:53.769592+00:00 app[web.1]: 2020-01-08T15:40:53.769594+00:00 app[web.1]: 1. update [url: [host: ...]] to your actual host in the 2020-01-08T15:40:53.769595+00:00 app[web.1]: config file for your current environment (recommended) 2020-01-08T15:40:53.769596+00:00 app[web.1]: 2020-01-08T15:40:53.769597+00:00 app[web.1]: 2. pass the :check_origin option when configuring your 2020-01-08T15:40:53.769599+00:00 app[web.1]: endpoint or when configuring the transport in your 2020-01-08T15:40:53.769600+00:00 app[web.1]: UserSocket module, explicitly outlining which origins 2020-01-08T15:40:53.769601+00:00 app[web.1]: are allowed: 2020-01-08T15:40:53.769603+00:00 app[web.1]: 2020-01-08T15:40:53.769604+00:00 app[web.1]: check_origin: ["https://example.com", 2020-01-08T15:40:53.769606+00:00 app[web.1]: "//another.com:888", "//other.com"] ....

Serialize-javascript security vulnerability

moderate severity
Vulnerable versions: < 2.1.1
Patched version: 2.1.1
regular expressions Cross-Site Scripting (XSS) vulnerability
Impact
Affected versions of this package are vulnerable to Cross-site Scripting (XSS). It does not properly mitigate against unsafe characters in serialized regular expressions.

This vulnerability is not affected on Node.js environment since Node.js's implementation of RegExp.prototype.toString() backslash-escapes all forward slashes in regular expressions.

If serialized data of regular expression objects are used in an environment other than Node.js, it is affected by this vulnerability.

Patches
This was patched in v2.1.1.

(Phoenix.Router.NoRouteError) no route found for GET /css/app.css (WhatChatWeb.Router)

I deploy locally the application. login and logout is working but other functions are not working. i see that the app.css is not found on debug mode.

[debug] ** (Phoenix.Router.NoRouteError) no route found for GET /css/app.css (WhatChatWeb.Router)
(whatChat 0.1.0) lib/whatChat_web/router.ex:1: WhatChatWeb.Router.match_route/4
(whatChat 0.1.0) lib/phoenix/router.ex:304: WhatChatWeb.Router.call/2
(whatChat 0.1.0) lib/whatChat_web/endpoint.ex:1: WhatChatWeb.Endpoint.plug_builder_call/2
(whatChat 0.1.0) lib/plug/debugger.ex:122: WhatChatWeb.Endpoint."call (overridable 3)"/2
(whatChat 0.1.0) lib/whatChat_web/endpoint.ex:1: WhatChatWeb.Endpoint.call/2
(phoenix 1.4.0) lib/phoenix/endpoint/cowboy2_handler.ex:34: Phoenix.Endpoint.Cowboy2Handler.init/2
(cowboy 2.6.0) c:/Users/Dell/Documents/GitHub/WhatChat/deps/cowboy/src/cowboy_handler.erl:41: :cowboy_handler.execute/2
(cowboy 2.6.0) c:/Users/Dell/Documents/GitHub/WhatChat/deps/cowboy/src/cowboy_stream_h.erl:296: :cowboy_stream_h.execute/3
(cowboy 2.6.0) c:/Users/Dell/Documents/GitHub/WhatChat/deps/cowboy/src/cowboy_stream_h.erl:274: :cowboy_stream_h.request_process/3
(stdlib 3.8) proc_lib.erl:249: :proc_lib.init_p_do_apply/3

[info] GET /accounts/me
[debug] Processing with WhatChatWeb.SessionController.ping/2
Parameters: %{}
Pipelines: [:api]
[info] Sent 200 in 0â”Ŧ╡s
[info] GET /images/svg-icons/message.svg
[debug] ** (Phoenix.Router.NoRouteError) no route found for GET /images/svg-icons/message.svg (WhatChatWeb.Router)
(whatChat 0.1.0) lib/whatChat_web/router.ex:1: WhatChatWeb.Router.match_route/4
(whatChat 0.1.0) lib/phoenix/router.ex:304: WhatChatWeb.Router.call/2
(whatChat 0.1.0) lib/whatChat_web/endpoint.ex:1: WhatChatWeb.Endpoint.plug_builder_call/2
(whatChat 0.1.0) lib/plug/debugger.ex:122: WhatChatWeb.Endpoint."call (overridable 3)"/2
(whatChat 0.1.0) lib/whatChat_web/endpoint.ex:1: WhatChatWeb.Endpoint.call/2
(phoenix 1.4.0) lib/phoenix/endpoint/cowboy2_handler.ex:34: Phoenix.Endpoint.Cowboy2Handler.init/2
(cowboy 2.6.0) c:/Users/Dell/Documents/GitHub/WhatChat/deps/cowboy/src/cowboy_handler.erl:41: :cowboy_handler.execute/2
(cowboy 2.6.0) c:/Users/Dell/Documents/GitHub/WhatChat/deps/cowboy/src/cowboy_stream_h.erl:296: :cowboy_stream_h.execute/3
(cowboy 2.6.0) c:/Users/Dell/Documents/GitHub/WhatChat/deps/cowboy/src/cowboy_stream_h.erl:274: :cowboy_stream_h.request_process/3
(stdlib 3.8) proc_lib.erl:249: :proc_lib.init_p_do_apply/3

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.