Skip to content

Collaborative, real-time code editor for engineers! Includes video call and chat feature.

Notifications You must be signed in to change notification settings

kashyap2108/codasession

 
 

Repository files navigation

CodaSession

Remote work

In simple words, CodaSession is like GoogleDocs for programmers. It allows you to work collaboratively on code with fellow engineers - no matter where you live.

CodaSession is meant to reduce barriers for effective remote work.

This private project is meant to be an exercise on WebSockets and real-time page updates.

Purpose

In the last couple years, open source has become the dominating factor for software innovation. However, this was not always the case. In earlier times, distributed software development couldn't cope with issues like:

  • Slow dialup internet
  • Immature web technologies
  • Missing project management tools

The first two ones aren't issues anymore. The third issue, missing PM tools, is still highly relevant. Many development platforms like GitHub or BitBucket only allow asynchronous collaboration. Engineers usually do Pull-Requests ("PRs") and post comments.

This is however quite slow. Sometimes, replies to comments can take days. For quick experiments, code-fiddling or hypothesis-testing, a PR feels unnatural. Sometimes, you just want a quick pair programming session.

This is where CodaSession comes into play. CodaSession is a web platform, which allows to:

  • Conduct real-time, remote pair programming sessions
  • Conduct real-time, remote tutoring sessions
  • Conduct real-time, remote coding interviews

Communication is kept as natural as possible by a video call feature. A chat window assists for exchanging code snippets, links and so on.

Technology Stack

Prerequisites

  • Install a Node Version Manager (NVM)
  • Download and install Node.js from here
  • Alternatively, you can download and install Node.js via $ nvm install 8.1.3 Note: as of July 2017, 8.1.3 is the latest Node.js version.
  • Install MongoDB via Homebrew $ brew install mongodb
  • Download and install Robo 3T GUI for exploring the database content
  • Open now the Robo 3T application, and create a MongoDB database. Enter your database configuration settings under config.js:11.

Running the App Locally

  • Run $ npm install to install all dependencies
  • Run $ npm start to start the web server
  • Run $ sudo mongod to start the NoSQL database
  • Voilà! Open your web browser and go to localhost:3000.

Deployment

Preparatory Steps

  • If you haven't done so yet, download or fork this repository. Make sure, that this repo is tracked by Git.
  • Make sure to have a Heroku account
  • Install Heroku CLI via Homebrew $ brew install heroku
  • Make sure, that you have a MongoDB database hosting service ready. You can register for a (free) account at e.g. MongoDB Atlas, mLab, A2 Hosting, Vultr, Compose and so on.

Modifying Local Files

  • Configure the GMail mailer service and Facebook-login under config.js
  • Replace the dbConnString inside the config.js:12. It should be similar to e.g. mongodb://<dbuser>:<dbpassword>@abc12345.mlab.com:21336/codasession.
  • The http protocol can't access your webcam, it therefore has to be https instead. Go to views/session.hbs:55. Replace the link with this: https://raw.githubusercontent.com/peers/peerjs/master/lib/peer.js. Alternatively, you can upload the peer.js file to your own, custom https server like e.g. Heroku.
  • In views/session.hbs:64, remove the link so that it appears like this: var socket = io.connect();. Socket.io will now determine automatically the environment.
  • In views/session.hbs:122-128 uncomment all lines. Update the key.

Going Online

  • Type into the command line $ heroku login. Enter your Heroku account data.
  • Type $ heroku create to create an app.
  • Type $ git push heroku master to upload this Git repo to Heroku.
  • Copy/paste the visible Heroku link into your browser. Voilà, the app is now online!

Making the Mailer Form and FB Login Work

  • To make the mailer form work, go to https://accounts.google.com/b/0/DisplayUnlockCaptcha and confirm.
  • On developers.facebook.com, make sure to 1. whitelist the Heroku link and 2. make your FB app public and 3. add the Heroku link as a valid OAuth redirect URI.
  • Replace config.js:18, with your Heroku link, which looks similar to this https://example-12345.herokuapp.com/auth/facebook/callback
  • Redeploy via $ git push heroku master

About

Collaborative, real-time code editor for engineers! Includes video call and chat feature.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 85.8%
  • HTML 13.4%
  • CSS 0.8%