LifeMate — Personal, Family & Learning Companion
docs: supersede Supabase backend ADR
davoodmehraban89 committed
Oct 5, 2026 at 07:29 UTC
be91a400a2c06a10a2a17cd8e40430fcbe0f7bd1
1 file changed
+3
-20
docs/decisions/0005-backend-supabase.md
+3
-20
@@ -1,24 +1,7 @@
1
# ADR-0005 — Backend/Auth Baseline: Supabase
2
3
-- **Status:** Accepted for Phase 2 baseline
3
+- **Status:** Superseded
4
- **Date:** 2026-10-05
5
+- **Superseded by:** `0004-provider-neutral-postgresql-backend.md`
6
6
-## Decision
7
-Use **Supabase** as the initial backend platform: PostgreSQL + Supabase Auth + Row Level Security, with Edge Functions/server-side code for privileged workflows, AI orchestration and secrets.
8
-
9
-## Why
10
-LifeMate needs relational family/guardian/resource relationships, granular authorization and email/password recovery. Supabase Auth integrates JWT identity with PostgreSQL RLS, allowing authorization to remain consistent across Android and Web/PWA clients.
11
-
12
-## Security contract
13
-- Enable RLS on every exposed application table.
14
-- Explicitly set grants and separate policies by operation; do not assume RLS alone removes broad grants.
15
-- Test allow and deny paths for authorization policies.
16
-- Publishable client key may exist in clients; service-role/secret keys never do.
17
-- Privileged AI/provider calls, invitation administration and sensitive safety workflows execute server-side.
18
-- Views/functions must be reviewed for RLS/security-definer behavior before exposure.
19
-
20
-## Auth baseline
21
-Email/password with email verification, non-enumerating forgot-password response, time-limited recovery flow, authenticated password change and controlled redirect URLs. Custom SMTP/provider selection is an operational Phase 2 task, not a reason to build custom authentication.
22
-
23
-## Alternatives considered
24
-Custom API/Postgres would provide full control but adds auth/security/operations work before core product value. Firebase simplifies some mobile flows but the relational authorization model is a less direct fit for family/guardian/resource policy. Supabase remains replaceable behind domain/service boundaries if later scale or compliance requirements justify migration.
\ No newline at end of file
7
+Supabase was initially selected as the Phase 2 combined PostgreSQL/Auth/RLS platform. The project subsequently moved to a provider-neutral PostgreSQL architecture with explicit identity/API/email/storage adapters. This file remains only as decision history and must not be used as current implementation guidance.