An open API service indexing awesome lists of open source software.

https://github.com/cdilga/kris-kryngle-coordinator

A web application where the user can enter a list of names of people participating in the Kris Kringle. The webapp randomly assigns each person another person they should buy presents for this holiday season.
https://github.com/cdilga/kris-kryngle-coordinator

Last synced: 3 months ago
JSON representation

A web application where the user can enter a list of names of people participating in the Kris Kringle. The webapp randomly assigns each person another person they should buy presents for this holiday season.

Awesome Lists containing this project

README

          

# ๐ŸŽ… Kris Kringle Coordinator

A delightful web application for organizing Secret Santa gift exchanges! Simply enter participant names, click the magical Pretzel button, and let the app randomly assign who buys presents for whom this holiday season.

## โœจ Features

- **100% Client-Side**: All processing happens in your browser - no data is stored or sent to servers
- **Simple & Intuitive**: Clean interface for adding/removing participants
- **Fair Algorithm**: Uses Fisher-Yates shuffle and derangement to ensure truly random assignments
- **Privacy-Focused**: Click-to-reveal assignments keep secrets safe
- **Mobile-Friendly**: Works great on all devices
- **No Sign-Up Required**: Just visit and start organizing!

## ๐ŸŒ Live Deployment

๐Ÿš€ **Production**: [https://kris-kryngle-coordinator.dilger.dev](https://kris-kryngle-coordinator.dilger.dev)

## ๐ŸŽฏ How It Works

1. **Add Participants**: Enter names of everyone participating in the gift exchange
2. **Generate Assignments**: Click the bright green "Pretzel" button to create random assignments
3. **Reveal Secrets**: Each participant can click on their name to see who they're buying for
4. **Stay Anonymous**: The algorithm ensures no one gets themselves and everyone forms one continuous gift-giving chain

### The Algorithm

The allocation uses a proven derangement algorithm:
1. The list of names is shuffled using Fisher-Yates shuffle for fair randomness
2. Each person at position `i` is assigned to buy for the person at position `(i + 1) % length`
3. This guarantees:
- Everyone gives to exactly one person
- Everyone receives from exactly one person
- No one gives to themselves
- No partitioned cycles (everyone is connected in one chain)

## ๐Ÿš€ Quick Start

```bash
# Clone the repository
git clone https://github.com/cdilga/kris-kryngle-coordinator.git
cd kris-kryngle-coordinator

# Install dependencies
npm install

# Run locally
npm run dev

# Visit http://localhost:8788 in your browser
```

## ๐Ÿงช Testing

```bash
# Run unit tests
npm test

# Run E2E tests
npm run test:e2e

# Run E2E tests with UI
npm run test:e2e:ui

# Test against deployed production site
npm run test:deployed
```

## ๐Ÿ“ฆ Deployment

This project automatically deploys to Cloudflare Pages when you push to the main branch.

### Manual Deployment
```bash
npm run deploy
```

## ๐Ÿ› ๏ธ Technology Stack

- **Frontend**: Vanilla JavaScript (no frameworks needed!)
- **Styling**: Tailwind CSS via CDN
- **Hosting**: Cloudflare Pages
- **Testing**: Vitest (unit) + Playwright (E2E)
- **Build Tool**: Wrangler CLI

## ๐Ÿ“ Project Structure

```
kris-kryngle-coordinator/
โ”œโ”€โ”€ public/
โ”‚ โ”œโ”€โ”€ index.html # Main application
โ”‚ โ””โ”€โ”€ kris-kringle.js # Core allocation logic (for testing)
โ”œโ”€โ”€ tests/
โ”‚ โ”œโ”€โ”€ unit/
โ”‚ โ”‚ โ””โ”€โ”€ kris-kringle.test.js # Unit tests for allocation algorithm
โ”‚ โ””โ”€โ”€ e2e/
โ”‚ โ””โ”€โ”€ kris-kringle.spec.js # End-to-end tests
โ”œโ”€โ”€ CLAUDE.md # Development guidelines
โ””โ”€โ”€ README.md # This file
```

## ๐ŸŽจ Design Philosophy

This project follows the "minimal but delightful" approach:
- **Keep it simple**: No over-engineering or unnecessary complexity
- **Make it work**: Reliable core functionality first
- **Add personality**: Fun error messages and smooth animations
- **Stay focused**: Build what's needed, not what might be needed someday

## ๐Ÿค– Created with Claude

This project was automatically generated using [the-ultimate-bootstrap](https://github.com/cdilga/the-ultimate-bootstrap).