Complete Aider setup for a FastAPI + React Native stock verification system with dual database architecture (MongoDB + SQL Server), including model settings, test commands, and architecture rules.
This skill configures Aider for a stock verification system with FastAPI backend, React Native frontend, and dual database architecture (MongoDB for writes, SQL Server read-only for ERP data).
Sets up Aider with proper model selection, file context management, linting/testing commands, and critical architectural constraints for a production system with strict read/write separation.
When using this Aider configuration, follow these steps:
1. **Model Configuration**
- Use `claude-sonnet-4-20250514` as primary model
- Use `diff` edit format for precise code changes
- Use the same model for weak-model tasks
2. **File Context Management**
- Always load these files as read-only reference (never modify):
- `README.md`
- `ARCHITECTURE.md`
- `API_CONTRACTS.md`
- `API_REFERENCE.md`
- `.cursorrules`
- `.github/copilot-instructions.md`
- Respect `.gitignore` and `.aiderignore` exclusions
- Use map-tokens of 2048 with auto-refresh
3. **Git & Commit Settings**
- Enable git integration
- Disable auto-commits (require explicit confirmation)
- Disable dirty-commits (ensure clean working tree)
- Attribute author, committer, and commit message fields properly
4. **Critical Architectural Rules**
- **SQL Server is READ-ONLY** - never generate INSERT, UPDATE, or DELETE statements for SQL Server
- **All writes go to MongoDB** using Motor async driver
- **Always use parameterized queries (?)** for SQL Server - never string concatenation
- **JWT authentication required** for all `/api/*` endpoints
- Follow existing patterns in codebase before introducing new approaches
5. **Testing & Linting Commands**
- Python linting: Run `cd backend && ruff check --fix {fname}` before committing
- TypeScript linting: Run `cd frontend && npm run lint -- --fix` before committing
- Run backend tests: `cd backend && pytest tests/ -v`
- Run frontend tests: `cd frontend && npm test`
- Full CI: `make ci`
- Always run `make test` before suggesting changes
6. **System Architecture**
- **Backend**: FastAPI (Python 3.10+) running on port 8001
- **Frontend**: React Native + Expo (TypeScript)
- **Primary Database**: MongoDB with Motor async driver
- **ERP Source**: SQL Server with pyodbc (read-only access)
- **Authentication**: JWT tokens for API authorization
7. **Development Workflow**
- Suggest shell commands when helpful (enabled)
- Show diffs for all changes
- Check for Aider updates automatically
- Load environment from `.env` file
- Use voice language: English (for experimental voice features)
8. **Safety Checks**
- Never modify read-only reference files
- Always run tests before suggesting changes
- Verify SQL queries use parameterized syntax
- Confirm MongoDB is used for all write operations
- Check JWT auth is present on protected endpoints
```bash
aider --config .aider.conf.yml
aider "Add a new API endpoint to fetch product stock levels from SQL Server and cache results in MongoDB"
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/aider-configuration-for-stock-verification-system/raw