#Privy ##The Anonymous Location Based Chat Network
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.
- Users can leave messages as either text or an image at geographic locations
- Other users in proximity of a message can view, vote, and comment on it
- Other users can also chat with other users by clicking on a post in a comment thread
- Messages are automatically destroyed after a set amount of time
- The more votes a message accumulates the longer it persists
###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
userToken that is generated by each device. On each request to the
userToken along with the user's
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.
modelAdapter.js acts as a low level adapter which abstracts core
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.
- Server Environment NodeJS
- Web Framework ExpressJS
- Database MySQL
- Task Runner Grunt
- Mobile Architecture React Native
- Image Handling Objective-C
- User Interface Flexbox
- Continuous Integration CircleCI
- Test Runner Grunt
- Test Framework Mocha
- Assertion Library Chai
- Plugin(s) Sinon
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing.