A digital AI asistant for African tailoring workshops
# StitchFlow Backend
## đ Project Structure
StitchFlow/
â
âââ backend/ â Main backend application
â âââ main.py â Entry point (FastAPI app starts here)
â âââ __init__.py â Marks folder as a Python package
â â
â âââ api/ â API routes/endpoints
â â âââ routes.py â Defines REST endpoints (e.g., /process)
â â âââ __init__.py
â â
â âââ core/ â Core backend logic (configs, helpers)
â â âââ __init__.py
â â
â âââ services/ â Business logic and services
â âââ __init__.py
â âââ ai/ â AI-related modules
â âââ agent.py â Main StitchFlowAgent class
â âââ tools.py â Utility functions
â âââ measurement_extractor.py â Extracts measurements
â âââ fabric_logic.py â Fabric calculation logic
â âââ image_handler.py â Image processing
â âââ chat_services.py â Chat-related logic
â âââ voice.py â Voice input/output
â âââ __init__.py
â
âââ frontend/ â Frontend assets
â âââ static/ â CSS, JS, images
â âââ templates/ â HTML templates (Jinja2)
â
âââ requirements.txt â Python dependencies
## đ Setup Instructions
1. **Clone the repository**
```bash
git clone
cd StitchFlow
## đ Install Dependencies
From the project root (`StitchFlow/`):
pip install -r requirements.txt
## đ Running the sever
From the project root (`StitchFlow/`):
uvicorn backend.main:app --reload
- The backend will start at:
127.0.0.1
- Static files are served at:
127.0.0.1 (127.0.0.1 in Bing)
- Templates are rendered via FastAPI routes.
đ API Endpoints
- GET / â Loads the homepage (index.html) with a connection message.
- POST /process â Accepts user commands, parses them with StitchFlowAgent, and returns structured data.
đ§© Key Components
- backend/main.py â S âŠ