πŸ‘Ύ Interactive chatbot to help beginners learn how to code.
Switch branches/tags
Nothing to show
Clone or download
Latest commit b98815e Sep 11, 2016

README.md

CodeBot

CodeBot is a chatbot that helps beginners learn how to code. To make the otherwise daunting task of learning how to code for the first time easier, CodeBot incorporates witty replies, GIFs & human-readable errors to create an incredibly fun experience for a complete novice. Currently, it goes through a few elementary exercises in Python (adapted from Codecademy) while answering user questions using basic NLP. The back-end runs on Node.js, MongoDB & api.ai while the front-end is written in vanilla HTML, CSS & JavaScript.

Screenshot of CodeBot

Team

  1. Suyash Lakhotia
  2. Nikhil Venkatesh
  3. Chaitanya Joshi
  4. Bobby Ranjan

Setup

Prerequisites

Homebrew Commands (for Mac)

$ brew install node              # Install Node.js
$ brew install mongodb           # Install MongoDB
$ brew cask install robomongo    # Install RoboMongo (Optional)
$ brew services start mongodb    # Start MongoDB

Running CodeBot

  1. Clone this repo or download the .zip here.
  2. Navigate to this repo on your terminal and run $ npm install to install all the dependencies.
  3. Start MongoDB using the instructions here.
  4. Initialize the database using $ node dbCreator.js.
  5. Create a directory β€” /userScripts β€” and an empty file named test.py inside to process the user's submitted Python scripts.
  6. Run CodeBot on http://localhost:3000/ using $ node index.js.
$ npm install
$ brew services start mongodb    # Start MongoDB (via Homebrew)
$ node dbCreator.js
$ mkdir userScripts && cd userScripts && touch test.py && cd ..
$ node index.js

Source Code

CodeBot/
β”œβ”€β”€ modules/
β”‚   β”œβ”€β”€ codeChecker.js       // Checks User Submitted Python Code
β”‚   β”œβ”€β”€ levenshtein.js       // Word Distance Calculator (dependency of codeChecker.js)
β”‚   β”œβ”€β”€ messageHandler.js    // Handles User Messages over Chat
β”‚   └── pythonDict.js        // Dictionary of Python Keywords (dependency of codeChecker.js)
β”œβ”€β”€ node_modules/            // Node.js Dependencies (see package.json)
β”œβ”€β”€ public/                  // Front-End Files (served at '/')
β”‚   β”œβ”€β”€ assets/              // Images, GIFs, etc.
β”‚   β”œβ”€β”€ css/                 // CSS Stylesheets
β”‚   β”‚   └── main.css
β”‚   β”œβ”€β”€ js/                  // Client-Side Scripts
β”‚   β”‚   └── main.js
β”‚   └── favicon.ico          // Favicon
β”œβ”€β”€ userScripts/             // User Submitted Python Code
β”‚   └── test.py
β”œβ”€β”€ dbCreator.js             // Initializes Database
β”œβ”€β”€ index.html               // Client-Side Chat Interface
└── index.js                 // Node.js Entry Point

See contributing guidelines here.


NOTE: Initially built for and during the Facebook Singapore Hackathon 2016.