TI Conecta

Internal portal for the tax department, with access by role, company and branch, generating SAFX tax files through n8n workflows.

Year
2026
Status
Internal use
Role
IT Analyst: product, architecture, build and testing
Client
Grupo Pluma

Context

The tax department at Grupo Pluma needs to generate SAFX files (SAFX13 and SAFX82) and control who can see and generate what, by company and branch. TI Conecta is the internal portal that does both.

What I built

  • Generation, listing, download and deletion of SAFX13 and SAFX82 files, with the file produced by an n8n workflow.
  • Cookie-based sign-in and a menu built from each person’s permissions.
  • Role-based access control (RBAC) scoped by company and branch, and an admin area to create users and list profiles.

Technical decisions

  • The access rule lives in the database. Permissions are enforced with Row Level Security and SQL functions, not only in the interface; hiding a button is not security.
  • Permission changes with a known delay. The authorization cache has a configurable lifetime, so a permission change takes effect within a predictable time.
  • Nothing from the database gets in unchecked. Every database response goes through Zod schemas before reaching the screen.
  • Idempotent SQL scripts, in a documented order, so they can be re-run safely.
  • Without configuration, the app says so. Without the Supabase keys the system still starts and shows a pending-configuration notice instead of crashing.

Results

  • 160 automated tests and Docker deployment.
  • Tax files generated by a workflow instead of assembled by hand.
160
automated tests
2
tax file types generated: SAFX13 and SAFX82

Stack

  • Next.js 16
  • React 19
  • TypeScript
  • Supabase
  • Tailwind CSS
  • Zod
  • n8n
  • Vitest
  • Docker