12 Commits

Author SHA1 Message Date
Cauê Faleiros
9ffcfcdcc8 chore: add automated database backup service and tighten backend security
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m56s
- Added `databack/mysql-backup` service to the production docker-compose Swarm stack, scheduling a daily 02:55 AM cron backup of the database with a 3-day local retention policy.

- Fixed a critical race condition in the backend JWT authentication middleware where an invalid token returning 401 could crash the response flow if the route executed before the defensive checks caught it.

- Added strict undefined defensive checks to the `getUserById` endpoint and RBAC middleware to gracefully reject requests that somehow bypass the token parser.

- Updated `GEMINI.md` technical documentation to fully match the real codebase logic.

- Fixed UX rule to prevent `manager` role from seeing Funnels or Origins tabs in the sidebar.

- Blocked `agent` role from modifying their own 'fullName' string in the Profile UI.
2026-03-25 12:40:53 -03:00
Cauê Faleiros
fbf3edb7a1 feat: migrate api key management to dedicated super admin page
- Extracted API Key generation and management from UserProfile to a new /super-admin/api-keys route.

- Added cross-tenant selection in the new ApiKeys page so Super Admins can manage integrations for any organization.
2026-03-16 14:44:16 -03:00
Cauê Faleiros
ef6d1582b3 feat: implement n8n api integration endpoints and api key management
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m6s
- Added api_keys table to database schema.

- Added API Key authentication middleware to express router.

- Created GET /api/integration/users endpoint for n8n to map agents.

- Created POST /api/integration/attendances endpoint to accept webhooks from n8n.

- Added UI in UserProfile (for Admins/Owners) to generate, view, and revoke API keys.
2026-03-16 14:29:21 -03:00
Cauê Faleiros
754c1e2a21 feat: add user preference for audio notifications and play sound on new alerts
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m53s
- Added sound_enabled column to users table with a default of true.

- Implemented a pleasant pop sound (notification.mp3) that plays when a new unread notification arrives.

- Added a toggle in the User Profile page allowing users to enable/disable the sound.
2026-03-10 10:38:03 -03:00
Cauê Faleiros
38eb55793f feat: complete fine-grained RBAC rules across all roles
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m52s
- Restricted Agent view to own dashboard and hid management tabs.

- Allowed Managers to create teams and members but restricted them from editing roles or emails.

- Allowed Admins to update their own email via profile.

- Protected Admin roles from being modified by anyone other than Super Admins.
2026-03-06 13:27:43 -03:00
Cauê Faleiros
e050cbfab1 fix: prevent long team names from breaking UI layout
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m0s
- Added maxLength to team creation input

- Truncated long team badges in user profile
2026-03-03 17:51:15 -03:00
Cauê Faleiros
aa122d646c fix: display correct team name in user profile 2026-03-03 17:39:25 -03:00
Cauê Faleiros
20bdf510fd feat: implement secure multi-tenancy, RBAC, and premium dark mode
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m54s
- Enforced tenant isolation and Role-Based Access Control across all API routes

- Implemented secure profile avatar upload using multer and UUIDs

- Redesigned UI with a premium "Onyx & Gold" Charcoal dark mode

- Added Funnel Stage and Origin filters to Dashboard and User Detail pages

- Replaced "Referral" with "Indicação" across the platform and database

- Optimized Dockerfile and local environment setup for reliable deployments

- Fixed frontend syntax errors and improved KPI/Chart visualizations
2026-03-03 17:16:55 -03:00
Cauê Faleiros
76b919d857 feat: implement real profile save functionality
All checks were successful
Build and Deploy / build-and-push (push) Successful in 1m49s
2026-02-26 10:42:01 -03:00
Cauê Faleiros
6fb86b4806 feat: implement real user profile and authentication state
All checks were successful
Build and Deploy / build-and-push (push) Successful in 2m3s
2026-02-26 10:36:59 -03:00
Cauê Faleiros
dda606ef9b feat: implement real user profile viewing and auth state 2026-02-26 10:18:27 -03:00
farelos
3250ad7537 feat: Implement backend API and basic frontend structure
Adds initial backend API endpoints for fetching users and attendances, including basic filtering. Sets up the frontend routing with a layout component and includes placeholder pages for dashboard, users, and login. Refactors the README for local development setup.
2026-02-23 10:36:00 -03:00