Setup

Install dependencies and configure the development environment:

# Clone repository
git clone https://github.com/whoamimi/tarotarot-ai-backend.git
cd tarotarot-ai-backend/backend

# Install package in editable mode
pip install -e .

# Configure environment variables
cp .env.example .env
# Edit .env with your credentials

Start the development server:

uvicorn taro.app:app --reload

Access the API documentation at http://localhost:8080/docs

Local Dev

Ways to start local development:


# Without serving endpoints
python run.py

# With uvicorn on debug mode
uvicorn taro.app:app --reload --host 0.0.0.0 --port 8080

# With Docker compose
docker compose -p tarohub up --build -d

Alternatively, one can use the scripts to setup workspace for local development:

# Start services (build + run in detached mode)
./scripts/on_start.sh

# Stop services (clean shutdown)
./scripts/on_stop.sh

Testing

Run unit tests with pytest:

pytest tests/utils/ -v

Run tests with coverage:

pytest tests/utils/ --cov=taro --cov-report=term-missing --cov-report=html -v