Inspiration

Kintsugi, or the art of repairing pottery with gold-dusted lacquer, is a Japanese practice that portrays damaged possessions in a manner that sometimes elevates their significance beyond standard "perfect" ones. As a result, the value associated with them factors in the story of the objects' lives, not just their present condition. This philosophy primarily extends to chanoyu, the Japanese tea ceremony, but by applying such perspectives to their daily lives, participants can gain a greater appreciation for the flaws and minor incidents that make every experience unique.

On the other end of the spectrum, the US is the symbol of rapid consumerism. We are always eager to buy new things in the spur of the moment and all too often judge their quality too much by their price tag, but when the novelty eventually fades (either due to an unforeseen accident that harms the item, increasing maturity correlated with decreasing spare time, or merely the shifting zeitgeist), these things are often discarded. Of course, recycling centers and donation campaigns exist, but much of the population isn't incentivized to participate so the vast majority of used objects very quickly wind up in landfills. And that's still a better alternative to having them float into the Great Pacific Garbage Patch, which is a giant clump of trash about the size of Texas.

Synthesizing these two ideologies, I came up with the concept of QPQP, or Quid Pro Quo Plaza, which is an exchange platform. However, it differs from other platforms in two key ways: firstly, I hope to build this into the most multipurpose trading site that ever existed, because increasing flexibility can only help facilitate better swaps, and secondly, the framing of such goods or services is not that of an inferior pool to choose from, but rather a more interesting or more intrinsically valuable set to sample from, which can be relatively easily achieved with descriptive stories of previous users. My hopes are that these two points combined can simultaneously help our communities be better connected with each other and with the environment, and that this principle can be a guiding light in some current trying times of darkness.

What it does

QPQP is (for now) a web app that attempts to simplify the user flow as much as possible. Once someone logs in, they are presented with 3 buttons: one to set up an offer, one to set a request, and one to view their history of offers and requests. The current version of the design includes just a bare minimum number of variables to fill out in each of the first two cases: a title for searching and bookkeeping, a distance metric to quantitatively gauge an individual's interest in traveling for the good or service, a category selection menu for filtering, and a description field. While most forms tend to leave this part optional, I intended for it to be required because it is the user's opportunity to tell a story about what they're offering, or if they're not feeling particularly talkative, they can opt to say something more light-hearted that can maybe brighten someone else's day. If an offer is submitted, it goes immediately into the database, and if a request is submitted, it immediately returns a select few items from the database that may be of interest to the user.

However, the matching process (even at this early stage) is twofold: first, a pretrained word2vec mapping is used on the delimiter-tokenized strings in the title and description fields, and second, the results are fed into a cosine similarity matrix constructor that finally generates optimal rankings based on relevance, then distance. These two slots could realistically have used any word embedding model and any similarity metric, respectively, because the end goal is to fine-tune a pipeline that is most agreeable with the user's transaction history, which can be viewed in their profile along with the transaction statuses. Once a user finds a satisfactory request result, they can choose to directly message the provider. In the best case scenario, this would result in a mutually beneficial trade sans official payment (and the various hurdles associated with that), but even if not, the chain of benefactors can extend through both parties so that it may later be possible to set up a three-or-more-way exchange.

How I built it

I primarily used a Node.js environment with TypeScript wherever possible. For frontend structuring, I used Tailwind CSS paired with shadcn UI components, while the backend involved some JavaScript for the server and matching algorithm as well as the occasional Python files for handling word2vec issues (which also required the use of python environments). Additionally, I used MongoDB to host my database and Postman to test or modify database entries. The authentication for the login process was done through Firebase, and my site is hosted on both Vercel and a custom domain.

Regarding the coding itself, I did some background research on Amazon's customer-based-turned-product-based collaborative filtering before deciding that it was too ambitious of an implementation, and I also looked into the Gale-Shapley Algorithm for matching even though I ultimately scrapped my implementation of it. Last but not least, I did use LLMs (specifically, ChatGPT, Claude, and DeepSeek) to improve my workflow, and I definitely wouldn't have gotten as far as I did without them.

Challenges I ran into

Even though I chose a solo project intentionally, I still found it quite difficult to navigate an end-to-end, full-stack application. On top of that, this was my first hackathon and my first time working on all parts of the stack, so knowing that all responsibility rested squarely on my own shoulders was both a blessing and a curse. My prior experience in backend was also limited to Python, so I had to pick up some JavaScript trivia along the way as a consequence of extensive debugging.

One of the most frustrating low points was discovering (multiple times) that a cryptic error message was just caused by an IP switch for MongoDB, and I also had to figure out how to commit my edits to GitHub without including the 3.64 GB word2vec model, an issue that I hadn't encountered before due to only having saved files of that size locally. Naturally, as the number of parts to my stack grew, so did the probability that one part of it would malfunction, so searching through all the relevant files for those few lines of mishaps was certainly a challenge.

This hackathon being my first one also meant that the pacing did not become linearly worrisome as I'd initially thought, but rather exponentially so because the code becomes so much more annoying to wrangle towards the end. Finally, it's probably worth mentioning that today is the first all-nighter I've pulled in a decent amount of time, but thanks to the generous supply of food, snacks, and drinks provided by our coordinators, this was less of a problem than I thought it would be :)

Accomplishments that I'm proud of

Well, first and foremost, simply reaching a stopping point that I was happy with as a solo first-time participant in TreeHacks was already more than I'd bargained for. There is a certain feeling of internal satisfaction upon being able to attempt something and come out on top, even in the most stressful of situations, so I consider this a personal achievement of sorts and a sufficiently justified reason to procrastinate on my assignments and my sleep.

On the other hand, I'm proud of being able to enjoy TreeHacks as not just a hacker, but also as a human participant. I was able to set enough break time aside to get meals with friends, attend some events, grab so much merch, and find out about some of the coolest events happening in the world, straight from the orchestrators themselves. At the end of the day, I'm glad that I finally gave TreeHacks a chance (after not wanting to wreck my quarterly sleep schedule for 3 straight years at Stanford...), and it has shaped itself up to be an experience to remember.

What I learned

Taking on massive programming tasks alone makes for a tough time, but I'm also not the same inexperienced coder as my freshman self that I still often project my current senior self onto. In working with multiple parts of the stack, I've come to appreciate how delicate yet powerful full-stack applications in the real world are, and I feel like I now have the skills and experience to tackle more of them in the future without losing nearly as much sleep. The true essence of programming really shone through this time, as all the hours spent internally screaming at my computer to "just work properly!!!" were made up for in the first few minutes that I could run a clean start-to-finish demonstration. That kind of elation is what has encouraged, and will continue to encourage, me to learn about computer science and apply those concepts to the world around me.

What's next for QPQP

In the short term, I want to develop a better system to coordinate exchanges from the backend, because the crux of the functionality is there in the matching quality. I know there are also more modern word embedding techniques and presumably similarity metrics as well, so I'll try to incorporate those into the algorithm too. Currently, the messaging hasn't been set up between users because I haven't figured out how to optimally present the trade situation, but that is another goal that will be quite an important stepping stone.

In the long term, I want to evolve QPQP into a sustainable business (both operationally and ecologically) because I firmly believe in the idea that human beings are very much capable of doing good things for each other and our world. Just like in kintsugi, we have nearly come apart at the seams as a society countless times in the past, but there have been heroes large and small who have acted as the adhesive that continues to support us. Living through tough times does not make us weaker, but rather highlights our superhuman resilience when different strengths come together. If we can somehow convince each other to metaphorically place one hand on humanity's heart and one hand on that of Earth, then I have faith that technology can steer the future in a positive direction.

Built With

Share this project:

Updates