Installation
To run Chorus locally, you need to set up both the web API (backend) and the frontend.
Web API
Local (without Docker)
The web API is written in FastAPI, a web framework for Python. You need to install Python before running the API.
You also need to install Poetry for Python, which is used for dependency management. Find installation instructions at https://python-poetry.org/docs/.
After installing poetry, install the project.
cd server
poetry install
Add an environment file .env in the server directory in the same format as sample.env, but
replace:
DATABASE_URLwith the URL of your Postgres database (e.g.,postgresql://user:password@localhost/dbname)SECRET_KEYwith a random string (you can useopenssl rand -hex 32to generate one)ALLOWED_ORIGINSwith a comma-separated list of allowed origins (e.g.,http://localhost:5173if you use the default Vite port)
To run the API (in auto-reload mode):
poetry run uvicorn chorus.main:app --reload
Go to http://localhost:8000/docs to check if it works: you should see a Swagger page.
Using Docker
To build & run locally via docker compose:
docker-compose build engine
docker-compose up --build
Or, to build the server image using Docker:
cd server
docker build -t chorus.server .
To run it on port 8000:
docker run -p 8000:8000 chorus.server
Go to http://localhost:8000/docs to check if it works: you should see a Swagger page.
Frontend
The frontend requires https://nodejs.org/en to run and is written in Vite.
Installation using Node:
cd client
npm install
To run the frontend (in development mode):
npm run dev
To run in storybook mode:
npm run storybook
There is also an online storybook instance at https://choruslabs.github.io/chorus.