Allan Simões AdegasPortuguês
Menu
Back to home

Gestão Condominial

Team project

A platform for professional property managers running 3 to 15 buildings, with data isolation enforced by the database.

Role
Co-author, in a team
Started
2026
manager: every buildingdoorman: only his shiftresident: only their unit
Project illustration
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

Architecture: Gestão CondominialWeb · iOS · Android → FastAPI. FastAPI → PostgreSQL 17. Supabase Auth → PostgreSQL 17. PostgreSQL 17 → Storage · RealtimeJWTclaimsRLSWeb · iOS · AndroidVite + CapacitorFastAPIauthenticated rolePostgreSQL 17RLS + composite FKsSupabase AuthJWTStorage · Realtimeunder RLS
The API assumes the user's identity; the database decides what they can see.

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