feat: Supabase backend, onboarding & incorporation-type dropdown #10

Merged
julian merged 1 commit from feat/supabase-database into main 2026-06-15 12:30:42 +02:00
Owner

Summary

Two features on this branch:

1. Supabase backend + first-run onboarding

Replaces the in-memory store with a real Supabase backend (email/password auth, per-user RLS data, on-device cache that hydrates on sign-in and writes through on mutation) and adds a 4-step onboarding wizard for new signups (personal → company → bank → optional contract).

2. Incorporation type as a dropdown

  • New incorporation_types reference table (GmbH, AG, GmbH & Co. KG, Inc., GbR) with attributes (jurisdiction, min capital, liability, register/notary) and a requirements checklist; RLS read for authenticated users.
  • Clean FK: profiles.legal_form_code → incorporation_types.code (free-text legal_form dropped).
  • New SelectField UI primitive + IncorporationInfo panel; the dropdown replaces the free-text field in onboarding and the store profile.

Verification

  • tsc --noEmit clean; expo lint 0 errors.
  • Both migrations applied to the hosted DB; app runs in the iOS simulator (home hydrates; incorporation types load).

🤖 Generated with Claude Code

## Summary Two features on this branch: ### 1. Supabase backend + first-run onboarding Replaces the in-memory store with a real Supabase backend (email/password auth, per-user RLS data, on-device cache that hydrates on sign-in and writes through on mutation) and adds a 4-step onboarding wizard for new signups (personal → company → bank → optional contract). ### 2. Incorporation type as a dropdown - New `incorporation_types` reference table (GmbH, AG, GmbH & Co. KG, Inc., GbR) with attributes (jurisdiction, min capital, liability, register/notary) and a requirements checklist; RLS read for authenticated users. - Clean FK: `profiles.legal_form_code → incorporation_types.code` (free-text `legal_form` dropped). - New `SelectField` UI primitive + `IncorporationInfo` panel; the dropdown replaces the free-text field in onboarding and the store profile. ## Verification - `tsc --noEmit` clean; `expo lint` 0 errors. - Both migrations applied to the hosted DB; app runs in the iOS simulator (home hydrates; incorporation types load). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Replace the in-memory store with a Supabase backend: real email/password
auth, per-user RLS-scoped data, and an on-device cache that hydrates on
sign-in and writes through on every mutation.

- src/lib/supabase.ts: shared client, AsyncStorage session persistence
- src/lib/db.ts: snake_case <-> domain mappers and all reads/writes
- src/store/useStore.ts: session-driven auth, optimistic write-through, cached slices
- src/app/_layout.tsx: Supabase auth gate; routes not-yet-onboarded users to onboarding
- src/app/onboarding.tsx: 4-step first-run wizard (personal, company, bank, contract)
- supabase/migrations: schema, demo seed, and onboarding (empty profile on signup)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
julian merged commit 12a7cfb381 into main 2026-06-15 12:30:42 +02:00
julian deleted branch feat/supabase-database 2026-06-15 12:30:58 +02:00
julian changed title from feat: Supabase backend + first-run onboarding to feat: Supabase backend, onboarding & incorporation-type dropdown 2026-06-15 13:04:27 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
julian/quickfin!10
No description provided.