feat(leads): add lead pipeline, keyword/status mapping, and encoding fixes

- Add lead ingestion, review queue, and keyword/status management
- Add DB schema: leads, service_keywords, lead_statuses, processed_messages
- Add migration with default keyword/status seeding per client
- Fix SQLite read/write deadlock in sanitizeEncoding
- Fix UTF-8 corruption: replace byte-iterating replaceAll with strings.ReplaceAll
- Add utf8.ValidString guard to decodeLatin1 to avoid double-encoding
- Remove hardcoded internal-secret; use config.InternalSecret() everywhere
- Add .gitignore for binaries, SQLite DBs, build artifacts, WhatsApp sessions
This commit is contained in:
2026-05-23 16:49:43 -03:00
parent 57e6e5a6fd
commit 57920d45d6
7 changed files with 1437 additions and 42 deletions

45
apps/go-crm/.gitignore vendored Normal file
View File

@@ -0,0 +1,45 @@
# Binaries
/go-crm
/main
/migrate
/go-crm-test
*.exe
*.dll
*.so
*.dylib
# Build artifacts
tmp/
*.out
*.log
build-errors.*
# SQLite databases
data/
.dev-data/
*.db
*.db-journal
*.db-shm
*.db-wal
*.db.bak
# Test output
*.test
*.cover
*.cov
coverage/
# IDE
.idea/
.vscode/
*.swp
*.swo
*~
# OS
.DS_Store
Thumbs.db
# WhatsApp session files (if ever synced here)
.wwebjs_auth/
.wwebjs_cache/