当前位置: 首页 > 软件库 > Web应用开发 > >

chat-app

MERN Stack Based Chat Application
授权协议 Readme
开发语言 JavaScript
所属分类 Web应用开发
软件类型 开源软件
地区 不详
投 递 者 沈博达
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

MERN: Full-stack Chat Application

Introduction

The MERN stack which consists of Mongo DB, Express.js, Node.js, and React.js is a popular stack for building full-stack web-based applications because of its simplicity and ease of use. In recent years, with the explosive popularity and the growing maturity of the JavaScript ecosystem, the MERN stack has been the goto stack for a large number of web applications. This stack is also highly popular among newcomers to the JS field because of how easy it is to get started with this stack.

This repo consists of a Chat Application built with the MERN stack. I built this sometime back when I was trying to learn the stack and I have left it here for anyone new to the stack so that they can use this repo as a guide.

This is a full-stack chat application that can be up and running with just a few steps.Its frontend is built with Material UI running on top of React.The backend is built with Express.js and Node.js.Real-time message broadcasting is developed using Socket.IO.

Features

This application provides users with the following features

  • Authentication using JWT Tokens
  • A Global Chat which can be used by anyone using the application to broadcast messages to everyone else.
  • A Private Chat functionality where users can chat with other users privately.
  • Real-time updates to the user list, conversation list, and conversation messages

Screenshots

Global Chat

Global Chat

Private Chat

Private Chat

Login

Login

Register

Register

How to use

You can have this application up and running with just a few steps because it has both the frontend and the backend in a single repository. Follow the steps below to do so.

  1. Clone this repo
  2. Once you have the repo, you need to install its dependencies. So using a terminal, move into the root directory of the project and execute npm install to install the dependencies of the Node.js server and then run npm run client-install to install the dependencies of the frontend. The second command is a custom command that I wrote to simplify the installation process.
  3. This application uses MongoDB as its Database. So make sure you have it installed. You can find detailed guides on how to do so here. Once installed, make sure that your local MongoDB server is not protected by any kind of authentication. If there is authentication involved, make sure you edit the mongoURI in the config/keys.js file.
  4. Finally, all you have to do is simply run npm run dev. If this command fails, try installing the package concurrently globally by running npm install -g concurrently and then running the dev command.
  5. The frontend of the application will be automatically opened in your web browser and you can test it away.

Things to note

Disclaimer

This repository contains beginner level code and might contain some things I wish to change or remove. I have not maintained this for quite some time, but now I am trying to slowly fix these issues. You are welcome to open issues if you find any and I will accept PR's as well.

Cheers �� �� �� ��

  • 一,简介基本原理:启动ChatAPP时,同时启动ServerSocket,不断循环接收,相当于一个简易的服务器。用于接收别的客户端发过来的信息,于此同时布局客户端,使其能够发送信息到别的ChatAPP。 二,实现 1,ServerSocket的创建和实现 private ServerSocket serverSocket = null; /* 服务器端接收数据 需要注意以下

  • 一,简介 创建Socket,连接服务器地址和端口号,进行发送信息。 二,实现 启动线程发送信息 data = et.getText().toString(); if(data == null){ Toast.makeText(MainActivity.this,"please input Sending Data", To

 相关资料
  • NFC是一个用JMS实现,稳定可靠,分布式的聊天服务器与客户端。它的特点包括:内置负载平衡和HTTP Tunneling支持。利用负载平衡这个特点能够形成一个分布式的服务器网络,类似于一个IRC网络。

  • workerman-chat是一个以workerman作为服务器容器,使用PHP开发的基于Websocket协议的一个可分布式部署的聊天室框架。 workerman-chat采用gateway workers 进程模型。gateway只负责网络IO,全异步非阻塞,每个gateway进程都可以同时接受上万客户端连接。 workers采用的是PHP开发者所熟悉的同步模型,并提供了开发者基本的接口 on

  • Mogo Chat是一个自托管应用程序,运行在自己的Secret Server上。除此之外它还提供一个移动友好型UI,这样你就可以放心的在你的手机上使用Mogo Chat了。     Mogo Chat 主要是由 elixir、ember.js、PostgreSQL 和 Phoenix Framework 驱动。如果你对这些技术很感兴趣的话,那么Mogo Chat 将是一个很棒的实时交流平台参考案

  • Internal Chat是一个包括服务器端与客户端的即时消息聊天系统。Internal Chat完全采用Java开发,使用PostgreSQL作为DBMS,Jetty作为内嵌http服务器,支持SSL等。

  • Ajax Chat 是一种用 JavaScript、PHP 和 MySQL 实现的开源 Web 聊天软件,在 GNU Affero General Public License 下发布。您可以使用自己的代码定制聊天的外观和感受以及它向服务器上的数据库发送消息的方式。 Ajax Chat 有两种版本 — 独立版和论坛集成版。您可以随心所欲地添加或减少频道。只要不影响现有资源,在所托管的环境内就没有最

  • Claros Chat是一个完全基于Ajax的web即时消息Jabber客户端。界面简洁,漂亮看起来像一个桌面应用程序,兼容任何Jabber服务器包括 Google Talk。支持主流的浏览器比如:Explorer,Firefox,Safari,Mozilla等。你可以利用这个客户端与Jabber服务器来架设自己的聊天网络。如果你的Jabber服务器有安装相应的网关,它还可以连到MSN,AOL,I

  • ssh-chat 是一个使用 Go 语言编写的定制 SSH 服务器,当你连到该服务器时就会进入聊天模式,就好像以前的终端 BBS 系统一样。 你可以通过下面命令来尝试该服务: $ ssh chat.shazow.net 使用方法: Usage:  ssh-chat [OPTIONS]Application Options:  -v, --verbose   Show verbose logging

  • 匿名聊天随时创建聊天室,无差别对待。