Inspiration

After seeing story after story about how online social media groups foster extremism and echo-chambers, we started thinking about ways to remove echo-chambers from the social media experience. We also were getting increasingly aware of the lack of meaningful discussion on our apps of choice. So our goal for Lens was to create a social network that, through the promotion of meaningful discussion, minimizes the possible echo-chambers on the platform. Ultimately, Lens is about bringing people together through discussion of dissenting ideas rather than driving people apart with discussion of conforming ideas.

What it does

Lens is a collection of topics and users. Topics are also known as Focuses. Focuses are general topics like Politics or Sports. Users can post content to a focus page as well as content to their own pages. Having two content channels allows for users to connect in different ways; one through a community and the other individually. Two content channels also provide for more ways for users to form meaningful connections. What sets Lens apart is how posts are promoted. By keeping track of the viewtime a post is getting as well as likes/dislikes, Lens can determine how meaningful a post is to the discussion. For example, if a post is getting a lot of dislikes but most users are reading through the entire post, then it is a large part of the ongoing discussion and should be promoted despite the dislikes. This method of post promotion is also a natural guard against echo-chambers since polarizing posts will still be promoted. By keeping track of how long users look at posts, Lens doesn't try to keep users engaged with the site, Lens keeps users engaged with the discussion.

How we built it

The user facing side of Lens is built on Expo: "A platform for making universal native apps for Android, iOS, and the web with JavaScript and React Native." By using the Expo SDK, we were able to create an app that runs on mobile devices as well as the browser with a single code base. The back end of Lens uses a Flask web server to connect to the Datastax Astra database that we use to store all of the user, focus, and post data. The Flask server is hosted Digital Ocean servers under the domain http://pickhacks.tech while the Datastax Astra database is hosted on the Google Cloud Platform. The Expo front end makes HTTP POST and GET requests to the Flask web server which then queries the CQL database for data to send back to the client.

Challenges we ran into

We ran into challenges right from the beginning. Our development team uses a mixture of Windows, Linux, Mac, iOS, and Android devices, so getting all of the dependencies for Expo installed properly for every device was quite the challenge. Another challenge was learning how to use Datastax Astra and all the challenges that come with learning a new technology. Our biggest challenge, by far, was hosting the Flask server and getting it to work with the Expo front end. When working through this challenge, we discovered that, due to security protections built into mobile devices, we would not be able to use our Expo client on mobile devices without and SSL certificate, which we would not be able to get before the deadline.

Accomplishments that we're proud of

We are extremely proud of Lens. First and foremost is coming up with a novel idea for a social media platform in an age when it feels like a matured field. We are also proud of learning Datastax Astra and integrating it with our Flask server in an elegant way. We are also very proud of our Expo implementation since we went in with minimal JS and React Native experience. Another thing we are proud of is our server and database deployment.

What we learned

We learned so much over the weekend: how websites are set up, how to use React Native, how to develop one code base for multiple platforms, how to use Flask, how to use a serverless database system (Datastax Astra), and how to deploy Flask to a server.

What's next for Lens

For the front end, we want to finish our GUI stretch goals, finish connecting the client to the server when SSL errors are resolved, and polish the Expo client for both mobile and web. For the back end, we must implement basic security for the database, like input checking and hashing. We also need to harden the server, whether we stick with Flask or not. Load balancing is also important for production environments so we would also want to implement that.

Share this project:

Updates