Gift exchange system #Devember2020

FokkFeis does Devember 2020

The idea.

Gift exchange platform

Technology stack I want to learn

  • Vue JS frontend
  • Go backend

Bonus stuff

  • Automatic deployment
  • Automatic testing
  • Docker

Features that we want to implement

  • User signup
    – Users signup with a username/Name and email so they can take part in the gift exchange
  • Exchange groups
    – isolated groups that can be created by the user.
    – invitation code to join the exchange group
    – Group owner can set a date for the “draw” of users to exchange gift
    – Group owner can set the maximum gift value.
  • Day of the exchange
    – Guessing who gave you the gift.
    – opt in displaying the result

Minimum viable product

Backend
  • Pool of emails tagged with a name.
  • Giving each entry a name to give a gift to
  • Sending each entry an email with information about who to give the gift
Frontend
  • Displaying the list of emails in the pool
  • Displaying who was assigned to who

Blogging section

Day -13

Hello everyone.
As this is my first Devember I thought it would be fitting to scope this way out of proportions. Since I have almost no experience in creating Go code or Vue code this will mostly be a learning exercise.

I expect that I’ll be able to create the MVP in Go by the end of the month but adding the desired features would be a fun achievement.

The plan is to only create the workflow for the project until 1st December. Then the actual coding will start.

I hope that I’ll be able to do daily updates during December but until then i will try to do periodic updates.

I will of course deploy this on Linode as I just got the $100 credit.
Until next time.
– FF

2 Likes

Does this mean the date when the user group basically locks down and everyone is assigned a random person.

One cool idea that should be failrly easy to implement and might be useful is if users could “exclude” certain users (like in the scenario where a pair of significant others both want to participate but obviously wouldn’t want eachother)

1 Like

Yup that was the idea.

I’ve been thinking about the edge cases regarding the draw. This idea makes sense and I’ll add to to the notion document :slight_smile:

another one of these edge cases is if you have children and they give someone a gift. probably better the kids don’t get their parents.
There are other things to consider and I will sum them up in the next update when I have setup most of the requirements I want to have.

Yeah exactly! There’s so many scenarios I figured it easiest just to allow users to manage exclusions.

“Group Owner” -> toggle feature for “exclusions” (w/ possibly numeric field for max exclusions - to prevent someone excluding people to get their desired pick haha! … the Michael Scott’s of the world.)

Individual group members -> If “exclusions” is enabled they see a series of checkboxes for each member. They can check to exclude individuals they shouldn’t be paired with (up to the max # of exclusions they are allowed).

If you do decide to end up adding this let me know. You’ll need an algorithm to ensure there is a possible “draw” (i.e., that the exclusions haven’t been set such that you can’t render a valid draw). I think that algorithm would be at least somewhat amusing to work on and would definitely be willing to help out if ya get stuck!

Day 1

After a very stressful and long weekend, (Thank you Black Friday and Cyber Monday) we can start building something.

Anyway.

Our end goal is to have an API that handles any logic in the gift exchange platform

So I think the first step is to write that up in GO.

writing…

Ok now we have an “API” that can handle some requests
image

Now we’ll docker-ize this.
writing…
We now have a docker image setup for our “API”


Now let’s start working on the exchange.
I need to look at what datatypes in GO would be suitable for our needs. if we are going to be sending the data to a frontend, json would be nice.
reading…
Ok, It seems we can use struct to keep our user data and the package “encoding/json” to keep the data nice and jsonifed

type User struct {
  Name string `json:"Name"`
  Email string `json:"Email"`
}

This will be fine for now.

Our /users endpoint also works
image

And for our Matches, we need to track who gives who.

type Match struct {
  receiver string `json:"Giftee"`
  Giver string `json:"Gifter"`
}

So now we need some logic to automatically populate our Matches with the data from Users.


I think I will call it a day today. Some progress was made.

What we did today

  • Setup a base for our GO API
  • figured out how to store our data in go
  • Made everything nice and json, thanks to the encoding/json package
  • Put our GO API into Docker

For tomorrow, we want to

  • populate our Matches with the supplied users
  • setup a database to hold our User and Match data.
  • If we get time, get started on boilerplating the frontend.

This was about an hour of doing and reading stuff. We got our boots of the ground and that always feels good.

1 Like

What’s the status of this project? :slight_smile:

1 Like

Our baby came way earlier than expected and we’ve been embracing that role. Any and all side projects have been put on ice due to that.

I do plan on finishing this (Guess I have more time to get it ready for next year) but I have to change some diapers first :slight_smile:

1 Like