Skip to content

Commit

Permalink
Merge all the services out of P.R.China to provide a global-based ser…
Browse files Browse the repository at this point in the history
…vice.

Merge all the services out of P.R.China to provide a global-based service.
  • Loading branch information
realJustinLee committed Jul 5, 2019
1 parent 6676075 commit af165f5
Show file tree
Hide file tree
Showing 48 changed files with 116 additions and 93 deletions.
Binary file modified .DS_Store
Binary file not shown.
4 changes: 2 additions & 2 deletions .idea/dataSources.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

115 changes: 58 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
# LiMe

[![Build Status](https://travis-ci.org/Great-Li-Xin/LiMe.svg?branch=master)](https://travis-ci.org/Great-Li-Xin/LiMe)

# LiMe
## The Li Xin Messenger

LiMe is a communication application implemented in Java that allows you to keep in touch and exchange files with friends anytime, anywhere.
You can also quickly deploy a custom LiMe server for private communication.

## Full name
The Li Xin Messenger

## Tech reviews
LiMe is developed in the MVC design pattern.
We use Swing to implement the UI layer.
The persistence layer is implemented with JDBC.
As for the database, we chose MySQL.
The model layer is strictly following JavaBean specification requirements.
Fully comply with the code specification in the Alibaba Java Development Manual,
each layer achieves high cohesion and low coupling,
which significantly improves the scalability of the program and is easy to maintain.
## Tech Reviews
- LiMe is developed in the MVC design pattern.
- We use Swing to implement the UI layer.
- The persistence layer is implemented with JDBC.
- As for the database, we chose MySQL.
- The model layer is strictly following JavaBean specification requirements.
- Fully comply with the code specification in the Alibaba Java Development Manual,
- Each layer achieves high cohesion and low coupling, which significantly leverages the scalability and the maintainability of this project.

## Requirements
- JRE 12.0.1
> Sorry. This project is compiled with Oracle JDK.
```
java version "12.0.1" 2019-04-16
Java(TM) SE Runtime Environment (build 12.0.1+12)
Java HotSpot(TM) 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)
```
> If you would like to adapt this project to business use.
> Please rebuild this project with Non-Oracle JDK or `OpenJDK`, Thanks.
> Sorry. This project is compiled with Oracle JDK.
```
java version "12.0.1" 2019-04-16
Java(TM) SE Runtime Environment (build 12.0.1+12)
Java HotSpot(TM) 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)
```
> If you would like to adapt this project to business use.
> Please rebuild this project with Non-Oracle JDK or `OpenJDK`, Thanks.
## Code Guide Lines
This repository follows the guideline of the Alibaba coding guidelines.
Expand All @@ -36,80 +36,80 @@ For more information, please refer to the *Alibaba Java Coding Guidelines*:
- English Version: *[Alibaba Java Coding Guidelines](https://alibaba.github.io/Alibaba-Java-Coding-Guidelines)*

## Version
- C_v 0.6.3
- S_v 0.6.3

```
_______________________
/ Finally, v0.6.2! \
| _ _ __ __ |
| | | (_) \/ | ___ |
| | | | | |\/| |/ _ \ |
| | |___| | | | | __/ |
| |_____|_|_| |_|\___| |
\ /
-----------------------
\ ^__^
\ (oo)\_______
(__)\ LiMe )\/\
||----w |
|| ||
```
- C_v 0.6.4
- S_v 0.6.4

```
_______________________
/ Finally, v0.6.4! \
| _ _ __ __ |
| | | (_) \/ | ___ |
| | | | | |\/| |/ _ \ |
| | |___| | | | | __/ |
| |_____|_|_| |_|\___| |
\ /
-----------------------
\ ^__^
\ (oo)\_______
(__)\ LiMe )\/\
||----w |
|| ||
```

## Platform compatibility:
- macOS
> If you would like to use it with windows, you should clone this repo and rebuild it with windows.
> If you would like to use it with windows, you should clone this repo and rebuild it with windows.
## Protocol
为了使LiMe更好地工作,我们设定了一个应用层协议
To enable a more efficient and secure LiMe, we set up an application layer protocal.

## The Server GUI
![](./ScreenShots/LiMeServer.png)
![](static/img/LiMeServer.png)

## Client

The Login GUI and the welcome page as well.

![](./ScreenShots/LiMeLogin.png)
![](static/img/LiMeLogin.png)

The Register GUI

![](./ScreenShots/LiMeRegister.png)
![](static/img/LiMeRegister.png)

The User Agreement (HTML parsing)

![](./ScreenShots/LiMeAgreement.png)
![](static/img/LiMeAgreement.png)

The Chat GUI of user @lixin, the friend list is on the left side of the panel
![](./ScreenShots/LiMeChatLixin.png)
![](static/img/LiMeChatLixin.png)

The Chat GUI of user @test

![](./ScreenShots/LiMeChatTest.png)
![](static/img/LiMeChatTest.png)

### The Group Chat

![](./ScreenShots/LiMeGroupChat.png)
![](static/img/LiMeGroupChat.png)

### The File Transmission

![](./ScreenShots/LiMeChatFile.png)
![](static/img/LiMeChatFile.png)

## Data persistence

MySQL table structure
![](./ScreenShots/TableStructure.png)
![](static/img/TableStructure.png)

## Emails you might get from the server

Registration Confirmation
![](./ScreenShots/EmailCfmReg.png)
![](static/img/EmailCfmReg.png)

Banned Notification
![](./ScreenShots/EmailNtfBan.png)
![](static/img/EmailNtfBan.png)

Password Reset
![](./ScreenShots/EmailRstPwd.png)
![](static/img/EmailRstPwd.png)

## TODO
- [ ] Adapt Travis CI ATS
Expand All @@ -119,10 +119,11 @@ Password Reset
- [ ] Use hibernate or Mybatis as a persistence framework
- [ ] The process bar for the file transmission
- [ ] A fancy website for LiMe
- [x] Merge all the services out of ~~P.R.China~~ to provide a global-based service.
- [x] Store the password on the server with MD5
- [x] Local password storage encrypted with AES using a random key, the random key stored with AES digested with MD5
- [x] Transport the message with AES and keys digested with MD5
- [X] Open group chat for all users
- [x] Open group chat for all users
- [x] Enable user to reset the password via a server-sent Email
- [x] Redirect LiMe to the new domain name
- [x] Email should be a unique key (LiMeSeedRecoverPassword)
Expand All @@ -133,13 +134,13 @@ Password Reset
- [x] Version number increase

## Test Quote
```
Fate Whispers To The Warrior,

“You Cannot Withstand This Storm.”
And The Warrior Whispers Back,

“I Am The Storm”
```

# Made with ❤ by [Li Xin](https://github.com/Great-Li-Xin)!
™ and © 1997-2019 Li Xin. All Rights Reserved. [License Agreement](./LICENSE)
Binary file removed ScreenShots/EmailCfmReg.png
Binary file not shown.
Binary file removed ScreenShots/EmailNtfBan.png
Binary file not shown.
Binary file removed ScreenShots/EmailRstPwd.png
Binary file not shown.
Binary file removed ScreenShots/LiMeLogin.png
Binary file not shown.
Binary file removed ScreenShots/TableStructure.png
Binary file not shown.
24 changes: 12 additions & 12 deletions lime.sql
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- 主机: 127.0.0.1
-- 生成日期: 2019-02-07 18:05:43
-- 服务器版本: 10.1.37-MariaDB
-- PHP 版本: 7.2.12
-- Host: localhost
-- Generation Time: Jun 27, 2019 at 09:51 AM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.3.6

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
Expand All @@ -19,13 +19,13 @@ SET time_zone = "+00:00";
/*!40101 SET NAMES utf8mb4 */;

--
-- 数据库: `lime`
-- Database: `lime`
--

-- --------------------------------------------------------

--
-- 表的结构 `users`
-- Table structure for table `users`
--

CREATE TABLE `users` (
Expand All @@ -34,27 +34,27 @@ CREATE TABLE `users` (
`password` varchar(50) COLLATE utf8_bin NOT NULL,
`gender` varchar(20) COLLATE utf8_bin NOT NULL,
`email` varchar(100) COLLATE utf8_bin NOT NULL,
`banned` tinyint(1) NOT NULL DEFAULT '0'
`banned` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- 转储表的索引
-- Indexes for dumped tables
--

--
-- 表的索引 `users`
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `username` (`username`),
ADD UNIQUE KEY `email` (`email`);

--
-- 在导出的表使用AUTO_INCREMENT
-- AUTO_INCREMENT for dumped tables
--

--
-- 使用表AUTO_INCREMENT `users`
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
Expand Down
Binary file modified out/artifacts/LiMeServer_jar/LiMeServer.jar
Binary file not shown.
Binary file modified out/artifacts/LiMe_jar/LiMe.jar
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Manifest-Version: 0.6.3
Manifest-Version: 0.6.4
Main-Class: com.lixin.lime.LiMe

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Manifest-Version: 0.6.3
Manifest-Version: 0.6.4
Main-Class: com.lixin.lime.LiMeServer

Binary file not shown.
Binary file not shown.
Binary file modified out/production/LiMe/com/lixin/lime/server/mailbox/MailAccount.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 3 additions & 3 deletions soil.lime
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
true
Pt8A+AyPTgCAbV/O5b9GwcpYN9FmUqFsAuFLpKdt6MM=
9vWUHMBn0tw6fnMSn/Fzjw==
9vWUHMBn0tw6fnMSn/Fzjw==
XPUOPf/bwu2IoVglcyqJGt+oF/YrIOJ78Zi/4nv3ZtE=
3KRBETf16nEVZZuqlZrNww==
3KRBETf16nEVZZuqlZrNww==
2 changes: 1 addition & 1 deletion src/com/lixin/lime/client/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Manifest-Version: 0.6.3
Manifest-Version: 0.6.4
Main-Class: com.lixin.lime.LiMe

23 changes: 13 additions & 10 deletions src/com/lixin/lime/protocol/util/factory/MyStaticFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ public class MyStaticFactory {
public static final String THE_BRAND = "LiMe";
public static final String THE_AUTHOR = "Li Xin";
public static final String THE_COPYRIGHT = "™ and © 1997-" + getLiMeYear() + " " + THE_AUTHOR + ". All Rights Reserved.";
public static final String THE_LIME_VERSION = "C_v 0.6.3";
public static final String THE_LIME_VERSION = "C_v 0.6.4";

public static final String THE_SERVER_TITLE = THE_TITLE + " Server";
public static final String THE_SERVER_BRAND = THE_BRAND + " Server";
public static final String THE_SERVER_VERSION = "S_v 0.6.3";
public static final String THE_SERVER_VERSION = "S_v 0.6.4";

/**
* The Actions
Expand Down Expand Up @@ -86,13 +86,16 @@ public class MyStaticFactory {
* <p>
* WANTED DOMAIN: lime.com | lime.online
*/
public static final String DOMAIN_NAME = "limeler.top";

// Ex-DOMAIN_NAME : "limeler.top"

public static final String DOMAIN_NAME = "lixin-computer.com";
public static final String HOST_NAME = "www";
public static final String WEB_MOST = HOST_NAME + "." + DOMAIN_NAME;

// public static final String HOST = "127.0.0.1";
public static final String HOST = "127.0.0.1";

public static final String HOST = WEB_MOST;
// public static final String HOST = WEB_MOST;


private static final String ADMIN_EMAIL = "JustinDellAdam@live.com";
Expand All @@ -113,15 +116,15 @@ public class MyStaticFactory {
public static final String SQL_HOST = "sql." + DOMAIN_NAME;
public static final int SQL_PORT = 3306;
public static final String SQL_DATABASE = "lime";
public static final String SQL_USERNAME = "lixin";
public static final String SQL_PASSWORD = "BASNDAFWAUSMC";
public static final String SQL_USERNAME = "lime";
public static final String SQL_PASSWORD = "lime";
public static final String SQL_DRIVER_NAME = "com.mysql.cj.jdbc.Driver";

// Server Email properties

public static final String SERVER_EMAIL_USER = "no-reply";
public static final String SERVER_EMAIL_DOMAIN = "lixin-computer.com";
public static final String SERVER_EMAIL_PASSWORD = "Test1234";
public static final String SERVER_EMAIL_USER = "lixin.messenger";
public static final String SERVER_EMAIL_DOMAIN = "gmail.com";
public static final String SERVER_EMAIL_PASSWORD = "qnxnjgewxatvxzya";

// The public methods

Expand Down
2 changes: 1 addition & 1 deletion src/com/lixin/lime/server/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Manifest-Version: 0.6.3
Manifest-Version: 0.6.4
Main-Class: com.lixin.lime.LiMeServer

1 change: 1 addition & 0 deletions src/com/lixin/lime/server/mailbox/LiMeServerMailBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public LiMeServerMailBox(MailAccount mailAccount) {
properties.put("mail.smtp.host", mailAccount.getMailHost());
properties.put("mail.smtp.port", mailAccount.getPort());
properties.put("mail.smtp.auth", mailAccount.isAuth());
properties.put("mail.smtp.starttls.enable",mailAccount.isStartTls());
session = Session.getInstance(properties,
new javax.mail.Authenticator() {
@Override
Expand Down
Loading

0 comments on commit af165f5

Please sign in to comment.