Code Monkey home page Code Monkey logo

chat's Introduction

Chat

使用swoole + vue + restful api实现的在线IM,包括一个http服务,一个websocket服务
demo
测试账号: zhou 密码:123456 持续更新中

功能

  • 注册,登陆,登陆状态维持
  • 重复登陆处理,重复连接处理(同一浏览器打开多个)
  • 头像修改
  • 好友聊天,添加,删除好友
  • 群组聊天,创建,退出群组
  • 聊天记录保存,可上拉加载查看,删除本方聊天记录(不影响对方)
  • 上下线通知,未读消息通知,消息推送
  • 链接消息处理
  • 发送图片
  • 发送文件

技术栈

  • websocket 负责推送转发消息
  • http 负责需要回执的相关操作
  • restful api
  • 依赖注入,控制反转
  • redis,mysql长连接
  • redis 发布订阅
  • Vue.js + vuex + webpack + vue-router + es6 + element-ui

Requirement

  1. PHP >= 7.0
  2. Composer
  3. swoole 扩展
  4. redis 拓展
  5. node.js(前端开发环境下需要)
  6. webpack(前端开发环境下需要)

Start

导入sql.sql 修改配置redis,db配置参数

// 启动后端服务
composer install
cd server\http 
php run.php 
cd server\ws
php run.php
// 启动前端
cd webroot
npm install webpack -g
npm i
npm run dev

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.