Project 05Private project
Resident App and Staff Dashboard for a Non Profit
A resident app and staff dashboard for a non profit that runs supportive housing communities, built so residents get updates, events and help in one place without the app ever becoming a safety risk.
Who uses it
Residents of the non profit's housing communities use the mobile app (iOS, Android, or installed from the web). The organisation's staff and admins run everything from a web dashboard, with no code or database console needed.
Why it was built
Residents had no single place for announcements, events, reminders and help, and staff had no way to run it. Many residents are in vulnerable situations, so an ordinary community app with open sign up, a member directory or location features would have been a hazard. I built it so that every safety rule is enforced by the database, not by hiding things in the interface.
What it does
Residents get a Home screen with reminders, upcoming events, quick actions and pinned announcements, plus a community feed with photo posts, event signups with capacity limits, a resources hub with help contacts, FAQs and information pages, and maintenance requests. Messaging is opt in, with block, report and staff suspension, and staff can message residents and run small groups. Emergency alerts take over the whole app until the resident acknowledges them, and reminders push the day before they are due. On the dashboard, staff create residents and their sign in codes, post content, manage events, alerts, reminders, badges, work orders, staff accounts and bug reports, review messaging under a configurable oversight policy, and export insights and bug reports.
What it serves
It gives residents one calm, safe place for the information and help their community offers, and gives staff a dashboard they can run without a developer. Success is staff running every workflow themselves after handoff, and no feature ever exposing where a resident is or who they are to someone outside their community.
Under the hood
An npm workspaces monorepo with an Expo (React Native) app on Expo Router for iOS, Android and web, a Next.js 16 App Router staff dashboard on Vercel, and shared packages for generated Supabase types and design tokens. Supabase provides Postgres, Auth, Storage, Realtime and Deno edge functions, and the schema lives in about fifty versioned migrations. Row level security is the source of truth for access: residents see only their own community, and roles, suspension and location cannot be changed by the resident because a trigger blocks it. Push is server side only: database triggers call a dispatch function that uses pg_net to hand off to a send-push edge function, which is the only place the service role key lives besides dashboard server routes, and pg_cron runs the daily reminder job and an hourly job that ends idle sessions.
Flow
- Staff create a resident
- A single use code is issued
- They claim it once and set a login
- They see only their own community
- Writes trigger push server side
Built with
- Expo
- React Native
- Expo Router
- Next.js 16
- TypeScript
- Supabase Postgres
- Row level security
- Supabase Edge Functions (Deno)
- pg_cron and pg_net
- Expo Notifications and Web Push
- Tailwind CSS 4
- Vercel
How I built it
- I started from a written set of non negotiable safety rules (no directory, no location features, photos re encoded to strip GPS data, opt in messaging, community separation in RLS) and put them at the top of the project instructions so every later decision deferred to them.
- I built the first eight phases in order: auth and community separation, the feed, events and signups, the resources hub, push and emergency alerts, messaging, badges and resident management, then reminders and Home as the daily front door, with the staff dashboard built alongside each one.
- I replaced the visual layer with a new design system from a design handoff, moving every colour and type value into a shared tokens package that both apps import, and rebuilt each screen on it.
- I replaced open invite codes with per resident claim codes that staff generate, plus a five step onboarding, and wrote a resident lifecycle test that runs against the live database from creation through deletion.
- After QA, I ran a security hardening batch: single use codes, a database backed wrong code limit, an 8 character password minimum, lost phone handling that ends every session, idle session expiry, and a guard against residents posing as staff, each one added to the lifecycle test.
- I added a second batch of staff features (work orders emailed to the property manager, staff messaging and groups, insights, web push for the installed web app, delete rules) and wrote handoff and cleanup documents so staff end up as the only accounts.
Key decisions
- I enforced access control in Postgres row level security and SECURITY DEFINER functions rather than in the client, because the client is untrusted and a hidden button is not a safety guarantee.
- Residents never sign up. Staff create the account and a six character single use code that expires after 14 days, and the claim-code edge function mints the session with a one time link so the code never enters the password space.
- I moved the wrong code rate limit from edge function memory into a database table, because an in memory counter reset on every cold start and differed per instance, so it never actually held.
- Push notifications are triggered by database writes, not by clients, and the dispatch function swallows errors so an emergency alert is always saved even if the push fails. Diagnostic functions exist because those failures would otherwise be invisible.
- Suspending a resident or regenerating their code deletes every session and replaces their password, and every policy checks that the session in the token still exists, so a lost or taken phone is cut off immediately instead of after the token expires.
- The staff message visibility policy and the disclosure text residents see are stored as configuration editable from the dashboard, so the organisation can decide its policy later without a new release, and residents are always told plainly what staff can see.


