/
├── backend/ # Backend service
│ ├── src/ # Source code
│ ├── tests/ # Test files
│ ├── config/ # Configuration
│ ├── requirements.txt # Python dependencies
│ ├── Dockerfile
│ ├── .env.sample # Sample env for local development
│ └── .env.docker.sample # Sample env for Docker
├── frontend/ # Frontend service
│ ├── src/ # React source code
│ ├── public/ # Static files
│ ├── package.json # Node dependencies
│ ├── .env.sample # Sample env for local development
│ └── .env.docker.sample # Sample env for Docker
├── docker-compose.yml # Docker services configuration
└── README.md # Project documentation
[Previous Features section remains the same...]
The system uses different environment configurations for local development and Docker:
-
Local Development (backend/.env):
- Copy backend/.env.sample to backend/.env
- Configure with local paths and settings
- Required variables:
OPENAI_API_KEY=your_openai_api_key CHROMA_PERSIST_DIR=./chroma_db CHROMA_COLLECTION_NAME=your_collection_name
-
Docker Environment (backend/.env.docker):
- Copy backend/.env.docker.sample to backend/.env.docker
- Uses Docker-specific paths and settings
- Container paths are automatically mounted as volumes
-
Local Development (frontend/.env):
- Copy frontend/.env.sample to frontend/.env
- Configure API URL for local development:
REACT_APP_API_URL=http://localhost:5000
-
Docker Environment (frontend/.env.docker):
- Copy frontend/.env.docker.sample to frontend/.env.docker
- Uses Docker-specific settings:
REACT_APP_API_URL=http://localhost:5001
- Clone the repository
- Set up backend:
cd backend ./setup_data_dirs.sh pip install -r requirements.txt cp .env.sample .env # Configure .env with your settings
- Set up frontend:
cd frontend npm install cp .env.sample .env # Configure .env with your settings
- Run backend:
cd backend python src/app.py - Run frontend:
cd frontend npm start
- Clone the repository
- Set up environment files:
# Backend cp backend/.env.docker.sample backend/.env.docker # Frontend cp frontend/.env.docker.sample frontend/.env.docker
- Configure your .env.docker files with appropriate values
- Start the application:
docker compose up -d
- To stop and clean up:
docker compose down -v
- Data is stored in backend/data/
- Cache directories are created by setup_data_dirs.sh
- Manual cleanup required if needed
- Data is stored in Docker named volumes
- Volumes are automatically managed by Docker
- Use
docker compose down -vto clean up all data - Uploads directory is mounted from backend/uploads/
# Backend tests
cd backend
python -m pytest tests/
# Frontend tests
cd frontend
npm test# Backend
cd backend
black .
# Frontend
cd frontend
npm run format[Previous API Endpoints section remains the same...]