Paulo Lucas Cerqueira
All work

Chapter

A serverless social reading app for iOS, Android and web. One engineer, one month, and the scope a small team would put on a half-year roadmap.

1engineer
3platforms
27languages translated
21decision records

// The constraint

Chapter had stalled: no infrastructure, no database design, no path to deploy, and no budget for a team. Getting it out meant choosing a stack that does a lot with very little, and being strict about the few parts that carry real risk.

// What shipped

Book clubsClosed clubs with a current book, a deadline and each member's progress on it.
Badge engineBadges are data. New ones ship from the backoffice without an app release.
Real-time feedActivity feed and notifications, live.
27 languages translatedEnglish, Portuguese and Spanish ship first; the other 24 are ready to publish as remote packs.
BackofficeA separate web app; every admin action goes through an audited function.
Remote configFeature flags, app version rules and banners, changed without a release.

// How it's built

Chapter architecture. The Expo app reads and writes Postgres directly through supabase-js and Realtime, checked by Row Level Security, and reads remote config through app_config(). Edge Functions handle catalog search and import from Open Library and Google Books, and push; only they write the catalog, with the service role. The backoffice web app calls audited RPCs with the admin's own session. Errors go to Sentry. Expo appiOS · Android · Web Postgres + RLSPostgREST · Realtimesecurity boundary reads · writes · realtime supabase-js · app_config() Sentryerrors · PII stripped Edge Functionscatalog search · importrate limit · cachepush · jobs BackofficeVite + React web appadmin's own session Book APIsOpen Library · Google Books catalog search catalog writes (service role) audited RPCs
The app reads and writes Postgres directly, and gets remote config from one function, app_config(). RLS policies, not app code, decide who can read what. Only the Edge Functions write the catalog; the backoffice uses the admin's own session and audited functions.
ADR 0001. Supabase as the backendaccepted
## Decision

Use Supabase: Postgres + Row Level Security + Realtime + Auth + Edge Functions. The client uses `supabase-js` directly; RLS is the security boundary (the equivalent of Firestore rules); Realtime pushes changes without hand-written websockets.

## Consequences

- Joins, aggregates, full-text/trigram search and triggers are plain SQL; schema lives in versioned migrations; TS types are generated from the schema.
- Nothing is protected by hiding endpoints: **every table must have RLS enabled and tested** (`supabase/tests`).
…

// How I worked

Every significant choice went into one of 21 decision records, every change was reviewed, and a QA pass on a real device fixed 35+ issues before beta. AI tools sped up the implementation; the decisions and the review stayed mine.

// Where it is

Heading into Android beta. The Play Store link goes here when it opens.