1 Star 0 Fork 160

遗忘悠剑 / IM即时聊天-php

forked from Raingad / IM即时聊天-php 
Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README
Apache-2.0

Instant Messaging

Introduce

Raingad-IM is an open source instant communication demo, which needs to be used together with the front and back ends. It is mainly used for learning and communication, and provides you with the development ideas of instant communication. Many functions need to be developed by itself, and the original intention of development is to quickly establish the internal communication system, Intranet communication and community communication.

type url
Front-end source code https://gitee.com/raingad/im-chat-front
Back-end source code https://gitee.com/raingad/im-instant-chat
Web Demo http://im.raingad.com/index.html
H5 Demo http://im.raingad.com/h5
Android Demo https://emoji.raingad.com/file/raingad.apk

Dmeo account:13800000002 password:123456

The ending number can be modified to 2、3、4......18、19、20

Dmeo account:13800000020 password:123456

Supported features

-Supports single chat and group chat, and supports sending emoticons, images, voice, video, and file messages -Single chat supports displaying the status of messages that have been read but not read, and displaying online status -Group chat creation, deletion, group member management, group announcements, group bans, etc -Support for top contacts and message privacy; -Support for setting new message sound reminders and browser notifications -Support administrator to recall group member messages -Support group members cannot add friends to each other -Supports one-on-one audio and video calls (connected to both web and mobile devices, not supported by mini programs) -Supports online preview of files, images, and most media files -Support for mobile devices (H5, APP, and mini programs, some functions are not compatible) -New support for enterprise mode and community mode, with community mode supporting registration and adding friends functions -The app supports online and offline push of single chat messages (requires self application for unipush service) -Support simple backend management, including user management, group management, system settings, etc

Software architecture

Back-end technology stack:thinkphp6+workerman+redis

Front-end technology stack:vue2+Lemon-IMUI+element-UI

Installation

The installation program needs to have some experience in PHP and server operation and maintenance, if not, please join the communication group to contact the author, the author provides paid deployment services!

Preparatory work

You need to install the running environment first. The BAOTA server is recommended. The LNMP architecture is recommended. The following software needs to be installed:

environment version remark Recommended
linux >= 7.0 The following versions were not tested 7.9
nginx >= 1.17 latest
php >= 7.1 incompatible php8 7.3
mysql >= 5.7 Must be 5.7 and above 5.7
redis >= 5.0 7.0

重要操作

  1. PHP needs to install an extension : redis fileinfo

  2. PHP needs to undisable the function : shell_exec proc_open pcntl_exec pcntl_alarm pcntl_fork pcntl_waitpid pcntl_wait pcntl_signal pcntl_signal_dispatch putenv

Source code download

  • Clone to local :
git clone https://gitee.com/raingad/im-instant-chat.git
  • 进入项目目录,执行:
composer install

or

  • 【Recommended】Download the full source code and put it on your own server. Take a look at the (releases) at the top of the gitee project home page and download the latest release in the distribution.

Start installation

  1. Create a website by pointing the site's running directory to the 'public' directory in the project root.

  2. Enable pseudo-static and set the reverse proxy, the following only shows the pseudo-static and reverse proxy configuration of nginx, apache please Baidu or use chatGPT conversion.

location ~* (runtime|application)/{
	return 403;
}
location / {
	if (!-e $request_filename){
		rewrite  ^(.*)$  /index.php?s=$1  last;   break;
	}
}

#Reverse proxy port 8282, no modification required

location /wss
    {
      proxy_pass http://127.0.0.1:8282;
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "Upgrade";
      proxy_set_header X-Real-IP $remote_addr;
    }
  1. If you have a domain name and want to use services such as audio and video calls and voice messaging, you also need to configure a certificate to enable HTTPS. You can use a free 'Let's Encrypt' certificate. If you don't need these services, you can directly use the HTTP protocol, but the functionality will be limited.

  2. Access your IP or domain name to enter the custom installation wizard.

If installation fails

  1. Enter public\sql\database.sql to import the database into your own database.

  2. Enter the project root directory, modify example.env to .env , and modify the corresponding database parameters. Please carefully read the configuration instructions in env.

if you want to save chat files to oss, you need to configure them in the background. Do not modify the environment configuration files after configuration.

Start the message push service

Because the chat software needs to use websockt, so we need to start workerman, the system has built-in corresponding services, you can manage the home page in the background to run services, but the first use needs to be debugged.

  1. Enter the project root directory to run php think worker:gateway start, or run php start.php start to run the message service. Do not use - d during testing. Under windows, run the start_for_ win.bat file in the root directory directly. Since there are many restrictions on the use of Workerman under Windows, it is recommended to use Linux system in formal environment, while windows system is only recommended for development environment.

  2. The message service needs to release port 8282. If you need to modify it, please modify the corresponding parameters in the WORKER section of the environment configuration file. For windows users, please modify port 8282 in [app\worker\start_gateway.php]. The port number needs to be changed according to the situation.

  3. The system uses the domain name as the address of the websocket service directly, so it needs to configure the proxy in the nginx of the website and listen to port 8282. The parameters of the proxy configuration have been written in the pseudo-static.

  4. For more information about the use of workerman, please visit workerman official website official website.

  5. After the deployment, the password for the administrator account is: administrator``123456, and the management entry is located in the lower left corner of the chat interface.

Install deployment Services

The author provides the installation services of the system, including the back-end and front-end deployment to the online, to ensure the perfect operation of the project, 200 yuan per time, the installation service can provide detailed installation tutorials and interface documents, if necessary, you can contact the author!

QQ Communication group

If you have any questions, please leave a message or join our QQ group!

It's not easy to create. Click a star.

QQ Communication group:336921267

ThinkPHP遵循Apache2开源协议发布,并提供免费使用。 版权所有Copyright © 2006-2016 by ThinkPHP (http://thinkphp.cn) All rights reserved。 ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。 Apache Licence是著名的非盈利开源组织Apache采用的协议。 该协议和BSD类似,鼓励代码共享和尊重原作者的著作权, 允许代码修改,再作为开源或商业软件发布。需要满足 的条件: 1. 需要给代码的用户一份Apache Licence ; 2. 如果你修改了代码,需要在被修改的文件中说明; 3. 在延伸的代码中(修改和有源代码衍生的代码中)需要 带有原来代码中的协议,商标,专利声明和其他原来作者规 定需要包含的说明; 4. 如果再发布的产品中包含一个Notice文件,则在Notice文 件中需要带有本协议内容。你可以在Notice中增加自己的 许可,但不可以表现为对Apache Licence构成更改。 具体的协议参考:http://www.apache.org/licenses/LICENSE-2.0 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

About

即时通信聊天应用Raingad-IM后端代码,需要前后端配合使用,可以为企业快速构建内部聊天应用、团队私密聊天,也可以作为社区聊天。支持文本、文件、图片、语音、视频等消息格式,还支持点对点音视频聊天,支持web端、桌面端和uniapp,uniapp可以打包成小程序、h5、APP。 expand collapse
PHP
Apache-2.0
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
PHP
1
https://gitee.com/ieras/im-instant-chat.git
git@gitee.com:ieras/im-instant-chat.git
ieras
im-instant-chat
IM即时聊天-php
master

Search