Skip to content

team-oath/uncovery

Repository files navigation

#Privy ##The Anonymous Location Based Chat Network

Circle CI


Privy is a mobile application for iOS devices which connects users to an anonymous location based chat network. The key tenets of Privy are **anonymity**, **simplicity**, and **low barrier to entry**. Privy was designed with safety in mind and we strive to create a community where individuals can feel free to express themselves in an environment where their privacy is protected.

##User Story

  1. Users can leave messages as either text or an image at geographic locations
  2. Other users in proximity of a message can view, vote, and comment on it
  3. Other users can also chat with other users by clicking on a post in a comment thread
  4. Messages are automatically destroyed after a set amount of time
  5. The more votes a message accumulates the longer it persists

##Technical Walkthrough

###Mobile to Server Communication When the mobile application is initially ran, a userToken is generated using an ID which is unique to the user's device. The Express web framework acts as an API endpoint for the mobile application and serves no static assets. Static assets such as Privy's landing page and user submitted images are primarily served by AWS S3. The Express server identifies users by the unique userToken that is generated by each device. On each request to the server, the userToken along with the user's x, y, and z coordinates are transmitted to the Node server.

###Validations and Security User data is validated on the level of the Express routes and MySQL model adapters. The router ensures that the correct parameters have been passed in by validating coordinate ranges. The models then sanitize user submitted parameters to protect against script injection. Lastly, the MySQL schema has constraints in place to handle any unexpected edge cases.

###Database Interactions modelAdapter.js acts as a low level adapter which abstracts core MySQL queries into easy to use JavaScript functions. The model adapter is the interface for higher level components which need to interact with MySQL. Abstracting common queries into a single module enables seperation of concerns which results in highly modular code. models.js is the mediator between the Express routes and the models adapter.

###React Native Mobile Client The root file in the front-end component heirarchy is client/index.ios.js. All other components are children of this file. The main view that the user is routed to is Messages/index.js. This is where the message stream lives. As new data is received, the stream is updated.

##Technology Stack

###BackEnd

  • Server Environment NodeJS
  • Web Framework ExpressJS
  • Database MySQL
  • Task Runner Grunt

###FrontEnd

  • Mobile Architecture React Native
  • Image Handling Objective-C
  • User Interface Flexbox

###Testing

  • Continuous Integration CircleCI
  • Test Runner Grunt
  • Test Framework Mocha
  • Assertion Library Chai
  • Plugin(s) Sinon

Contributing

Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing.