11 ms·
Show HN: Kardius – find people like you, near you – made with Rust and Rocket
- pitherandd 6y agoHi Hacker News, I was looking for a project to learn Rust with and improve my webdev skills, so I came up with the idea of Kardius. After reading The Rust Programming Language I began work on it. I posted it on reddit some months ago and tried to iterate on their feedback, so now hopefully it's ready for the big stage of Hacker News! (still very nervous though) Basically, I had remembered Paul Graham's advice of "make something that you yourself would want", and I had always wanted a way of finding like-minded people around me. I had the idea for a website / app that let you swipe on concepts instead of people. For example, cards like "Hunting, Vaccines, Cities, Podcasts" would appear, and swiping right on them would mean you liked the idea or identified with the concept, with swiping left indicating the converse. So, I made just that. It then uses the Manhattan distance formula to compute your similarity to others. You can also view statistics like the average swipe value for a card and how that card correlates with other ones (e.g. Hunting and Guns are highly correlated with each other). You can then also view clusters of cards on profile pages. These are groups of cards with votes highly correlated with one another (initially found via SciKit's Agglomerative Hierarchical Clustering Function). You can then see how users align to these clusters. Another reason for clusters is because I am using the Postgres CUBE data structure to compute similarity between users, and CUBE caps out at 100 elements (and there's currently 250 cards). So to resolve that votes for cards are clustered into, well, clusters, and then the distance between CUBEs can be calculated, and this can all then be indexed for high performance similarity searching. There is also the Interests page that lets you enter your individual interests. This is because not every interest can be a card as there can only be so many and the ones that do exist should be well-known and relatively controversial to give better predictive power. So, once the base similarity is established via swiping on popular topics, this page lets you tag yourself with whatever you'd like and then also search users and posts for these tags as well. There's also an interface on the Conversations page to easily keeping track of the latest posts for your interests. In addition, you can privately message users and publicly create posts and tag them with whatever you'd like (examples: Rust, Hiking, etc.). You can also filter users and posts by date, similarity, age, and distance. My backend dependencies are currently rand, bcrypt, serde, rusoto (for uploading avatars to s3), oauth2, reqwest, time, rocket, tokio, futures, deadpool (database connection pool), web-push, deunicode, async-stream, and pin-project-lite. For Rocket I am using the async branch (recently merged to master, hooray!) and thus far it's been great. I'm extremely happy with it, both due to its technical merit but also because of the tremendous help the creators provide in terms of technical support. It was my first Rust project so I had a ton of beginner questions along the way and they were always extremely patient and insightful. The rocket server is currently hosted on a free-tier AWS EC2 instance. For real-time messaging, I ended up creating a Server Sent Events library. It's basically just a channel that the multi-threaded Rocket server sends commands to (join this user to this room, send this message to this user or room, etc.). The library has a bunch of hash tables that keep track of all the rooms, users, and subscriptions. I also recently added support for an event log so users can temporarily disconnect and then receive all the messages they missed upon their return without having to refresh. If there is any demand for this I'd be happy to polish it up a bit and throw it on GitHub, as I'm sure my implementation is far from ideal. On the frontend I am using React and... that's it actually. It's probably not the wisest decision (although I am kind of afraid of npm) but I ended up just creating minimal libraries for everything I normally would use a dependency for. My simplistic Markdown parser is around 150 lines, my Axios "clone" is just a small 100 line wrapper for fetch, my routing library is just matching the URL against my small list of path regexes and returning the corresponding component to render, etc. Returning to the website's features themselves, I tried to make as many available as possible without logging in, as I generally dislike logging into sites, so no pressure to create an account at all! What I'd like more than anything is any suggestions or feedback that you might have, because I'm perpetually full of doubt and indecision on the proper course of action to take. Another thing I'm struggling with is marketing and actually getting it out there, as I know nothing of that world, and I always feel kind of weird about self-promotion. Anyways, thanks so much for reading!
- pgt 6y agoGood on you for launching. I find the percentage-based swipe input distracting. I kept thinking how the exact number is going to affect recommendations and how that is measured relative to my previous inputs. Consider showing two concepts next to each other so that swiping chooses one or the other, and swiping up chooses both.
- pitherandd 6y agoThanks! Hmm, yeah, the swiping UX seems to be pretty tricky to get right. Initially I didn't have the percentage but some early testers highly recommended I add it for two reasons: 1) They couldn't see well and found the addition of the percentage was helpful in clarifying their swipe value. 2) It made it more obvious that the magnitude of swiping mattered, as opposed to swiping just being a binary yes/no option. The two concepts idea is interesting. I'll have to think more on that. I think it might be tricky to implement though, because not every topic has a natural converse.
- dgellow 6y ago> Hmm, yeah, the swiping UX seems to be pretty tricky to get right. In case you're interested, I created a quite long time ago a small example of a library doing this. https://github.com/dgellow/react-tinderable/blob/master/src/tinderable.jsx https://github.com/dgellow/react-tinderable/blob/master/src/... The code is really old and out of date, and was just a quick experiment, but that may give you some direction if at some point you want to try out that kind of user experience. Unfortunately the demo link doesn't work anymore, but it should be quite easy to run locally.
- pitherandd 6y agoAh cool thanks for the link I'll check it out!
- mahaganapati 6y agoFirst of all, thank you for detailing all of that and for sharing here. And for all the work you've put in to this! And secondly I wanted to say that this > but I ended up just creating minimal libraries for everything I normally would use a dependency for. My simplistic Markdown parser is around 150 lines, my Axios "clone" is just a small 100 line wrapper for fetch, my routing library is just matching the URL against my small list of path regexes and returning the corresponding component to render, etc. is really cool to read as a frontend engineer.
- ecmascript 6y agoSeems pretty cool, although who is it for? I have tried out several of these services before in a way to finding new friends but 99% of them is filled with people that actually are more interested in finding a date instead of a mate.
- pitherandd 6y agoRight, that is a very good point. That reason is why I neglected to add a gender option, as I felt the inclusion of that filtering criteria would steer the culture towards that of a dating site. As for its reason for being, it's mostly because I just think it's a bit of a shame how there could be this awesome person down the street or in my city, and I could live my whole life without finding that out. I was hoping to develop a service that might alleviate that. For example, if you were into some obscure Steam game, you could specify that as an interest and potentially see that someone else near you also shares that interest as well. You then might message them, play together, and then if you hit it off some time down the line you could eventually meet in real life as well.
- ecmascript 6y agoYeah, but in order for your project to be successful in that way it would have to mean that a lot of people need to sign up. I live in a rural area in northen europe, they chances of this site becoming big enough for it to be interesting for me are very slim. Of course I could find internet friends through it, but that's not what the site claims to aim to solve for me. I don't want to be negative, but I think the most common first question will be what gender people are since that info is missing. People will just go around whatever obstacles exist in order to date if that's what they want. I would suggest instead of having a separate dating section so those people will fill up there instead. Dating and sex also sells and could help the signups along the way.
- Toorkit 6y agoMet a guy on Omegle this way and we've been playing games together for 8 years now. Would be interesting to try this and find people close by!
- pulkitsh1234 6y agoCan't seem to login via FB, getting 404.
- deleted 6y ago[deleted]
- pitherandd 6y agoShould be fixed now hopefully!
- dzink 6y agoCongratulations on launching and on the architecture choice and dev insights! With regards to the product, there are several consequences you are about to see and need prepare to mitigate. I worked on something similar and need to rewrite it, thus the learnings. 1. The site looks like a dream come true for political recruiters/promoters. You have a place full of users self-identifying with political labels in great detail and you can reach out to anyone. You will see a ton of spam from companies, parties, surveyors, you name it. You may want to throttle it by limiting number of new people that can be reached by a user in 24 hrs. 2. Scammers or predators could bait people into in-person meetings or worse. All they have to do is mimic the typical profile of their targets. There is no verification of truth in others, but there is a lot of personal exposure of yourself. 3. It was strange to see people’s likes and dislikes as a profile. It gives you a lot to potentially dislike in a person, but nothing really to draw you to them as a person. In a community, the more preferences one lists, the more odds they have of alienating their neighbors, instead of bringing them together. Labels and stereotypes have one thing in common - they pidgeonhole people instead of giving them personality. You have shown you can execute. The above is just feedback on the inherent intended or unintended consequences behind this new funnel for mixing people. Social products can be quite dangerous but also fun. It’s critical to reduce downside risk.
- pitherandd 6y agoThis is very good insight and I definitely agree. With regard to your first point, I'll look to add a limit to how many users a person can message per day. I spent some time already and plan to spend a lot more on moderation tools to mitigate the effects of your second point. Ideally fake profiles can be both reported and detected, but as of yet I have not invested too much time into these efforts, other than adding basic reporting features and a moderation page for those with sufficient power. I tried to mitigate your third point by only allowing users to see your total cluster vote as opposed to your individual card votes. As a result, there is a bit of plausible deniability as your vote for each card is somewhat masked by the average. This could be furthered by reducing the cluster count and thereby making each cluster larger and mask more individual card votes.
- 6y ago
- totetsu 6y agoi could see a closed version site like this being useful for reigonal or comminity development projects, as a supliment to the "find out what everybody wants to do" workshop phase.
- The_rationalist 6y agoDid you hit any bug/limitation with rocket and other libs (diesel?)?
- pitherandd 6y agoIn the beginning it was a bit tricky because the migration to async was happening within the Rust community, so that caused some code churn early on. Lately though it's been smooth sailing. I'm using tokio-postgres for my database library and both it and Rocket are async, so they synchronize very well together. I do not believe Diesel is currently async, but in either case I'm using tokio-postgres instead so I haven't had to look into how to integrate Diesel with Rocket. Other than that, my needs were pretty simple and I used well-supported platforms, so I haven't really run into any major issues yet.
- leorio 6y agoI'm in the process of learning rust and rocket. Is there any auth library that you used, or implemented it yourself? Also, how long have you been working on this?
- pitherandd 6y agoCool, I think you'll really enjoy it. For authenticating with Google and Facebook I used the oauth2 crate. For logging in in general I used private encrypted cookies as described on this page: https://api.rocket.rs/v0.4/rocket/http/enum.Cookies.html https://api.rocket.rs/v0.4/rocket/http/enum.Cookies.html I used a Request Guard that decrypts this cookie into the corresponding user identifier. Here's a link to that page: https://api.rocket.rs/v0.4/rocket/request/trait.FromRequest.html https://api.rocket.rs/v0.4/rocket/request/trait.FromRequest.... I've been working on this for a little over a year now, off and on. Let me know if would like me to expand on any of these points.
- skinkestek 6y agoA bit confusing. If I vote for something, does that mean I - 1. believe that thing is good/exists etc - or 2. that I'd like to talk with people who are interested in this Stupid example: a vegetarian might very well hold the position that raising animals for meat is bad while still be interested in discussing it.
- skinkestek 6y agoOK, I have tested a bit more. This is really interesting I took the time to answer all the question it asked me, and here is some more feedback: - This thing needs anonymous sign up.[0] - And a delete option. - Also people needs to be nudged towards using partial names or pseudonyms and not full real names. - You also probably understand this already, but you are now sitting on a heap of personal data already. This is really, really, really cool but also has the possibility to blow up relationships, families and generally create havoc. Lives have probably been lost over less than what is available here. - answering all the questions was tedious. - I want a clear way to vote "whatever" or "prefer not to answer" - idea: Limit others view of your profile to what you are comfortable to share, like the facts that I: like card games, board games, CSGO, climbing. Leave out that I dislike Trump, liked Obama, still support the 2nd amendment, support decriminalization of marijuana etc etc. - crazy idea: create linkable public profile with the things I want to share (like above) so I can link to it from my profile here for example. [0]:You then probably need another way to reduce scammers/spmmers ability to create multiple customized accounts to target/befriend people.
- ad404b8a372f2b9 6y agoThe website is nice and easy to use and the concept is fun. I love hierarchical clustering so the technology also appeals to me. But I was very disappointed by the nature of the cards, I expected hobbies or personality based card whereas almost all those I got were about political issues. Who chooses their friends based on their opinion of Brexit? That seems very unhealthy. Maybe I was unlucky. Another thing is that even for non-political topics. The clusters that are drawn end up being political. You like anime? -> Libertaniarism cluster. You like research? -> Free speech cluster. If you dislike Libertaniarism suddenly you no longer match up with people who like Anime. That's the danger of unsupervised learning, it might be interesting to impose some constraints on it so that you can control which topics get compared together.
- pitherandd 6y agoThis is actually something that I'm still trying to figure out, and hopefully can be improved in the future. Maybe you can help me out: So, the problem we'd like to solve is what set of 250 or so cards has the highest predictive value in that similar answers lead to the best interpersonal matches? The problem with hobbies is that there are so many of them and not many people feel very strongly one way or the other about many of them. You probably wouldn't not give someone a chance just because they prefer ping pong to pool, for example. Rather, I was looking for what might be deal-breakers. The Interests page and tagging in general is what I am hoping will fill that need of specifying your individual interests and matching based on them. Here is where you can tag yourself with whatever you'd like and then search for users and posts based on these tags. The card swiping's function is mostly just a first-pass elimination filter. I had the thought of perhaps doing categories instead with regard to cards. For example, sense of humor is often very important in people. Perhaps 50 of the cards should be memes? And then perhaps 50 of the cards be political, 50 of the cards be hobbies, etc.? Or perhaps there could be multiple similarity percentages, each of a different category? It's still very experimental and I'm not sure what the correct path is.
- graphpapa 6y agoI think the right type of thing are the sorts of questions that get put in buzzfeed lists like “10 questions to find out if your date is the one” and “how compatible are you? 25 questions to predict relationship success with your partner” type things. The questions are all like “do you like camping”, “would you like to live in a foreign country” etc. Some questions like this have actually been studied for their predictive ability I think.
- deeblering4 6y agoThis needs an option to allow users to delete their own account.
- pitherandd 6y agoYeah, a few people joined the discord and asked for this as well. I'm going to try to have it added by the end of the week.
- pitherandd 6y agoShould be added now if you refresh your Profile page. I've added an Account Settings button that lets you reset all your card votes and delete your account and all its data.
- imtringued 6y agoI spent 20 minutes swiping on topics I don't care about. There were only 5-10 cards that I really cared about and they are being drowned out by stupid Brexit cards in the similarity score.
- rickspencer3 6y agoI tried it out, and immediately regretted it! I didn't come up with any matches, and then realized I provide a lot of personal details, and got nothing in return. I can't find any information requesting how to delete my data, though. I like the idea, but would really appreciate some information on how to get my data deleted.
- pitherandd 6y agoYeah, a lot of people have been requesting this. In the interim you can go to the Cards page and click on cards and change your votes there to baseline. This has been a heavily requested feature though and I'll be adding the ability to reset your votes and delete your account this week.
- rickspencer3 6y agoalright, thanks!
- pitherandd 6y agoShould be added now if you refresh your profile page and click "Account Settings" there. I've added a feature for resetting all your votes and deleting your entire account.
- non-entity 6y agoInteresting concept, this has probably been one of the more difficult problems in my life.
- photon_off 6y agoFirstly, congrats on the launch. Designing and implementing a new concept from scratch, by yourself, is definitely fraught with difficulties. It's hard to know if what you're designing is "right" and if you're implementing "the right way". Sticking with it for an entire year and actually launching is definitely something you should feel good about. I think this is a great idea, and for a first version the execution is actually quite good. Once I figured it out, I enjoyed using it and flew through all of the cards. I looked at a lot of matches and even sent a few messages. Overall, I can see myself coming back for random chats from time to time. Here is my feedback, in order of what I perceive to be most important. 1. It was not at all obvious to me how to swipe. I tried swiping the card but it didn't move. So I clicked the arrows. Since I "agreed" with the first 4 or so cards, I did not realize the arrows were to go back and forth. (In fact, I would not have ever expected back and forward to be an option). Then I realized that the "help button" thing was actually how to slide, and I got it from there. I suggest you make the slider thing look "slideable" and obvious that left is disagree (red), right is agree (green). Right now, it definitely is easy to see it as a "help" button. I also suggest you make the card navigation arrows not ambiguous -- I think it is fair to say people will assume they mean "agree" and "disagree" rather than "next" and "prev". Either provide context so that it's obvious what they do, or use words "next", "prev". Here is a crappy mock-up that hopefully shows what I mean: https://jsbin.com/wekuzebasu/ https://jsbin.com/wekuzebasu/ - In this shows progress and is obvious what next/prev do, and (for me at least) it is much more obvious what the call to action is, and how to operate it. (You could replace "|||" with "<->", or show arrows next to the slider circle for even more emphasis). 2. I really love the "percent" agree/disagree. I think that's way better than just "yes/no" and it greatly increases my confidence that I'll get better results. 3. I think your initial card set is actually quite good. There are a few where it is ambiguous of "left" and "right" mean. Agree / Disagree?Like / Dislike? Support / Don't support? Care / Don't care? 4. If I were you, it would be very easy for me to worry about spam/abuse/gaming of this. But, honestly, your biggest problem will be overcoming the network effect to get a critical mass of users to make this better. If for an average user there are more similar people, and they are closer, it becomes much more compelling for more users to join -- leading a virtuous cycle. If you want this to catch on, your #1 concern should be getting the most users in the least amount of time. Handling spam/abuse is a problem you want to have, and I'd put it off until it's necessary and/or until it's clear it is slowing user growth. 5. I've read all of your comments, and I think you're making some very good decisions and are putting a lot of thought into this. I hope you stick with it. 6. The clustering is good and does provide some level of "privacy" -- though for my "similar" people I often do not see any clusters at all. Anyway, this seems like the type of app where I want people to know my opinion on stuff, and if there's a question for which I want my opinion to be unknown, I'll just skip it. ----- Now a question regarding the matching. Is there a difference between "unanswered", "skipped", "0% (as opposed to -X% or +X%)" ? Consider these cases: 1) I don't care about a card. This is distinct from being "0%" -- I don't want this card counted towards producing my matches. If someone is 100% or -100% on it, don't penalize the similarity. 2) I am neutral about a card, but I do care if somebody is +/- on it. Do consider this in similarity. 3) I have not answered a card. This should not count towards similarity. 4) I previously had an opinion on a card, but now I don't care. How do I "reset" it? Depending on how this is handled, you'll need to change the UI to make it more clear. Eg, you may need a "skip" button.
- thojest 6y agoCongratulations! To be honest, what I am most interested in, is how you got the people to actually care. So what exactly did you do for marketing? Did it just work, or how exactly did you achieve initial traction?
- pitherandd 6y agoHaha, this is actually still an open question. My marketing thus far has been exclusively just posting it on a couple subreddits and this Hacker News thread. I don't think I've yet achieved traction because there aren't enough users to sustain interest so most people get bored pretty quickly and log off, but I'm working on it! If I figure this out I'll let you know though.
- maps7 6y agoI found another HN user in Dublin - so it works I guess
- emoprincejack 6y agoI think it works for more than that!
- mememan123 6y agoThis website has a bug in the chat where if I type too much text and it goes out of the box, the entire webpage goes blank and the page throws a react error. lmao
- emoprincejack 6y agoCan you replicate this? This isn't happening for me on the latest Firefox. What browser and operating system are you using?