Shagun — Online Wedding Gift Platform
Shagun is an online wedding gift platform built with Next.js and TypeScript. Couples generate and share a unique QR code — guests scan it and send gifts digitally as Stripe payments, video messages, or image greetings. The platform runs as two completely independent sites: a User Site where couples manage their gift pages and guests send gifts, and a dedicated Admin Panel where the admin manages all couples, all users, roles, and rights across the entire platform.
Tech Stack
Admin Panel
- Manage all couples — create, edit, view, suspend, and configure every couple profile and their gift page
- Manage all users — view and manage all registered users across the platform
- Role & rights management — assign Admin, Couple, and User roles and control access permissions per user
- Complex Recharts analytics — dashboards showing gift counts, payment volumes, user growth, and couple activity
- Platform-wide CRUD — full control over all platform entities from a single admin interface
- Admin URL: admin-panel-shagun.vercel.app/users/admin
User Site
- Couple dashboard — manage gift page, view all received gifts (payments, videos, images), and track totals
- Guest gift flow — scan QR code → choose gift type (payment / video / image) → send in one seamless flow
- Stripe payment flow — guests pay monetary gifts securely with instant confirmation and receipt
- Video & image gifts — guests record or upload a personal message alongside or instead of a payment
- Gift history — couples see a full log of all received gifts with sender details and timestamps
- User Site URL: wedding-gift-app-six.vercel.app/dashboard
Problem Statement
Wedding guests traditionally give cash gifts at the event — inconvenient for remote guests or those who prefer digital. Shagun needed a platform where couples could share a QR code and guests could send gifts in any form (money, video, image) from anywhere, while the admin could centrally manage all couples and users across the platform.
Architecture Overview
Two separate Next.js applications sharing a common API layer — the User Site (wedding-gift-app-six.vercel.app) for couples and guests, and the Admin Panel (admin-panel-shagun.vercel.app) for platform management. React Query handles all server state with optimistic CRUD updates. Zustand manages auth context and gift flow state. Stripe Checkout handles payment processing. Recharts powers the analytics dashboards on both sites. Role context is enforced at the API and route level — Admin, Couple, and User roles have strictly scoped access.
Challenges
- Building a dual-site architecture where two Next.js apps share a common backend and auth system
- Designing a gift flow that accepts three different input types (payment, video, image) through a single unified UX
- Implementing role-based access control across Admin, Couple, and User roles with per-entity permissions
- Keeping complex Recharts dashboards accurate across payment and gift data without over-fetching
- Managing QR code generation, sharing, and deep-link routing to the correct couple gift page
Solutions
- Shared API layer with role-scoped endpoints — both Next.js apps authenticate against the same backend with JWT role claims
- Gift flow implemented as a multi-step wizard — step 1 selects gift type, subsequent steps adapt conditionally based on selection
- RBAC enforced at Next.js middleware level — route protection per role on both sites with server-side validation
- React Query with targeted cache keys per entity — mutations invalidate only the relevant query keys, not the full cache
- QR codes encode the couple ID and route — scanning redirects to the couple-specific gift page via dynamic Next.js routing
Results & Impact
- Live Admin Panel at admin-panel-shagun.vercel.app/users/admin — full platform management operational
- Live User Site at wedding-gift-app-six.vercel.app/dashboard — couples and guests actively using the platform
- Three gift formats (payment, video, image) delivered through a single seamless QR-code-triggered flow
- Full Stripe payment pipeline live — secure online monetary gifts processing in production
- Admin has complete visibility and control over all couples, users, roles, and platform activity in one dashboard