Gestão Condominial
Team projectA platform for professional property managers running 3 to 15 buildings, with data isolation enforced by the database.
- 46
- composite foreign keys for isolation
- RLS
- on the write path too
- 3
- platforms: web, iOS and Android
Overview
A manager signs in once and runs every building; a doorman only sees his shift; a resident only sees their own unit. A team project at the Clube de Software Semiprofissional.
The most interesting part is security: who can see what lives in PostgreSQL (Row Level Security), not scattered across the code.
What it does
- Isolation by the database
- The API runs with the user's identity and policies apply to reads and writes. Forgetting a filter stops being possible.
- One codebase, three apps
- A Vite frontend packaged with Capacitor for web, iOS and Android.
Architecture
Decisions and trade-offs
- SQL is the source of truth
- Hand-written SQL migrations, no autogeneration: an ORM can't represent policies, composite FKs or grants, and would propose dropping everything it doesn't know.
- A column alone doesn't isolate
- Beyond condominio_id on every table, composite FKs stop a row in one building from pointing at another.
Quality and operations
- Endpoint contract tests and real RLS tests, plus schema isolation tests without Docker (PGlite).
Status and next steps
- Account, profiles, buildings, members and invitations are done; units, parcels and notices come next.
Stack
PythonFastAPISQLAlchemy asyncSupabasePostgreSQL 17ViteCapacitor