Hi 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!