Thank you for your interest in contributing! This document provides guidelines for contributing to the project.
- Python 3.11+
- Node.js 18+
- Docker & Docker Compose (for containerized development)
- NVIDIA GPU with 12GB+ VRAM (for GPU features, optional)
# Clone repository
git clone https://github.com/ShaerWare/AI_Secretary_System
cd AI_Secretary_System
# Create Python virtual environment
python3.11 -m venv .venv
source .venv/bin/activate
# Install development dependencies
pip install -r requirements.txt
pip install ruff mypy pre-commit pytest pytest-asyncio pytest-cov
# Install pre-commit hooks
pre-commit install
# Setup admin panel
cd admin && npm install && cd ..
# Copy environment file
cp .env.docker.example .env- We use ruff for linting and formatting
- Line length: 100 characters
- Cyrillic characters allowed in strings (Russian language support)
# Check code
ruff check .
# Auto-fix issues
ruff check . --fix
# Format code
ruff format .- We use ESLint and Prettier
cd admin
npm run lintAll checks run automatically on commit:
# Run all checks manually
pre-commit run --all-filesgit checkout -b feature/your-feature-name
# or
git checkout -b fix/bug-description- Follow existing code patterns
- Add tests for new functionality
- Update documentation if needed
# Python tests
pytest tests/ -v
# Linting
ruff check .
ruff format --check .
# Frontend
cd admin && npm run lint && npm run buildFollow Conventional Commits:
feat: add new TTS voice preset
fix: resolve chat session memory leak
docs: update API documentation
refactor: simplify LLM provider factory
test: add unit tests for FAQ service
chore: update dependencies
git push origin feature/your-feature-nameThen create a Pull Request on GitHub with:
- Clear description of changes
- Link to related issue (if any)
- Screenshots for UI changes
AI_Secretary_System/
├── orchestrator.py # FastAPI entry point
├── app/
│ ├── routers/ # API endpoints (15 routers)
│ ├── dependencies.py # Dependency injection
│ ├── rate_limiter.py # Rate limiting
│ └── security_headers.py # Security middleware
├── db/
│ ├── models.py # SQLAlchemy models
│ └── repositories/ # Data access layer
├── admin/ # Vue 3 admin panel
│ ├── src/views/ # Page components
│ ├── src/api/ # API clients
│ └── src/stores/ # Pinia stores
├── tests/ # Test suite
└── docs/ # Documentation
- Create or edit router in
app/routers/ - Use
ServiceContainerfromapp/dependencies.py - Router auto-registers via
app/routers/__init__.py
- Add entry to
PROVIDER_TYPESindb/models.py - If OpenAI-compatible, it works automatically
- For custom SDK, create provider class in
cloud_llm_service.py
- Create view in
admin/src/views/ - Add route in
admin/src/router/index.ts - Add translations in
admin/src/plugins/i18n.ts
# All tests
pytest tests/ -v
# Specific file
pytest tests/unit/test_db.py -v
# By pattern
pytest -k "test_chat" -v
# Exclude slow/integration tests
pytest -m "not slow and not integration" -v
# With coverage
pytest --cov --cov-report=html@pytest.mark.slow- Long-running tests@pytest.mark.integration- Requires external services@pytest.mark.gpu- Requires CUDA GPU
When reporting bugs, please include:
- Python version (
python --version) - OS and version
- Steps to reproduce
- Expected vs actual behavior
- Relevant logs from
logs/orchestrator.log
If you discover a security vulnerability, please email directly instead of creating a public issue.
By contributing, you agree that your contributions will be licensed under the MIT License.
Questions? Open an issue or check CLAUDE.md for detailed documentation.