sjpoulin / secretsanta

Secret Santa Sorter web app. Final project for CS50.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Secret Santa Sorter

Video Demo:

YouTube

Description:

Secret Santa Sorter is a web application that enables users to input names and sort them so that each participant will be assigned a unique gift recipient among the group of participants. The web app is programmed so that no participant will "get" him or herself for the gift exchange.

This program was designed as the final project for the HarvardX course CS50's Introduction to Computer Science, instructed by David Malan.

Requirements and Installation:

Flask is required for use of this program. It can be installed by running:

pip install flask

A requirements.txt file is included with this program so that the user can alternatively install Flask running:

pip install -r requirements.txt

Usage:

Running through the Command Line on Windows and MacOS:

flask run

From the home screen, the user can input names via the submit form on the home page. Two or more names are required for sorting, or else the web app will route to an error page.

The user has these options from the home screen:

Sort! - The web app sorts the listed names and routes to a page that matches the list of givers with a list of recipients. Clear - All submitted names are cleared so the user can start over.

Once the user sorts their entries and is routed to sorted.html, they are presented with more options:

PDF - The user can download a simple PDF of their givers and recipients to be printed, emailed, etc. The export function uses jsPDF and html2PDF as CDN libraries to export user data. Add More - The user can go back to the home screen to add more names. Previously added entries are retained upon routing to the home page. The user can also clear submitted names from the sorted page.

Credits:

Libraries Used:

Bootstrap Flask jsPDF html2PDF

Other Credits:

  • Shuffle function created with help from Stack Overflow
  • PDF function created with help from Byte Blogger
  • Link images courtesy of Free Logo Vectors
  • Santa image: "Santa claus sitting beside lit tree photo" by Tim Mossholder via Unsplash
  • Santa image: "santa and his sleigh being pulled over by police on a snowy road", generated with Bing AI Image Generator

Special Thanks:

  • My wife Laura for being a constant source of inspiration and encouragement
  • David Malan and the CS50 team at Harvard University

Created by Spencer Poulin 2023
Github

About

Secret Santa Sorter web app. Final project for CS50.


Languages

Language:HTML 76.4%Language:Python 14.2%Language:CSS 9.4%