Skip to content

Introduction

The developing docs contains documentation on internals and processes used by the dev team.

Flou is structured as a monorepo, containing all the core components that make up the system:

  • Flou Engine: a Python project that runs a task queue (celery) for running concurrent tasks.
  • Flou Api: a FastAPI Python project that share's code with the Engine.
  • Flou Studio: a SvelteKit project
  • Flou Docs: a MKDocs project

Each runs it's own process detailed below.

Setting up a local dev environment

To start contributing to flou create a local python & node environment and install all the dependencies by following these steps.

  1. Clone this repo:

    % git clone https://github.com/flou-ai/flou-private/ flou
    % cd flou
    
  2. Create a python virtual environment:

    % python -m venv venv
    % source venv/bin/activate
    

    Whenever you start a new terminal start the virtualenv with source venv/bin/activate.

  3. Install the python dev dependencies:

    (venv) % cd flou
    (venv) % pip install -r requirements-dev.txt
    (venv) % cd ..
    
  4. Install a local javascript node env and install the js dependencies.

    (venv) % nodeenv -p
    (venv) % source venv/bin/activate
    (venv) % cd studio
    (venv) % npm install
    (venv) % cd ..
    

    Note that the venv needs to be re-activated just after installing > nodeenv in order to activate it this first time.

  5. Install the docs requirements

    (venv) % cd ../docs
    (venv) % pip install -r requirements.txt
    (venv) % cd ..
    

Running Flou for contributing

We need to run each part of Flou in it's own terminal.

  1. You will need a local redis and postgresql instance. If you don't want to install them locally you can run them via docker.

    % docker compose up db cache
    
  2. Run the Flou Api and visit http://localhost:8000/docs :

    % source venv/bin/activate
    (venv) % cd flou
    (venv) % fastapi dev flou/api/main.py
    
  3. Run the Flou Engine:

    % source venv/bin/activate
    (venv) % cd flou
    (venv) % celery -A flou.executor.celery worker
    
  4. Run the Flou Studio and visit http://localhost:8001 :

    % source venv/bin/activate
    (venv) % cd studio
    (venv) % npm run dev -- --port 8001
    
  5. Run the Flou Docs and visit http://localhost:8002 :

    % source venv/bin/activate
    (venv) % cd docs
    (venv) % mkdocs serve -a 0.0.0.0:8002