diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f98336ba9..001417643 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -42,6 +42,35 @@ the system we use to tag our issues and pull requests. ### Local development You can develop LangFlow using docker compose, or locally. +We provide a .vscode/launch.json file for debugging the backend in VSCode, which is a lot faster than using docker compose. + +Setting up hooks: +```bash +make init +``` + +This will install the pre-commit hooks, which will run `make format` on every commit. + +It is advised to run `make lint` before pushing to the repository. + +#### **Locally** +Run locally by cloning the repository and installing the dependencies. We recommend using a virtual environment to isolate the dependencies from your system. + +Before you start, make sure you have the following installed: + - Poetry (>=1.4) + - Node.js + +For the backend, you will need to install the dependencies and start the development server. +```bash +make install_backend +make backend +``` +For the frontend, you will need to install the dependencies and start the development server. +```bash +make frontend +``` + + #### **Docker compose** This will run the backend and frontend in separate containers. The frontend will be available at `localhost:3000` and the backend at `localhost:7860`. ```bash @@ -50,22 +79,4 @@ docker compose up --build make dev build=1 ``` -#### **Locally** -Run locally by cloning the repository and installing the dependencies. We recommend using a virtual environment to isolate the dependencies from your system. - -Before you start, make sure you have the following installed: - - Poetry - - Node.js - -For the backend, you will need to install the dependencies and start the development server. -```bash -poetry install -make run_backend -``` -For the frontend, you will need to install the dependencies and start the development server. -```bash -cd src/frontend -npm install -npm start -```