Check out the walkthrough
Inspiration
Over the past six months or so, I've been volunteering at a charity called Manchester Cares. Their premise is fairly simple; younger people tend to have lots of connections but very few roots in their community, whereas older people have very few connections but often deep-seated connections to their local area. Manchester Cares brings these two groups together so that they might help each other find the value in each other's lifestyles.
This project isn't affiliated with Manchester Cares, but my time there has just taught me that creating fewer but more meaningful relationships is how you really combat isolation. Surface interaction with large groups doesn't cut it. Now more than ever we need to fight the isolation caused by the Coronavirus pandemic.
What it does
cuppa invites you to join and find others in your local area that are seeking or offering help. Those in need of help are presented with matches near to them and they can choose whether to engage with each suggested match.
Matches are limited to 4 per person. This is the the differentiator. It's not about getting hundreds of followers, it's about getting to know someone on a personal level.
How I built it
After a brief chat with my partner Craig, we decided that we'd just have to go with something that would allow us to move extremely fast. Rails was the obvious choice. Heroku was a great partner. We would have liked to have been able to use more of a front/back split with some newer technologies (Hasura, GraphQL, Svelte - among others) but this seemed like the most sensible route.
Following about 4 hours of analysis and story mapping, I created a nice backlog that would be easy to work through and not lose track of the big picture. Craig and I decided to split into back and front-end focus.
The GitHub pipeline that I set up provides us with feature apps for every pull request, meaning that we can push to production with absolute confidence that it's going to work. The tests also run and act as a gate.
Challenges I ran into
By far the biggest challenge was the time constraint. We were both at work for a whole day of the time period and Craig had to leave and be a good father for a significant portion of the time (more than he anticipated). This left us with quite a big hole in quality and an outstanding story related to onboarding users.
Secondary to this, some of the ideas that I wanted to implement were really dependent on some nice, dynamic front-end work. This was slowed down for quite a while as I navigated the not-very-well-documented land of React+Rails. AJAX requests from components that also handle CSRF tokens and other things Rails expects took a while to overcome.
Accomplishments that I'm proud of
The pipeline is great. It really made shipping changes right to the end a dream. There is a final step of manually deploying to production that still isn't automated, but this is minor compared to the trust that we gained having feature apps for every pull request.
The matching algorithm is, I think, simple enough that it's easy to understand and robust enough that it will scale very easily. There are definitely some holes that need patching up but overall it works well.
@matches = User
.available
.helper
.where.not(id: previous_matches)
.limit(100)
.select{ |user| user.within?(max_distance, current_user) }
.sort{ |a, b| a.distance_to(b) }
I'm also quite proud of the amount of work that I managed to get done in such a short space of time, whilst it continues to be (not amazingly well but) fairly well tested. Despite losing 50% of the team for large portions of the time, we still managed to pull together something pretty good.
What I learned
Thinking through more and more of the edge cases and human-related interactions, especially surrounding vulnerable people, is always a challenge and always reveals that it's not as simple as you thought it might be (even when you know it's going to be a minefield!)
In a less significant way, I learnt some excellent nuggets about how Rails can handle secrets, static files and client-side AJAX requests. I also had a nice play around with the new Google Maps APIs that I had heard at a talk a while ago but not managed to work into any of my projects yet.
What's next for cuppa
There are some significant features that I would like to see implemented, these include:
- the unfinished onboarding flow that guides users through building up their profile
- realtime chat capabilities in the app over some socket connections
- emails/notifications of matches when you're not in the app
- turning the app into a Progressive Web App to allow people to use it on their mobile devices more fluently (and gain the performance and stability upgrades that a PWA affords)
Log in or sign up for Devpost to join the conversation.