You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Clone repository
git clone <repository-url>cd fast-scriptures
# Backend setupcd backend
uv sync
uv run uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
# Frontend setup (new terminal)cd frontend
npm install
npm run dev
π Development Workflow
1. Feature Development
# Create feature branch
git checkout -b feature/new-feature
# Make changes# Run testscd backend && uv run pytest
cd frontend && npm run test# Commit changes
git add .
git commit -m "feat: add new feature"# Push and create PR
git push origin feature/new-feature
2. Code Quality Checks
# Backendcd backend
uv run black app tests
uv run isort app tests
uv run flake8 app tests
uv run mypy app
# Frontendcd frontend
npm run lint
npm run test
npx tsc --noEmit
3. Pre-commit Hooks
# Install pre-commit hookscd backend
uv run pre-commit install
# Run manually
uv run pre-commit run --all-files
feat(api): add user authentication endpoints
fix(frontend): resolve search input validation issue
docs(readme): update deployment instructions
test(backend): add comprehensive API tests
π§ͺ Testing Strategy
Backend Testing
# Run all tests
uv run pytest
# Run with coverage
uv run pytest --cov=app --cov-report=html
# Run specific test
uv run pytest tests/test_api.py::TestScriptureEndpoints::test_get_volumes
# Run integration tests
uv run pytest -m integration
Frontend Testing
# Run all tests
npm run test# Run with coverage
npm run test:coverage
# Run tests in watch mode
npm run test -- --watch
# Run specific test file
npm run test -- App.test.tsx
E2E Testing
# Run monitoring script
python scripts/monitor.py --url http://localhost:8000
# Test production endpoints
python scripts/monitor.py --url https://your-api.onrender.com
π Code Review Process
Pull Request Checklist
Tests pass locally
Code follows style guidelines
Documentation updated
No security vulnerabilities
Performance impact considered
Backward compatibility maintained
Review Guidelines
Focus on logic and architecture
Check for security issues
Verify error handling
Ensure proper testing
Review documentation updates
π Deployment Process
Staging Deployment
# Create staging branch
git checkout -b staging/v1.2.1
# Test locallycd backend && uv run pytest
cd frontend && npm run test&& npm run build
# Push to staging
git push origin staging/v1.2.1
Production Deployment
# Merge to main
git checkout main
git merge staging/v1.2.1
# Create release tag
git tag -a v1.2.1 -m "Release v1.2.1"
git push origin v1.2.1
# Push to main (triggers Render deployment)
git push origin main
π§ Development Tools
Recommended Extensions
VS Code: Python, TypeScript, ESLint, Prettier
PyCharm: Python development
WebStorm: JavaScript/TypeScript development
Useful Commands
# Backend development
uv run uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
uv run pytest --cov=app --cov-report=term-missing
uv run black --check app tests
# Frontend development
npm run dev
npm run build
npm run lint -- --fix
npm run test -- --watch
# Database operationscd backend
python setup_database.py
π Debugging
Backend Debugging
# Run with debug logging
DEBUG=true uv run uvicorn app.main:app --reload
# Use Python debugger
import pdb;pdb.set_trace()
# Check logs
tail -f backend/logs/app.log
Frontend Debugging
# Browser developer tools# React Developer Tools extension# Network tab for API calls# Console for errors
π Performance Monitoring
Local Performance Testing
# Backend performance
uv run pytest tests/test_performance.py
# Frontend bundle analysis
npm run build
npx vite-bundle-analyzer dist
# API response times
python scripts/monitor.py --url http://localhost:8000