---
geometry: "left=3cm,right=3cm,top=2cm,bottom=2cm"
---

# Chat project INSA by Paul FLORENCE & Lucien MENASSOL

---

## Table of contents

- [Chat project INSA by Paul FLORENCE & Lucien MENASSOL](#chat-project-insa-by-paul-florence--lucien-menassol)
  - [Table of contents](#table-of-contents)
  - [Screenshot](#screenshot)
  - [Supported Features](#supported-features)
  - [Unsupported Features](#unsupported-features)
  - [Installation Instructions](#installation-instructions)
    - [Get the project](#get-the-project)
      - [Prerequisite](#prerequisite)
      - [Download with git (developement version)](#download-with-git-developement-version)
      - [Download from the latest release](#download-from-the-latest-release)
    - [Build the project](#build-the-project)
  - [Use the GUI](#use-the-gui)
  - [Requirements](#requirements)


## Screenshot

![screenshot](screenshot.png)

---

## Supported Features

- Windows, OS X and Linux client
- Easy to run executable (no installation)
- Small software (< 50 Mb)
- Choose your username
- Change your username seamlessly
- Discover other users in your local network or use a presence server
- Unique identifier (!= pseudonyme)
- Timestamped messages
- Message history (data persistence)
- Small memory footprint (< 100 Mb)
- Nice user-friendly interface
- Manually connect to a user by specifying his IP address
- REST API endpoint to allow for plugin developpement

## Unsupported Features

- Color support
- User authentification
- User pictures (avatars)
- Encrypted communication

## Installation Instructions

### Get the project

#### Prerequisite

You need to have the following dependencies installed to compile the project:

- Java 8 or newer
- The Maven build system
- A running local instance of MongoDB

You can use these one liners to install these dependencies:

On Ubuntu:

```bash
apt-get install mongodb-org default-jre maven
```

On Arch-compatible distributions:

```bash
pacman -S mongodb jdk8-openjdk maven
```

#### Download with git (developement version)

Get the project through git (latest developement version) :

```bash
git clone https://git.florencepaul.com/gbip/poo
```

#### Download from the latest release

You can simply download the binary from the [latest release](https://git.florencepaul.com/gbip/poo/releases).

On *Ubuntu Mate* you can run the application by right-clicking on it and selecting `Ouvrir avec OpenJDK Java 8 Runtime`.

Otherwise you need to open a terminal, go into the folder containing the jar you downloaded and execute :

```bash
java -jar NewClav3000.jar
```

If you want to use the presence server instead of launching the app in p2p mode, use

```bash
java -jar NewClav3000.jar --presence-server <presence-server-ip>
```

### Build the project

You need to have **maven** installed to build this project.

If you have already downloaded the sources, go in the project folder :

```bash
cd NewClav3000
```

You can then build the whole project with

```bash
mvn compile
```

To run, just execute :

```bash
mvn exec:java [ -Dexec.args="--presence-server <presence-server-ip>"]
```

To package a jar with all the dependencies, execute :

```bash
mvn compile assembly:single
```

If you want to build and run the presence server, replace `mvn exec` with `mvn exec -Dexec.mainClass="com.insa.app.server.Server"`.

## Use the GUI

![Gui explanation](gui.png)

## Requirements

In order to sucessfully run the application you need to :
 - have a running MongoDB server
 - be on a network that support broadcast
 - have a firewall that let the traffic flow through ports 8338, 44444 and 56765
 - run Java8 or higher
