Developer documentation

Welcome to the developer documentation of the Junqo-platform.
This documentation is intended for developers who want to contribute to the project.

If you are a new contributor, you should start by reading the getting started section.
If you need some precise information, see the following sections :

Table of contents

Getting started

Before you begin

Before you begin, you should have a basic understanding of the following:

Prerequisites

Installation

  1. Clone the repository

     git clone git@github.com:Junqo-org/junqo-platform.git
    
  2. Move to the project directory

     cd junqo-platform
    
  3. Deploy the project locally using Docker Compose

     docker compose up --build
    

Usage

Notice, the following instructions are admitting that you are using the default configuration of the project.
Furthermore, the project is running in production mode.
You should replace localhost by the IP address of the machine running the project.

Learn more

Notice, the following sections are admitting that you are using the default configuration of the project.

Project structure

The project is structured as follows:

├── /junqo_back
│   ├── dockerfile.prod
│   ├── dockerfile.dev
│   ├── /src
│       ├── main.ts
├── /junqo_front
│   ├── dockerfile.prod
│   ├── dockerfile.dev
│   ├── /lib
│       ├── main.dart
├── /docs
│   ├── developer_documentation/
│   ├── user_documentation/
│   ├── index.md
├── docker-compose.yaml
├── docker-compose.dev.yaml

Project structure diagram

  • back: Runs the REST API server to communicate with the database.
  • front: Runs the web server / Flutter app seen by the user.
  • docs: Contains the documentation of the project.
  • docker-compose.yaml: The main file to deploy the project in production mode.
  • docker-compose.dev.yaml: The main file to deploy the project in development mode.

Interactions

The following diagram shows the interactions between the different parts of the project:

 +-----------+ +----------+ +------------+ | Front | <---> | Back | <---> | DataBase | +-----------+ +----------+ +------------+

Interactions diagram

The front communicates with the back using the REST API.
The back communicates with the database using the database driver.
The database stores the data.

Operation

The following diagram shows how the different programs are executed:

Operational diagram

Operational diagram

Networking

The following diagram shows the networking of the project:

External ports:   80/443              4200                5432                 3000
                     |                  |                   |                    |
               +-----------+       +----------+       +------------+       +-----------+
               |   Front   |       |   Back   |       |  DataBase  |       |  Adminer  |
               +-----------+       +----------+       +------------+       +-----------+
---
title: Networking
---
flowchart BT
%% External ports
    A("**Front**") --> P1;
    B("**Back**") --> P2;
    C("**Database**") --> P3;
    D("**Adminer**
    (*development only*)") --> P4;
    P1[[80/443]];
    P2[[4200]];
    P3[[5432]];
    P4[[3000]];
    linkStyle 0,1,2,3 stroke-dasharray: 4 3

Networking diagram

The front is accessible on the World Wide Web at port 80/443. The back is accessible on the World Wide Web at port 4200. The database is accessible on the World Wide Web at port 5432 (admitting that you are using Postgresql). The adminer is accessible on the World Wide Web at port 3000.

API

The backend API uses GraphQL to communicate with the frontend.
A schema is available at /schemas/schema.graphqls. Yous can find the API documentation at http://doc.junqo.fr/api/index.html.

CI/CD

For the continuous integration and continuous deployment, the project uses Github Actions and Docker Compose. The CI/CD pipeline is defined in the .github/workflows directory.

You can find the CI/CD documentation at here.

Technologies

The project uses the following technologies: