App icon

swap.ts

Gift exchange matcher for Secret Santa style events

PostgreSQL

SvelteKit

TypeScript

Description

A gift-exchange organizer for Secret Santa and other group gift swaps. Organizers create a group, invite participants with a join code, and set restrictions on who can be matched together. Each participant is assigned one person to give to and one person to receive from, without matching themselves. Participants can leave gift ideas or preferences in an optional message and receive an email when their recipient is ready to view.

I built swap.ts with SvelteKit, PostgreSQL, and Drizzle ORM. The matching algorithm uses randomized backtracking to find assignments that satisfy the group’s restrictions and detects when no valid arrangement is possible. I also integrated account verification, password resets, and email notifications, with controls for managing members, editing restrictions, and regenerating matches.

Screenshots

swap.ts new groupswap.ts homepageswap.ts join group modal