Skip to content

Commit 24c2946

Browse files
committed
feat: init project
0 parents  commit 24c2946

File tree

201 files changed

+18333
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

201 files changed

+18333
-0
lines changed

Diff for: .bundle/config

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BUNDLE_PATH: "vendor/bundle"
2+
BUNDLE_FORCE_RUBY_PLATFORM: 1

Diff for: .eslintrc.js

+83
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
module.exports = {
2+
root: true,
3+
extends: [
4+
"@react-native",
5+
"airbnb",
6+
"eslint:recommended",
7+
"airbnb/hooks",
8+
"airbnb-typescript",
9+
"plugin:@typescript-eslint/recommended",
10+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
11+
"plugin:prettier/recommended",
12+
"plugin:import/recommended",
13+
"plugin:react/recommended",
14+
"plugin:react/jsx-runtime",
15+
],
16+
parser: "@typescript-eslint/parser",
17+
ignorePatterns: ["plugins/**/*", "metro.config.js"],
18+
parserOptions: {
19+
ecmaFeatures: {
20+
jsx: true,
21+
},
22+
ecmaVersion: "latest",
23+
sourceType: "module",
24+
tsconfigRootDir: ".",
25+
project: ["./tsconfig.json"],
26+
},
27+
settings: {
28+
"import/resolver": {
29+
node: {
30+
extensions: [".ts", ".tsx"],
31+
},
32+
typescript: {},
33+
},
34+
react: {
35+
version: "18.x",
36+
},
37+
},
38+
rules: {
39+
"consistent-return": "off",
40+
"react-native/no-inline-styles": "off",
41+
"react/no-unstable-nested-components": "off",
42+
"@typescript-eslint/ban-ts-comment": "off",
43+
"no-case-declarations": "off",
44+
"no-param-reassign": "off",
45+
"prefer-destructuring": "off",
46+
"@typescript-eslint/no-unsafe-call": "off",
47+
"@typescript-eslint/no-unsafe-member-access": "off",
48+
"@typescript-eslint/no-unsafe-assignment": "off",
49+
"react/require-default-props": "off",
50+
"react/function-component-definition": "off",
51+
"import/no-cycle": "off",
52+
"no-console": "off",
53+
"@typescript-eslint/no-misused-promises": "off",
54+
"@typescript-eslint/no-floating-promises": "off",
55+
"@typescript-eslint/no-unused-vars": "error",
56+
"global-require": 0,
57+
"react-hooks/exhaustive-deps": "off",
58+
"object-curly-spacing": ["error", "always"],
59+
"array-bracket-spacing": ["error", "never"],
60+
"react/default-props-match-prop-types": ["error"],
61+
"react/sort-prop-types": ["error"],
62+
"react/no-array-index-key": "off",
63+
"no-tabs": "off",
64+
"no-void": "off",
65+
"react/jsx-props-no-spreading": "off",
66+
"import/prefer-default-export": "off",
67+
"import/no-extraneous-dependencies": ["error", { devDependencies: true }],
68+
"react/display-name": "off",
69+
"prettier/prettier": [
70+
"error",
71+
{
72+
semi: true,
73+
trailingComma: "all",
74+
printWidth: 128,
75+
endOfLine: "lf",
76+
tabWidth: 2,
77+
useTabs: false,
78+
singleQuote: false,
79+
arrowParens: "always",
80+
},
81+
],
82+
},
83+
};

Diff for: .gitignore

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# OSX
2+
#
3+
.DS_Store
4+
5+
# Xcode
6+
#
7+
build/
8+
*.pbxuser
9+
!default.pbxuser
10+
*.mode1v3
11+
!default.mode1v3
12+
*.mode2v3
13+
!default.mode2v3
14+
*.perspectivev3
15+
!default.perspectivev3
16+
xcuserdata
17+
*.xccheckout
18+
*.moved-aside
19+
DerivedData
20+
*.hmap
21+
*.ipa
22+
*.xcuserstate
23+
ios/.xcode.env.local
24+
25+
# Android/IntelliJ
26+
#
27+
build/
28+
.idea
29+
.gradle
30+
local.properties
31+
*.iml
32+
*.hprof
33+
.cxx/
34+
*.keystore
35+
!debug.keystore
36+
37+
# node.js
38+
#
39+
node_modules/
40+
npm-debug.log
41+
yarn-error.log
42+
43+
# fastlane
44+
#
45+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
46+
# screenshots whenever they are needed.
47+
# For more information about the recommended setup visit:
48+
# https://docs.fastlane.tools/best-practices/source-control/
49+
50+
**/fastlane/report.xml
51+
**/fastlane/Preview.html
52+
**/fastlane/screenshots
53+
**/fastlane/test_output
54+
55+
# Bundle artifact
56+
*.jsbundle
57+
58+
# Ruby / CocoaPods
59+
/ios/Pods/
60+
/vendor/bundle/
61+
62+
# Temporary files created by Metro to check the health of the file watcher
63+
.metro-health-check*
64+
65+
# testing
66+
/coverage

Diff for: .prettierrc.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"semi": true,
3+
"trailingComma": "all",
4+
"printWidth": 128,
5+
"tabWidth": 2,
6+
"useTabs": false,
7+
"singleQuote": false,
8+
"endOfLine": "lf",
9+
"arrowParens": "always"
10+
}

Diff for: .watchmanconfig

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

Diff for: Gemfile

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
source 'https://rubygems.org'
2+
3+
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4+
ruby ">= 2.6.10"
5+
6+
# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
7+
# bound in the template on Cocoapods with next React Native release.
8+
gem 'cocoapods', '>= 1.13', '< 1.15'
9+
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'

Diff for: Gemfile.lock

+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
CFPropertyList (3.0.7)
5+
base64
6+
nkf
7+
rexml
8+
activesupport (6.1.7.7)
9+
concurrent-ruby (~> 1.0, >= 1.0.2)
10+
i18n (>= 1.6, < 2)
11+
minitest (>= 5.1)
12+
tzinfo (~> 2.0)
13+
zeitwerk (~> 2.3)
14+
addressable (2.8.6)
15+
public_suffix (>= 2.0.2, < 6.0)
16+
algoliasearch (1.27.5)
17+
httpclient (~> 2.8, >= 2.8.3)
18+
json (>= 1.5.1)
19+
atomos (0.1.3)
20+
base64 (0.2.0)
21+
claide (1.1.0)
22+
cocoapods (1.14.3)
23+
addressable (~> 2.8)
24+
claide (>= 1.0.2, < 2.0)
25+
cocoapods-core (= 1.14.3)
26+
cocoapods-deintegrate (>= 1.0.3, < 2.0)
27+
cocoapods-downloader (>= 2.1, < 3.0)
28+
cocoapods-plugins (>= 1.0.0, < 2.0)
29+
cocoapods-search (>= 1.0.0, < 2.0)
30+
cocoapods-trunk (>= 1.6.0, < 2.0)
31+
cocoapods-try (>= 1.1.0, < 2.0)
32+
colored2 (~> 3.1)
33+
escape (~> 0.0.4)
34+
fourflusher (>= 2.3.0, < 3.0)
35+
gh_inspector (~> 1.0)
36+
molinillo (~> 0.8.0)
37+
nap (~> 1.0)
38+
ruby-macho (>= 2.3.0, < 3.0)
39+
xcodeproj (>= 1.23.0, < 2.0)
40+
cocoapods-core (1.14.3)
41+
activesupport (>= 5.0, < 8)
42+
addressable (~> 2.8)
43+
algoliasearch (~> 1.0)
44+
concurrent-ruby (~> 1.1)
45+
fuzzy_match (~> 2.0.4)
46+
nap (~> 1.0)
47+
netrc (~> 0.11)
48+
public_suffix (~> 4.0)
49+
typhoeus (~> 1.0)
50+
cocoapods-deintegrate (1.0.5)
51+
cocoapods-downloader (2.1)
52+
cocoapods-plugins (1.0.0)
53+
nap
54+
cocoapods-search (1.0.1)
55+
cocoapods-trunk (1.6.0)
56+
nap (>= 0.8, < 2.0)
57+
netrc (~> 0.11)
58+
cocoapods-try (1.2.0)
59+
colored2 (3.1.2)
60+
concurrent-ruby (1.2.3)
61+
escape (0.0.4)
62+
ethon (0.16.0)
63+
ffi (>= 1.15.0)
64+
ffi (1.16.3)
65+
fourflusher (2.3.1)
66+
fuzzy_match (2.0.4)
67+
gh_inspector (1.1.3)
68+
httpclient (2.8.3)
69+
i18n (1.14.4)
70+
concurrent-ruby (~> 1.0)
71+
json (2.7.2)
72+
minitest (5.22.3)
73+
molinillo (0.8.0)
74+
nanaimo (0.3.0)
75+
nap (1.1.0)
76+
netrc (0.11.0)
77+
nkf (0.2.0)
78+
public_suffix (4.0.7)
79+
rexml (3.2.6)
80+
ruby-macho (2.5.1)
81+
typhoeus (1.4.1)
82+
ethon (>= 0.9.0)
83+
tzinfo (2.0.6)
84+
concurrent-ruby (~> 1.0)
85+
xcodeproj (1.24.0)
86+
CFPropertyList (>= 2.3.3, < 4.0)
87+
atomos (~> 0.1.3)
88+
claide (>= 1.0.2, < 2.0)
89+
colored2 (~> 3.1)
90+
nanaimo (~> 0.3.0)
91+
rexml (~> 3.2.4)
92+
zeitwerk (2.6.13)
93+
94+
PLATFORMS
95+
ruby
96+
97+
DEPENDENCIES
98+
activesupport (>= 6.1.7.5, < 7.1.0)
99+
cocoapods (>= 1.13, < 1.15)
100+
101+
RUBY VERSION
102+
ruby 2.6.10p210
103+
104+
BUNDLED WITH
105+
1.17.2

Diff for: LICENSE

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
OpenIM Open Source License
2+
This repository is licensed under the GNU Affero General Public License version 3 (AGPL-3.0) and is subject to the following additional terms:
3+
1. Commercial Use
4+
1.1 Prohibition of Commercial Use
5+
This repository and its contents may not be used for any commercial purposes. If you wish to use OpenIM for commercial purposes, you must obtain a commercial license from the producer.
6+
1.2 Commercial License Application
7+
For commercial licensing, please contact [email protected]. Commercial licenses will be tailored to your specific needs and use cases to ensure that you use OpenIM legally and compliantly.
8+
1.3 License After Commercial Authorization
9+
If you have paid the relevant commercial licensing fees to the producer, you may use OpenIM in accordance with the terms of the commercial license without adhering to the provisions of AGPL-3.0. The commercial license grants you the rights to use, modify, and distribute OpenIM under specific conditions detailed in the commercial licensing agreement.
10+
2. LOGO and Copyright Information
11+
2.1 Protection of LOGO and Copyright Information
12+
During the use of this repository, you may not remove, modify, or hide the LOGO or copyright information within the OpenIM console or applications.
13+
2.2 LOGO Definition
14+
All unified text or icons bearing the words OpenIM or OpenIMSDK within the user interfaces of this repository are collectively referred to as the LOGO. This includes, but is not limited to, textual and iconographic identifiers in software interfaces, documentation, and promotional materials.
15+
3. Contributor Agreement
16+
As a contributor, you agree to the following terms:
17+
3.1 Right to Adjust the Agreement
18+
The producer reserves the right to adjust the strictness or leniency of the open-source agreement as necessary to ensure that the agreement aligns with the development and needs of the project.
19+
3.2 Commercial Use of Code
20+
The code you contribute may be used for commercial purposes, including but not limited to cloud business operations. By contributing, you agree that the producer has the right to use your contributions for commercial purposes without additional compensation or authorization.
21+
4. Other Terms
22+
4.1 Compliance with AGPL-3.0
23+
Except for the specific conditions mentioned above, all other rights and restrictions are governed by the GNU Affero General Public License version 3 (AGPL-3.0). For detailed information about the AGPL-3.0 license, please refer to the GNU AGPL-3.0 License.
24+
4.2 Patent Protection
25+
The interactive design of this product is protected by design patents. Any unauthorized copying, modification, or distribution of the interactive design constitutes infringement and will be subject to legal action.
26+
5. Disclaimer
27+
This software is provided "as is," without any form of express or implied warranty, including but not limited to warranties of merchantability, fitness for a particular purpose, or non-infringement. Users assume all risks associated with the use of this software.
28+
6. Contact Information
29+
For any licensing-related questions or to obtain a commercial license, please contact [email protected].
30+
31+
GNU Affero General Public License Version 3 (AGPL-3.0)
32+
© 2024 OpenIMSDK
33+
34+
This program is free software: you can redistribute it and/or modify
35+
it under the terms of the GNU Affero General Public License as
36+
published by the Free Software Foundation, either version 3 of the
37+
License, or (at your option) any later version.
38+
39+
This program is distributed in the hope that it will be useful,
40+
but WITHOUT ANY WARRANTY; without even the implied warranty of
41+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
42+
GNU Affero General Public License for more details.
43+
44+
You should have received a copy of the GNU Affero General Public License
45+
along with this program. If not, see <https://www.gnu.org/licenses/>.

Diff for: README.md

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<p align="center">
2+
<a href="https://www.openim.online">
3+
<img src="./docs/images/openim-logo.gif" width="60%" height="30%"/>
4+
</a>
5+
</p>
6+
7+
# OpenIM React Native Demo 💬💻
8+
9+
<p>
10+
<a href="https://docs.openim.io/">OpenIM Docs</a>
11+
12+
<a href="https://github.com/openimsdk/open-im-server">OpenIM Server</a>
13+
14+
<a href="https://github.com/openimsdk/openim-sdk-core">openim-sdk-core</a>
15+
16+
<a href="https://github.com/openimsdk/open-im-sdk-reactnative">open-im-sdk-reactnative</a>
17+
</p>
18+
19+
<br>
20+
21+
OpenIM React Native Demo is an open-source instant messaging application built on OpenIM SDK React Native, OpenIM Server, and React Native. It demonstrates how to quickly integrate instant messaging capabilities into any web app using OpenIM.
22+
23+
## Tech Stack 🛠️
24+
25+
- This is a [`ReactNative`](https://reactnative.dev/) project.
26+
- App is built with [open-im-sdk-reactnative](https://github.com/openimsdk/open-im-sdk-reactnative) library.
27+
28+
## Dev Setup 🛠️
29+
30+
> It is recommended to use node version 16.x-20.x.
31+
32+
Follow these steps to set up a local development environment:
33+
34+
1. Run `yarn` to install all dependencies.
35+
2. Modify the request address to your own OpenIM Server IP in the following files:
36+
> Note: You need to [deploy](https://docs.openim.io/guides/gettingStarted/dockerCompose) OpenIM Server first, the default port of OpenIM Server is 10001, 10002, 10008.
37+
- `src/config/index.ts`
38+
39+
```js
40+
export const WS_URL = "ws://your-server-ip:10001";
41+
export const API_URL = "http://your-server-ip:10002";
42+
export const USER_URL = "http://your-server-ip:10008";
43+
```
44+
3. Run `yarn run android` to start the android development.
45+
4. Start development! 🎉
46+
47+
## Community :busts_in_silhouette:
48+
49+
- 📚 [OpenIM Community](https://github.com/OpenIMSDK/community)
50+
- 💕 [OpenIM Interest Group](https://github.com/Openim-sigs)
51+
- 🚀 [Join our Slack community](https://join.slack.com/t/openimsdk/shared_invite/zt-2ijy1ys1f-O0aEDCr7ExRZ7mwsHAVg9A)
52+
- :eyes: [Join our wechat (微信群)](https://openim-1253691595.cos.ap-nanjing.myqcloud.com/WechatIMG20.jpeg)
53+
54+
## Community Meetings :calendar:
55+
56+
We want anyone to get involved in our community and contributing code, we offer gifts and rewards, and we welcome you to join us every Thursday night.
57+
58+
Our conference is in the [OpenIM Slack](https://join.slack.com/t/openimsdk/shared_invite/zt-2ijy1ys1f-O0aEDCr7ExRZ7mwsHAVg9A) 🎯, then you can search the Open-IM-Server pipeline to join
59+
60+
We take notes of each [biweekly meeting](https://github.com/orgs/OpenIMSDK/discussions/categories/meeting) in [GitHub discussions](https://github.com/openimsdk/open-im-server/discussions/categories/meeting), Our historical meeting notes, as well as replays of the meetings are available at [Google Docs :bookmark_tabs:](https://docs.google.com/document/d/1nx8MDpuG74NASx081JcCpxPgDITNTpIIos0DS6Vr9GU/edit?usp=sharing).
61+
62+
## Who are using OpenIM :eyes:
63+
64+
Check out our [user case studies](https://github.com/OpenIMSDK/community/blob/main/ADOPTERS.md) page for a list of the project users. Don't hesitate to leave a [📝comment](https://github.com/openimsdk/open-im-server/issues/379) and share your use case.
65+
66+
## License :page_facing_up:
67+
68+
This repository is licensed under the GNU Affero General Public License version 3 (AGPL-3.0) and is subject to the following additional terms. Commercial use is not permitted. Please refer to [here](./LICENSE) for details.

0 commit comments

Comments
 (0)