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.
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.
- Node.js server side platform
- Express.js web framework
- Socket.io for real-time webpage updates
- Passport.js authentication
- MongoDB NoSQL database
- Mongoose Object-relational mapper
- Handlebars HTML templating language
- Bootstrap ready-to-use HTML and CSS component kit
- 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
.
- 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
.
- 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.
- Configure the GMail mailer service and Facebook-login under
config.js
- Replace the
dbConnString
inside theconfig.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 behttps
instead. Go toviews/session.hbs:55
. Replace the link with this:https://raw.githubusercontent.com/peers/peerjs/master/lib/peer.js
. Alternatively, you can upload thepeer.js
file to your own, customhttps
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 thekey
.
- 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!
- 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 thishttps://example-12345.herokuapp.com/auth/facebook/callback
- Redeploy via
$ git push heroku master