-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
Milestone #1Road map tranchesRoad map tranchesfellowOnly Dust FellowshipOnly Dust FellowshipintegrationAPI integration of another tool in the stellar ecosystemAPI integration of another tool in the stellar ecosystemonlydust-waveContribute to awesome OSS repos during OnlyDust's open source weekContribute to awesome OSS repos during OnlyDust's open source week
Description
Issue: Supabase and Drizzle ORM Integration for Escrow State Sync
Difficulty: Intermediate
Estimated Time: 6-8 hours
Documentation:
- Drizzle ORM: https://orm.drizzle.team/docs
- Supabase Docs: https://supabase.com/docs
Goal
Integrate Supabase and Drizzle ORM to store and retrieve escrow-related data such as engagements, milestones, approvals, and user metadata. Build reusable hooks to enable interaction with the database using a modular and maintainable approach.
Expected Outcome
- Schemas for escrows, users, milestones, statuses, and approvals.
- Custom hooks to create, update, delete, and fetch data from Supabase.
- Integration with frontend components.
Tasks
-
Set Up Drizzle + Supabase
-
Connect Drizzle ORM to Supabase using the proper configuration.
-
Create schema definitions for the following tables:
- escrows
- milestones
- approvals
- users
-
-
Create Custom Hooks
-
Create the following hooks under
/apps/webapp/hooks/escrow/:useCreateEscrowuseUpdateEscrowuseDeleteEscrowuseGetEscrowsuseAddMilestoneuseApproveMilestone
-
-
Organize Services
- Place database access logic under
/services/supabase/ - Follow RORO (Receive an object, return an object) pattern
- Place database access logic under
-
Real-Time Updates
- Use Supabase real-time subscriptions or implement polling to update UI on status changes
-
Secure Access
- Ensure data is scoped per user using Supabase auth
- Protect routes and hook logic from unauthorized access
-
Write Seed Script
- Add a utility to populate the database with sample escrows and milestone records
-
Testing
- Add tests to verify custom hooks perform the correct DB actions
- Simulate end-to-end usage of creating and updating escrow records
Metadata
Metadata
Assignees
Labels
Milestone #1Road map tranchesRoad map tranchesfellowOnly Dust FellowshipOnly Dust FellowshipintegrationAPI integration of another tool in the stellar ecosystemAPI integration of another tool in the stellar ecosystemonlydust-waveContribute to awesome OSS repos during OnlyDust's open source weekContribute to awesome OSS repos during OnlyDust's open source week