Giter Site home page Giter Site logo

liuxzhi / chat Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openimsdk/chat

0.0 1.0 0.0 1.44 MB

A business server that includes user registration and login, deployed together with Open-IM-Server, can be used to set up a chat product.

Home Page: https://openim.io

License: GNU General Public License v3.0

Shell 9.12% Go 82.99% Makefile 4.71% Smarty 1.51% Batchfile 0.14% Dockerfile 1.53%

chat's Introduction

openim-chat

πŸ“„ License Options for OpenIM Source Code

You may use the OpenIM source code to create compiled versions not originally produced by OpenIM under one of the following two licensing options:

1. GNU General Public License v3.0 (GPLv3) πŸ†“

  • This option is governed by the Free Software Foundation's GPL v3.0.
  • Usage is subject to certain exceptions as outlined in this policy.

2. Commercial License πŸ’Ό

  • Obtain a commercial license by contacting OpenIM.
  • For more details and licensing inquiries, please email πŸ“§ [email protected].

🧩 Awesome features

  1. This repository implement a business system, which consists of two parts: User related function and background management function
  2. 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
  3. User related part includes some regular functions like user login, user register, user info update, etc.
  4. Background management provides api for admin to manage the im system containing functions like user management, message mangement,group management,etc.

πŸ›« Quick start

Note: You can get started quickly with OpenIM Chat.

πŸ“¦ Installation

git clone https://github.com/openimsdk/chat openim-chat && export openim-chat=$(pwd)/openim-chat && cd $openim-chat && make

Developing chat

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.5 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

Starting MySQL:

Recent OpenIM versions have discontinued the MySQL component, necessitating a separate MySQL installation for chat deployment.

docker run -d \
  --name mysql \
  -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

MySQL Compatibility Note:

The MySQL version 5.7 primarily supports the linux/amd64 architecture. Users operating on Mac or other architectures, or those with specific version requirements for MySQL, can opt for the latest version of the open-source MariaDB. MariaDB is compatible with MySQL and can be a suitable alternative.

docker run -d \
  --name mysql \
  -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 \
  mariadb:10.6

If you want to use a local or remote database, edit the config/config.yaml section after the initial configuration

Install Chat:

$ make build
$ make start
$ make check

πŸ›« Quick start

Note: You can get started quickly with chat.

πŸš€ Run

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

πŸ“– Contributors get up to speed

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

Chat Start

$ make start_all
# OR use scripts start
$ ./scripts/start-all.sh

Chat Detection

$ make check
# OR use scripts check
$ ./scripts/check-all.sh --print-screen

Chat Stop

$ make stop
# OR use scripts stop
$ ./scripts/stop-all.sh

Add REST RPC API

Please refer to "How to add REST RPC API for OpenIM Chat".

Contributing

Contributions to this project are welcome! Please see CONTRIBUTING.md for details.

Community Meetings

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.

Who are using open-im-server

The user case studies page includes the user list of the project. You can leave a πŸ“comment to let us know your use case.

avatar

🚨 License

chat is licensed under the Apache 2.0 license. See LICENSE for the full license text.

chat's People

Contributors

withchao avatar cubxxw avatar luhaoling avatar hanzhixiao avatar andrewzuo01 avatar skiffer-git avatar dependabot[bot] avatar cncsmonster avatar polarisht avatar dangiant avatar fgadvancer avatar chenqinghe avatar longyuqing112 avatar mrwenhui avatar wangchuxiao-dev avatar ouyangdage avatar

Watchers

 avatar

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.