How baranwal-meet10/magic_moment works
GiftLink lets a sender compose a themed message and optional photo, create a private share link, and lets a recipient unwrap it once to reveal the message and any image. The README documents the atomic open, metadata isolation, rate limiting, and private storage policy; sampled route excerpts show the client-side create and reveal responsibilities. Supabase RPC internals and several route details are documented but not present in the supplied source excerpts, so those boundaries are represented at the documented service level.
Main entry points: create.tsx Gift authoring · g.$slug.tsx Gift reveal · client.server.ts Admin client · gift-images.functions.ts Signed image URLs
Components 17
Gift journey
- Landing page
src/routes/index.tsx - Gift authoring
src/routes/create.tsx - Gift reveal
src/routes/g.$slug.tsx
Gift presentation
- Theme engine
src/lib/theme.ts - Theme picker
src/components/theme-drawer.tsx - Touch controls
src/components/mobile-touch.tsx - Create progress
src/components/wrapping-loader.tsx - UI primitives
src/components
Runtime platform
- Supabase client
src/integrations/supabase/client.ts - Admin client
src/integrations/supabase/client.server.ts - SSR request handler
src/server.ts - Error response page
src/lib/error-page.ts
Security and media
- Gift RPC service
- Postgres gifts
- Private image storage
- Signed image URLs
src/lib/gift-images.functions.ts
Other components
- Visitor
Connections 19
- Visitor → Landing page: opens site
src/routes/index.tsx - Visitor → Gift authoring: creates gift
- Visitor → Gift reveal: opens link
- Gift authoring → Theme picker: selects theme
src/routes/create.tsx - Gift authoring → Theme engine: uses theme
src/routes/create.tsx - Gift authoring → Create progress: shows progress
src/routes/create.tsx - Gift authoring → Supabase client: calls API
src/routes/create.tsx - Gift authoring → Private image storage: uploads photo
src/routes/create.tsx - Gift authoring → Gift RPC service: creates gift
README.md - Gift RPC service → Postgres gifts: writes gift
README.md - Gift reveal → Supabase client: calls API
src/routes/g.$slug.tsx - Gift reveal → Gift RPC service: looks up and opens
README.md - Gift RPC service → Postgres gifts: reads and opens
README.md - Gift reveal → Theme engine: styles reveal
src/routes/g.$slug.tsx - Gift reveal → Touch controls: uses controls
src/routes/g.$slug.tsx - Gift reveal → Signed image URLs: requests image URLs
src/routes/g.$slug.tsx - Signed image URLs → Admin client: uses admin client
src/lib/gift-images.functions.ts - Admin client → Private image storage: signs image access
README.md - SSR request handler → Error response page: renders on error
src/server.ts