Skip to content

CamilleSA/Area-Epitech

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AREA [EPITECH PROJET] [DOCUMENTATION]

The goal of this project is to discover, as a whole, the software platform that you have chosen (Java, .NET,node.js) through the creation of a business application. To do this, you must implement a software suite that functions similar to that of IFTTT and/or Zapier.

Tutorial Front-End Web

0- Register

SignUp

1- Login

SignIn

2- Welcome to Area

Dashboard

3- Choose Applications

Application

4- Choose Action

Application

5- Choose Reaction

Application

6- Click on Make Area !

Application

7- Connect on your Action

Application

8- Connect on your Reaction

Applicati

9- Click on Make Area !

Applicati

10- Confirm your Area

Confirm

11- You can modify / stop / delete your Area

Modify

12- Option Dark Mode

DarkMode

13- Chat Bot

ChatBot

Tutorial Front-End Mobile

0- Register

SignUp

1- Login

SignIn

2- Welcome to Area

Dashboard

3- Choose Action service

Application

4- Choose Reaction service

Application

5- Choose Action

Application

6- Choose Reaction

Application

7- Click on Make it !

Application

8- Config your Action & Reaction

Application

9- Click on Make Area !

Applicati

Index

Index Index Index Index

Installation Project Area

  • Install Docker
 $ sudo apt-get install docker-ce docker-ce-cli containerd.io
  • Build the project
docker-compose build
  • Run the project
docker-compose up

Navigate in http://localhost:8081/ for client && http://localhost:8080/ for server Download APK project: navigate in http://localhost:8081/client.apk or click on "Download APK in Menu"

Documentation Front-End Web

User Interface - ReactJS

If any JavaScript project has taken the front end ecosystem by storm in recent years, that would be React. React is a library built and open-sourced by the smart people at Facebook. In React, developers write components for their web interface and compose them together.

Installation

Download Packages

npm install

Start && Watch

npm start

Runs the app in the development mode. Open http://localhost:3000 to view it in the browser. The page will reload if you make edits. You will also see any lint errors in the console.

Repository structure

/
├─ public/                       # Public files (HTML, Favicon, .JSON)
├─ src/
     ├─ Components/              # Components of Services
     │        ├─ Discord/        # Services Discord
     │        ├─ Github/         # Services Github
     │        ├─ Gmail/          # Services Gmail
     │        ├─ Reddit/         # Services Reddit
     |        ├─ Youtube/        # Services Youtube
     │        └─ Weather/        # Services Weather
     |
     ├─ Data/                    # Data of Services
     ├─ Medias/                  # Assets (Logo, Video, Images)
     |
     ├─ Pages/                   # Pages of Services Area (Actions + Reactions)
     │    ├─ Discord/            # Pages Discord
     │    ├─ Github/             # Pages Github
     │    ├─ Gmail/              # Pages Gmail
     │    ├─ Reddit/             # Pages Reddit
     │    ├─ Weather/            # Pages Weather
     │    └─ Youtube/            # Pages Youtube
     |
     ├─ App.js                   # Routes of App
     │
     ├─ style/                   # CSS files 
     |
     ├─ Dockerfile
     └─ package.json             # File Package (Dependencies)

Documentation Front-End Mobile

User Interface - Flutter

Flutter is developed by Google and eases the developer work by creating both android and ios app under a single code base. Flutter web is also been introduced by flutter and it shows a way for developer to create website. Flutter uses "dart" language to write functionalities.

Installation

  • 1 - Open the IDE and select Start a new Flutter project.
  • 2 - Select Flutter Application as the project type. Then click Next.
  • 3 - Verify the Flutter SDK path specifies the SDK’s location (select Install SDK… if the text field is blank).
  • 4 - Enter a project name (for example, myapp). Then click Next.
  • 5 - Click Finish.
  • 6 - Wait for Android Studio to install the SDK and create the project.

Build && Run the app

  • 1 - Locate the main Android Studio toolbar: FlutterSchema

  • 2 - In the target selector, select an Android device for running the app. If none are listed as available, select Tools> Android > AVD Manager and create one there. For details, see Managing AVDs.

  • 3 - Click the run icon in the toolbar, or invoke the menu item Run > Run.

  • After the app build completes, you’ll see the starter app on your device.

Other Method

Download Packages

flutter pug get

Build apk

flutter build apk

Run apk

flutter run

Runs the app in the development mode. Open http://localhost:8081/client.apk to download the app.

Repository structure

/
├─ Dockerfile
├─ area_app/
     ├─ android/                # Android config
     │        ├─ app/
     |        |     ├─src/
     |        |     |   ├─res/value/string.xml       # facebook value for api
     |        |     |   └─main/AndroidManifest.xml   #app + facebook + internet config
     |        |     |
     |        |     ├─build.gradle                # Gradle config
     |        |     └─google-service.json         # Google firebase config
     |        | 
     │        ├─ gradle/                          # Gradle wrapper properties
     │        ├─ gradle.property                  # gradle property value
     │        └─ settings.gradle                  # flutter setting
     |
     ├─ ios/                    # IOS app
     ├─ asset/                  # Assets (Logo, Video, Images)
     |
     ├─ lib/                    # Main code
     │    ├─ login/                               # Area log pages
     │    ├─ pages/                               # Area pages
     |    ├─ Param.dart                           # Class of action reaction contain
     │    ├─ Themes.dart
     │    ├─ global.dart
     │    ├─ action_reaction_list.dart            # List of action reaction
     │    └─ main.dart                            # Main
     |
     ├
     │
     ├─ test/                    # test file 
     |
     ├
     └─ pubspec.yaml             # File Package (Dependencies)

Documentation Back-End

Express

ExpressLogo

Fast, unopinionated, minimalist web framework for node.

Installation

This is a Node.js module available through the npm registry.

Before installing, download and install Node.js. Node.js 0.10 or higher is required.

If this is a brand new project, make sure to create a package.json first with the npm init command.

Installation is done using the npm install command:

$ npm install express

Create the App:

$ express /tmp/foo && cd /tmp/foo

Install dependencies:

$ npm install

Start

$ npm start

View the website at: http://localhost:3000

Api Reference

About

  • get :
    • get infos (/about.json) :
      • request : empty
      • response :
        • 200 : success
        {
            "client": {
                "host": "<host>"
            },
            "server": {
                "current_time": "<current_time>",
                "services": [{
                    "name": "<name>",
                    "actions": [{
                        "name": "<name>",
                        "description": "<description>"
                    }, {
                        ...
                    }],
                    "reactions": [{
                        "name": "<name>",
                        "description": "<description>"
                    }, {
                        ...
                    }]
                }, {
                    ...
                }]
            }
        }

Authentication

  • post :
    • register (/auth) :
      • email :
        • request :
        {
            "action": "register",
            "connectionMethod": "email",
            "username": "<username>",
            "email": "<email>",
            "password": "<password>"
        }
        • response :
          • 200 : success
          • 470 : username already exist
          • 471 : email already exist
          • 490 : general sql error
      • facebook :
        • request :
        {
            "action": "register",
            "connectionMethod": "facebook",
            "username": "<username>",
            "facebookId": "<facebookId>"
        }
        • response :
          • 200 : success
          • 470 : username already exist
          • 472 : id already exist
          • 490 : general sql error
      • google :
        • request :
        {
            "action": "register",
            "connectionMethod": "google",
            "username": "<username>",
            "googleId": "<googleId>"
        }
        • response :
          • 200 : success
          • 470 : username already exist
          • 472 : id already exist
          • 490 : general sql error
      • other registration method :
        • response :
          • 461 : wrong method
    • connect (/auth) :
      • email :
        • request :
        {
            "action": "connect",
            "connectionMethod": "email",
            "email": "<email>",
            "password": "<password>"
        }
        • response :
          • 200 : success
          {
              "username": "<username>"
          }
          • 475 : email does not exist
          • 480 : wrong password
          • 490 : general sql error
      • username :
        • request :
        {
            "action": "connect",
            "connectionMethod": "username",
            "username": "<username>",
            "password": "<password>"
        }
        • response :
          • 200 : success
          {
              "username": "<username>"
          }
          • 476 : username does not exist
          • 480 : wrong password
          • 490 : general sql error
      • facebook :
        • request :
        {
            "action": "connect",
            "connectionMethod": "facebook",
            "facebookId": "<facebookId>"
        }
        • response :
          • 200 : success
          {
              "username": "<username>"
          }
          • 477 : id does not exist
          • 490 : general sql error
      • google :
        • request :
        {
            "action": "connect",
            "connectionMethod": "google",
            "googleId": "<googleId>"
        }
        • response :
          • 200 : success
          {
              "username": "<username>"
          }
          • 477 : id does not exist
          • 490 : general sql error
      • other connection method :
        • response :
          • 461 : wrong method
    • other action (/auth) :
      • response :
        • 460 : wrong action
  • delete :
    • delete user (/auth) :
      • request :
      {
          "username": "<username>"
      }
      • response :
        • 200 : success
        • 455 : username does not exist
        • 490 : general sql error

Services

Tokens
  • post :
    • add token (/services) :
      • request :
      {
          "placeholder": "<placeholder>",
          "service": "<service>",
          "token": "<token>"
      }
      • response :
        • 200 : success
        • 485 : placeholder already used
        • 490 : general sql error
  • delete :
    • delete token (/services) :
      • request :
      {
          "placeholder": "<placeholder>"
      }
      • response :
        • 200 : success
        • 477 : placeholder does not exist
        • 490 : general sql error

Dashboard

Areas
  • post :
    • create area (/dashboard) :
      • request :
      {
          "username": "<username>",
          "placeholder": "<placeholder>",
          "serviceAction": "<serviceAction>",
          "serviceActionConfig": {<serviceActionConfig>},
          "serviceReaction": "<serviceReaction>",
          "serviceReactionConfig": {<serviceReactionConfig>},
          "action": "<action>",
          "reaction": "<reaction>"
      }
      • response :
        • 200 : success
        • 465 : invalid action service name
        • 466 : invalid reaction service name
        • 467 : invalid action
        • 468 : invalid reaction
        • 469 : action does not exists in action service
        • 470 : reaction does not exists in reaction service
        • 476 : username does not exist
        • 480 : placeholder already used
        • 490 : general sql error
    • execute area (/dashboard/execute) :
      • request :
      {
          "username": "<username>",
          "placeholder": "<placeholder>"
      }
      • response :
        • 200 : success
        • 476 : username does not exist
        • 477 : placeholder does not exist
        • 480 : area already running
        • 490 : general sql error
    • stop area (dashboard/stop) :
      • request :
      {
          "username": "<username>",
          "placeholder": "<placeholder>"
      }
      • response :
        • 200 : success
        • 476 : username does not exist
        • 477 : placeholder does not exist
        • 481 : area already stopped
        • 490 : general sql error
    • get areas (/dashboard/list) :
      • request :
      {
          "username": "<username>"
      }
      • response :
        • 200 : success
            [{
                "placeholder": "<placeholder>",
                "running": "<true|false>",
                "serviceAction": "<serviceAction>",
                "action": "<action>",
                "serviceReaction": "<serviceReaction>",
                "reaction": "<reaction>"
            }, {
                ...
            }]
        • 476 : username does not exist
  • delete :
    • delete area (/dashboard) :
      • request :
      {
          "username": "<username>",
          "placeholder": "<placeholder>"
      }
      • response :
        • 200 : success
        • 476 : username does not exist
        • 481 : placeholder does not exist
        • 490 : general sql error

UML

UML Area

UMLArea

UML Services

Gmail UMLGmail

Github UMLGithub

Discord UMLDiscord

Reddit UMLReddit

Weather UMLWeather

Youtube UMLYoutube

Spotify UMLSpotify

UML Authentication

UMLAuth

UML Responses

UMLResponses

API

Gitflow

UMLGitFlow

Norme Commit

[ADD] -- if you add files, features, and so on

[FIX] -- if you were working on a bug or any form of default that you corrected

[DEL] -- if you removed files, features, assets, and so on

[UP] -- if you change something without adding any features or content

Auteurs

  • Camille Sayous alias @CamilleSA [Front-End / Web]
  • Angelina Colas alias @Ragiri [Front-End / Mobile]
  • Leonard Pooch alias @Maaown [Back-End]
  • Adrian Morvan alias @Tsunuky [Back-End / Services]
  • Théo Blancquart alias @Ninmesis [Back-End / Services