You may use the OpenIM source code to create compiled versions not originally produced by OpenIM under one of the following two licensing options:
- This option is governed by the Free Software Foundation's GPL v3.0.
- Usage is subject to certain exceptions as outlined in this policy.
- Obtain a commercial license by contacting OpenIM.
- For more details and licensing inquiries, please email 📧 [email protected].
- This repository implement a business system, which consists of two parts: User related function and background management function
- The business system depends on the api of the im system (open-im-server repository) and implement various functions by calling the api of the im system
- User related part includes some regular functions like user login, user register, user info update, etc.
- Background management provides api for admin to manage the im system containing functions like user management, message mangement,group management,etc.
Note: You can get started quickly with OpenIM Chat.
git clone https://github.com/openimsdk/chat openim-chat && export openim-chat=$(pwd)/openim-chat && cd $openim-chat && make
You can deploy OpenIM Chat in two ways, either from source (which requires openIM-server to be installed) or with docker compose
Here's how to deploy from source code:
If you wish to deploy chat, then you should first install and deploy OpenIM, this open-im-server repository
First, install openim-server in a new directory or location repository
git clone -b release-v3.4 https://github.com/OpenIMSDK/Open-IM-Server.git openim && export openim=$(pwd)/openim && cd $openim
sudo docker compose up -d
Setting configuration items:
make init
Then modify the configuration file
config/config.yaml
according to your needs Note: If you want to use the mysql database, you need to modify the mysql configuration item in the configuration file. If you want to use the mongo database, you need to modify the mongo configuration item in the configuration file
Then go back to the chat directory, Installing Chat
Start Mysql:
The newer versions of OpenIM remove the Mysql component, which requires an additional Mysql installation if you want to deploy chat
docker run -d \
--name mysql4 \
-p 13306:3306 \
-p 3306:33060 \
-v "$(pwd)/components/mysql/data:/var/lib/mysql" \
-v "/etc/localtime:/etc/localtime" \
-e MYSQL_ROOT_PASSWORD="openIM123" \
--restart always \
mysql:5.7
Install Chat:
$ make build
$ make start
$ make check
Note: You can get started quickly with chat.
Note: We need to run the backend server first
$ make build
# OR build Specifying binary
$ make build BINS=admin-api
# OR build multiarch
$ make build-multiarch
$ make build-multiarch BINS="admin-api"
# OR use scripts build source code
$ ./scripts/build_all.sh
Be good at using Makefile, it can ensure the quality of your project.
Usage: make <TARGETS> ...
Targets:
all Build all the necessary targets. 🏗️
build Build binaries by default. 🛠️
go.build Build the binary file of the specified platform. 👨💻
build-multiarch Build binaries for multiple platforms. 🌍
tidy tidy go.mod 📦
style Code style -> fmt,vet,lint 🎨
fmt Run go fmt against code. ✨
vet Run go vet against code. 🔍
generate Run go generate against code and docs. ✅
lint Run go lint against code. 🔎
test Run unit test ✔️
cover Run unit test with coverage. 🧪
docker-build Build docker image with the manager. 🐳
docker-push Push docker image with the manager. 🔝
docker-buildx-push Push docker image with the manager using buildx. 🚢
copyright-verify Validate boilerplate headers for assign files. 📄
copyright-add Add the boilerplate headers for all files. 📝
swagger Generate swagger document. 📚
serve-swagger Serve swagger spec and docs. 🌐
clean Clean all builds. 🧹
help Show this help info. ℹ️
Note: It's highly recommended that you run
make all
before committing your code. 🚀
$ make all
$ make start_all
# OR use scripts start
$ ./scripts/start_all.sh
$ make check
# OR use scripts check
$ ./scripts/check_all.sh --print-screen
$ make stop
# OR use scripts stop
$ ./scripts/stop_all.sh
Contributions to this project are welcome! Please see CONTRIBUTING.md for details.
We want anyone to get involved in our community, we offer gifts and rewards, and we welcome you to join us every Thursday night.
We take notes of each biweekly meeting in GitHub discussions, and our minutes are written in Google Docs.
The user case studies page includes the user list of the project. You can leave a 📝comment to let us know your use case.
chat is licensed under the Apache 2.0 license. See LICENSE for the full license text.