An Open Source Organization!

Free Chat

1. Introduction

Free Chat is a socket chat application. It demos for ezyfox-server and it's client SDKs

2. It supports

  • ReactJS
  • Android Java
  • Android Kotlin (developing)
  • iOS swift (developing)

3. ReactJS build

Step 1. Clone source code
Step 2. Move to reactjs folder
Step 3. Run npm start

4. Android build

Required environment:

- Android studio: 3.5
- Gradle: 3.5.0 or 5.4.1
- Android sdk: 26

Step 1. Clone source code
Step 2. Move to android/socketfolder
Step 3. Clone ezyfox-server-android-client by commands:

git init
git remote add origin https://github.com/youngmonkeys/ezyfox-server-android-client.git
git pull origin master

Step 4. Import project to Android studio
Step 5. Build and done

5. iOS build

Step 1. Clone source code
Step 2. Move to swift/client
Step 3. Clone ezyfox-server-swift-client by commands:

git init
git remove add origin https://github.com/youngmonkeys/ezyfox-server-swift-client.git
git pull origin master

Step 4. Move to swift/client/socket
Step 5. Clone ezyfox-server-cpp-client by commands:

git init
git remote add origin https://github.com/youngmonkeys/ezyfox-server-cpp-client.git
git pull origin master

Step 6. Open project on XCode
Step 7. Build and run

6. Server-side build and deploy

Step 1. Clone source code

Step 2. Import freechat/server to IDE (i.e Eclipse)

Step 3. Download the EzyFox Full Edition

Step 4. Unzip it, let's say inĀ Applications

Step 5. Build freechat with maven

Step 5.1 Build freechat module:

- Goals: clean install

Step 5.2 Build freechat-common module:

- Goals: clean install
- Profiles: export
- Environment: EZYFOX_SERVER_HOME = path_to_ezyfox_server

Step 5.3 Build freechat-plugin module:

- Goals: clean install
- Profiles: export
- Environment: EZYFOX_SERVER_HOME = path_to_ezyfox_server

Step 5.4 Build freechat-api module:

- Goals: clean install
- Profiles: export
- Environment: EZYFOX_SERVER_HOME = path_to_ezyfox_server

Step 5.5 Build freechat-entry module:

- Goals: clean install
- Profiles: export
- Environment: EZYFOX_SERVER_HOME = path_to_ezyfox_server

Step 6. Copy file: freechat/settings/freechat-zone-settings to ezyfox-server/settings/zones folder

Step 7. Add this source code to `zones tag of ezyfox-server/settings/ezy-settings.xml` file:

<zone>
    <name>freechat</name>
    <config-file>freechat-zone-settings.xml</config-file>
    <active>true</active>
</zone>

Step 8. After build and setup we have:

ezyfox-server/
  +--settings/
  |  +--zones/
  |  |  +--freechat-zone-settings.xml
  |  +--ezy-settings.xml
  +--plugins/
  |  +--freechat-plugin/
  |  |  +--freechat-plugin-1.0.0.jar
  |  |  +--config/
  |  |    +--hazelcast.xml
  |  |    +--mongo_config.properties
  |  |    +--config.properties
  +--common/
  |  +--freechat-common-1.0.0.jar
  +--apps/
  |  +--entries/
  |  |  +--freechat/
  |  |    +--config/
  |  |    |  +--questions.txt
  |  |    |  +--config.properties
  |  |    +--freechat-entry-1.0.0.jar
  |  +--common/
  |    +--freechat-api-1.0.0.jar

Test Free Chat

Step 9. Install MongoDB and setup

port=27017
database=freechat
username=root
password=123456

Step 10. Start the EzyFox Server:

# On Windows, execute:
console.bat

# On other operating systems, execute:
./console.sh

Step 11. In file freechat/reactjs/src/socket/SocketProxy.js change 2 lines of connect function to

// let url = "wss://ws.tvd12.com/ws";
let url = "ws://localhost:2208/ws";

Step 12. Install npm

Step 13. Move to freechat/reactjs and execute commands:

npm install
npm start

Step 14. After run the commands, we get the login page.

Step 15. Enter your username and click Login. Enjoy!

7. Conclusion

Free Chat is a demo for socket chat application uses ezyfox-server, it's basically, you can use its to build your chat application that serve millions of people

Share: