Commit Graph

8 Commits

Author SHA1 Message Date
richardtekula
bd44458c32 refactor: Clean up logging system with LOG_LEVEL filtering
- Add LOG_LEVEL env variable support (debug, info, warn, error)
- Default to 'info' level for production-ready logs
- Integrate Morgan HTTP logging with custom logger
- Remove console.logs and replace with custom logger
- Remove sensitive password debug logs from email service
- Remove noisy warn logs from email sync and event notifier
- Add gray color for timestamps to improve readability

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 09:45:00 +01:00
richardtekula
8656fb1db0 feat: Add creator info, team management for companies, and member access control
- Add creator info (username) to companies, projects, and notes responses
- Add company_users table for team management on companies
- Add resourceAccessMiddleware for member access control
- Members can only see resources they are directly assigned to
- Companies, projects, and todos are now filtered by user assignments
- Add personal contacts feature

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 07:41:57 +01:00
richardtekula
38e2c5970a Fix: Translate remaining English log messages to Slovak
- validateInput.js: validation error messages
- errorHandler.js: unhandled error message
- validateBody.js: suspicious input message
- crm-email.controller.js: error log messages

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 11:43:37 +01:00
richardtekula
6f4a31e9de Code quality improvements from code review
- Add admin-only authorization for company and projects CRUD operations
- Create requireAccountId middleware to eliminate code duplication
- Standardize error handling (use next(error) consistently)
- Change error messages to Slovak language

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 11:03:32 +01:00
richardtekula
35dfa07668 Improve centralized error handling 2025-12-04 07:39:52 +01:00
richardtekula
109cae1167 Security improvements, role in user creation, todo filters fix
- Remove better-auth dependency (unused)
- Update JWT secrets to stronger values
- Add ENCRYPTION_SALT env variable for password encryption
- Add role field to createUserSchema validator
- Accept role from body in admin.controller createUser
- Fix todo filters: add priority filter, handle completed param
- Remove .env.example (merged into .env)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 09:54:03 +01:00
richardtekula
178b18baa5 Add debug logging for markContactEmailsAsRead and remove password change restriction 2025-11-20 08:00:14 +01:00
richardtekula
da01d586fc initialize git, basic setup for crm 2025-11-18 13:53:28 +01:00