Project · 2024 → 2025
Publicidade da Cidade
Vendor compliance for agencies serving city governments
Portal that tracks tax, labor and registration certificates for hundreds of vendors per client, queries government agencies automatically and publishes everything on a transparency portal as required by Brazilian Law 12.232/2010.
Screens
What it does
- Vendor and media-outlet registry with dynamic attributes (EAV)
- Document upload, versioning, approval and expiry tracking
- Automatic lookups on CND, CNDT, FGTS, CEIS, SEFAZ, TCU and JUCESP
- Proactive renewal: a daily job re-queries certificates about to expire
- Vendors submit documents through a magic link, no account needed
- Public portal per city with ISR and financial transparency
Stack
- Python 3.11
- Django 5.2
- Graphene
- GraphQL
- PostgreSQL
- django-tenants
- Celery
- Redis
- AWS S3
- React 19
- MUI 7
- Apollo Client
- Next.js 15
- Tailwind v4
- GitHub Actions
- ECS Fargate
- Vercel
Backend, dashboard and public portal
Technical challenges
Where the problem pushed back.
Schema per city
django-tenants resolved from the X-Tenant-ID header, tenant-aware Celery, S3 with a per-tenant prefix and subdomain middleware in Next.js.
Async certificates
Every agency has a different API, format and validity field. All normalized into a pending → querying → success/error cycle, with status derived via dataloaders.
Dynamic filters over EAV
Configurable attributes compiled into one Exists() per attribute, producing runtime filters in the dashboard and the portal.
Saleor-style GraphQL
Relay connections, per-module dataloaders, declarative permissions, multipart upload and a chained plugin system.
Safe anonymous upload
Single-use token, type/size/date validation, quarantine until approval. An e-mail failure never blocks the operation.
Lean operations
Celery worker with embedded beat and a memory cap to run on small infra, with an alternative pipeline for ECS Fargate.