π Swap App Documentation
Overview
This is a peer-to-peer item swapping platform where users can list items, chat securely, receive notifications, and manage their profile. The application is powered by Next.js 13+, Supabase, and TailwindCSS.
Key Features
- π Swap items between registered users
- π¬ Real-time chat with read receipts
- π Notifications when messages arrive
- π€ User profile updates (phone, address, location)
- π My Listings page to view your own items
- π Row-level security to protect user data
How to Use
- Sign up or log in to your account.
- Update your profile with phone, address, and location.
- List an item you want to swap in the New Listing page.
- Visit /swap/[id] to view an itemβs details and chat with the seller.
- Track your messages and notifications in real-time.
- See all your items in My Listings.
Developer Notes
- Auth: Managed by @supabase/auth-helpers-nextjs.
- Database: Supabase tables β
items,profiles,messages,notifications. - Storage: Item images are stored in Supabase storage bucket
item-images. - RLS: Enabled for all tables to ensure privacy. Test queries available under
/docs/rls-test.sql. - Real-time: Subscriptions handled with Supabase channels.