Link to live site: markWith
Mark Greenburg, Nedra Mevoli, and Deepak Shah
Technologies, Frameworks and Programming Languages:
Overview of Project:
markWith started as a concept to build a collaborative markdown editor. markWith allows users to create and invite collaborators to edit Markdown in real-time. Features:
Challenges faced & Solutions used:
1. One of the earliest challenges the team faced how to design each socket so that we could construct a new socket to handle a new document and not disturb the other socket connections. The solution we implemented was assign by id a new room with socket connection and then new documents were created for them to be assigned new sockets. Thus any room now had an id attachment to reference.
2. The next challenge we faced involved the logistics between rendering the content live and saving upon keystroke to our data base so that content was updated real time but also saved so it could be accessed anytime a user logged in. We also needed to make sure the most current updated document was broadcast to each user. The solution here was two-fold, first we saved after every keystroke by overwriting the current content which allowed for live rendering and dynamic save points. And we also passed in the document id so the content knew where it need to broadcast.
3. Another challenged we faced involved authentication at multiple stages. Authentication was necessary as both a user and a document as permission levels dictated what features were allowed. The user authenticity we wanted to implement was a cookie based session so users could sign in and stay active without having to re-login at every close.
4. Document authentication was also a major challenge because document owners were granted privledges not available to document collaborators and we need a system to verify authentication level and not allow either side to have access they were not allowed to have. The solution we chose to implement here was to define an owner and collaborator at each doucment stage and run that on the api. We would check against the database and once defined, the access and privledges were granted were necessary.
Given the back end intensive nature of our project and async issues that could arise, we faced our fair share of delicate troubleshooting issues which we eventually worked out and wanted to share what we learned from each issue.
1. Just in general given that there could be a potential error at every stage of the process, we had to have fail-safes to handle any of those issues. On the document side, we had to deal with async issues and then have callbacks that would spit out errors as necessary. An example of this is as follows:
2. On the user side, we used a lot of nested conditionals to verify and error handle. It was done very similarly to the document code shown above (callbacks to keep sync issues in check). Here is an example of updating a user, using nested conditionals to check at each stage.
MVP and Stretch Goals:
MVP (Minimum Viable Product)
Contribution we'd like to be added: