Secret Santa 🎅 is a Western Christmas tradition in which members of a group or community 👪are randomly assigned a person to whom they anonymously 👽 give a gift 🎁. This app is a MEAN stack (Version 1); flavour 1 of presenting this project.
- Prototyping, and wireframe: draw.io, Balsamiq.com
- HTML5, CSS, JS, Bootstrap
- AngularJS 1.X
- NodeJS
- Express
- MongoDB, MonngoLab
- Yarn Facebook Package Manager
- GulpJS: As my building tool
- SASS: css of this project was short. but for warm up I put some SASS codes.
- JSdoc: I am new to this world! Codes are commented accordingly. For frontend JSdoc redult is on gh-page of this repository, and back-end RESTful API I learned about the Swagger way, and I add it to project. So can find the
Demonstrating Secret Santa RESTful API with Swagger
at this addresshttp://localhost:3000/api-docs/
Time for this project was short. I have to add more stuff into that soon
- Jasmine: As my test framework.
- Avoid dupicated Santa.
- Register spouse while a Santa registers.
- Mutiple family events: Waiting for round one review from interviewers.
- Refactoring UI codes for log-in based pools: Waiting for round one review from interviewers.
- None unique participants: Waiting for round one review from interviewers.
- Emailing secret santa participants: Waiting for round one review from interviewers.
- Secret Santa over SMS with Twilio: Waiting for round one review from interviewers.
- Assumptions: You have 'Linux like terminal',
node
andyarn
on your machine - Clone the repository on your computer
- Run
yarn
in theroot directory
, and in theapp
directory of the project to get all of the dependencies. - You need a
config
folder inside projectroot
, and insideconfig
should be two filesconfig.js
and `development.json. I can't put the here due to sensitive data. - Type
npm start
ornode server.js
in the working directory shell. - Go to your browser and type
localhost:3000
orhttp://localhost:3000/
Using jsDoc3 and gulp-pages, I have provided a small documentation on the gh-pages of this project live here
- This is for one family e.g Smith family.
- Each family member registers in the Christmas gift exchange to receive a gift.
- People can not receive a gift from their spouse.
- Each Santa should be able to consult the name of the person that he/she have drawn so he/she can buy an appropriate gift.
- We assume that all the participants have a unique name.
- To get the name drawn for a participant, a member just has to enter his own name in the application.
- The Application is based on an honor system. All participants can access the results of everyone in the draw.
- The gift exchange admin can activate an automated draw to impress those who participate and save time.
- Admin email is
[email protected]
. And admin password is123
- Only if admin enters right information, then the pool can be stopped to build matches.
- Only if admin enters right information, then the pool can be deleted.
- I found three dangrous scenarios.
- If parents are left at the end.
- One family of three people.
- Group of odd Santas if they exchange in couples, one of them will be left alone at the end.
- I found two approaches to solve this question. and I went with the second approach.
- Person N will have change from 1-99 selection, N-1 from 1-98, and ... Challenge conditions will be applied.
- We do shuffling for the Santa list. If the shuffled array of Santas meets the condition then we are good to continue
- If Santa enters his/her name twice server side should be able to handle duplication. With array it is easy. I was new to MongoDB but I fix it soon.
- If Santa enter his/her spouse name, sever should be able to handle and build spouse object too. With array it is easy. I was new to MongoDB but I fix it soon.
You can fork the repository, improve or fix some part of it and then send the pull requests back if you want to see them here. I really appreciate that. ❤️
Available here