A secure messaging social platform based on Discord for Desktop and Android.
This is my final project for Advanced-Programming (AP) in Amirkabir University of Technology (AUT).
Technologies Used:
- JavaFX for Desktop GUI
- Java for Android
- Java for Socket And ServerSocket
- Node.js for Rest API
- PHP for Sample Bots
- MongoDB And MySQL for Database
Libraries Used:
- XmlByPass (Android)
- AXAnimation (Android)
- AXrLottie (Android)
- Retrofit (All)
- Gson (All)
- ZXing (Desktop)
- MaterialFX (Desktop)
- Mongoose (Node.js)
- jsonwebtoken (Node.js)
Video:
video.mp4
This video shows the performance of the application in both Android and desktop versions.
It also displays smooth animations.
Desktop:
The desktop version has been tested on Mac (OS X) and Windows (10)
Android:
The Android version is written in Java,
I tested XmlByPass in this project and it came out proud
Port:
- Api (Node.js) runs on
3154
by default.
Changeport
in .env
Make sure to change port ofAPI_ADDRESS
inApiService.java
too. - ServerSocket runs on
2424
by default.
ChangeSERVER_PORT
inApiService.java
Server, Desktop, Android
Installation:
-
Api (Node.js)
-
Server
- Install MySQL
- Import database.sql to MySQL
- Replace address of api with
API_ADDRESS
in ApiService.java - Run Project
-
Desktop
- Replace address of api with
API_ADDRESS
in ApiService.java - Replace address of socket with
SOCKET_IP
in ApiService.java - Set your os type in pom.xml.
<os>?</os>
:mac
,linux
,win
andwin-x86
- Run Project
- Replace address of api with
-
Android
- Replace address of api with
API_ADDRESS
in ApiService.java - Replace address of socket with
SOCKET_IP
in ApiService.java - Run Project
- Replace address of api with
These are some screen shots of PrivateMessage and Server's GroupChat.
Reactions are lottie animations from telegram emoji set.
Voice call over socket tcp connection (i'll replace it with VoIP soon...)
Send friendship request, block your enemies :D, Chat with your online friends.
Join a server if you have an invite code,
Create a server and design channels & groups then invite your friends to start a party!
Manage permissions of each member in your server.
You can login or signup in normal way in both desktop and android
You can also link your authorized android account to the desktop by scanning a QRCode!
Connect your account to a bot. (Only for developers)
A bot is only an HTTP api link, You can develop the api in all programming languages.
This one is a "Hello World!" bot code written in PHP.
<?php
header("Content-Type: application/json");
$data = json_decode(file_get_contents('php://input'));
echo json_encode([
"to"=>$data->chatId,
"text"=>"Hello World!"
]);
?>
Bot Api Document
Field | Type | Description |
---|---|---|
chatId | String | Unique identifier for this chat |
from | User | Sender of the message |
to | User | Receiver of the message, if receiver is a user |
server | Server | Server details, if receiver is channel of a server |
channel | Server.Channel | Receiver of the message if is channel of a server |
isPrivateMessage | Boolean | True, if receiver is a user |
message | Message | Information about the message |
User
Field | Type | Description |
---|---|---|
avatar | String | User's avatar link |
username | String | User's user name |
nickname | String | User's nick name |
String | User's email address | |
isOnline | Boolean | True, if user is online |
Server
Field | Type | Description |
---|---|---|
id | String | Server's unique id |
name | String | Server's name |
avatar | String | Server's avatar link |
channels | Array of Server.Channel | List of all channel and groups in this server |
Server.Channel
Field | Type | Description |
---|---|---|
id | String | Channel's unique id |
name | String | Channel's name |
type | Integer | 0 if is a channel, 1 if is a group |
Message
Field | Type | Description |
---|---|---|
text | String | Message's text |
time | Integer | Date the message was sent in Unix time |
fromId | String | Id of sender of this message |
toId | String | Id of receiver of this message |