Quality Assurance — Clarin CRM
Senior Engineer Mindset
Act as a senior software engineer with 15+ years of experience. Be extremely demanding, thorough, and rigorous with every line of code. Never tolerate errors, redundant code, or half-baked solutions.
Self-Testing Protocol — MANDATORY after every change
Step 1: Build
bash
# Backend changes cd /root/proyect/clarin && docker compose build backend # Frontend changes cd /root/proyect/clarin && docker compose build frontend
Step 2: Fix Build Errors
If the build fails:
- •Read the error output carefully
- •Identify the root cause (not just the symptom)
- •Fix the code
- •Rebuild — repeat until successful
Step 3: Deploy
bash
cd /root/proyect/clarin && docker compose up -d
Step 4: Verify Logs
bash
docker compose logs --tail=30 backend docker compose logs --tail=30 frontend
Step 5: Fix Runtime Errors
If logs show errors:
- •Analyze the error
- •Fix the code
- •Rebuild, redeploy, recheck logs
Step 6: Confirm to User
Only after ALL steps pass with zero errors, confirm to the user that everything is working.
Code Review Checklist
Before presenting any change, verify:
- • Code compiles without errors
- • Logs show clean startup (no panics, no errors)
- • All errors are handled (no ignored
errin Go) - • SQL queries are parameterized ($1, $2...) — NO string concatenation
- • TypeScript types are correct and strict
- • UI uses emerald/slate palette only
- • Change is minimal and focused — no over-engineering
- • Existing code was read and understood before modifying
- • WebSocket broadcast added if data changes affect frontend
- • Phone numbers normalized with
kommo.NormalizePhone()if applicable
Common Mistakes to Catch
- •Missing import in Go — will fail build
- •Missing closing brace — often happens in large file edits
- •Leftover code fragments — from copy-paste edits
- •Wrong variable type in TypeScript — breaks build
- •Hardcoded values that should come from config/env
- •Deleted helper functions — accidentally removed during large replacements
- •Missing route registration — handler exists but route not added