This website provides a quick and easy way for those who are new to coding to work on projects and collaborate with their peers. Since everything is run in the browser, there is no need to install extra apps and detract from the main goal of writing the code itself.
The live code editor (via ajax) provides syntax highlighting and the overall functionality of the site provides a meaningful path towards productivity.
Our project implements Google OAuth as well. In addition, as a stretch goal, we hope to send emails to users regarding project notifications and invitations etc.
A database includes tables for files, projects, permissions, and users.
- Navigate to desired directory and clone the CodeXLab repo
- Install python3 pip by running
$ apt-get install python3-pip
- Install virtualenv by running
$ pip3 install virtualenv
- Make a virtual environment by running
$ virtualenv <path/to/customVenvName>
- Open your virtual environment by running `$ flask <path/to/customVenvName>/bin/activate'
- Install flask by runnning
$ pip3 install Flask
- Run the app by running
$ python3 __init__.py
- Set up an Ubuntu droplet
- Run
$ sudo apt install apache2
, followed by$ sudo ufw allow in "Apache Full"
- Run
$ sudo apt-get install libapache2-mod-wsgi-py3
- Clone repo into
/var/www/CodeXLab/
, creating directories if needed. Your directory structure should now be similar to the following - Run
$ sudo apt-get install python3-pip
- Run
$ sudo apt install python3-flask
- Write the following into
/etc/apache2/sites-available/CodeXLab.conf
, replacing the IP address
<VirtualHost *:80>
ServerName <your.ip.address.here>
WSGIScriptAlias / /var/www/CodeXLab/codexlab.wsgi
<Directory /var/www/CodeXLab/CodeXLab/>
Order allow,deny
Allow from all
</Directory>
Alias /static /var/www/CodeXLab/CodeXLab/static
<Directory /var/www/CodeXLab/CodeXLab/static/>
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
- Run
$ sudo a2ensite CodeXLab
- Write the following into
/var/www/CodeXLab/codexlab.wsgi
#!/usr/bin/python3
import sys
import logging
logging.basicConfig(stream=sys.stderr)
sys.path.insert(0, '/var/www/BigToe/')
sys.path.insert(1, '/var/www/BigToe/BigToe')
from BigToe import app as application
application.secret_key = 'Add your secret key'
- Navigate to
/var/www/BigToe/BigToe/
- Run
$ chmod -R 755 data/
- Run
$ python3 util/db.py
. Your directory structure should now be similar to - Run
$ chmod -R 755 data/
- Run
$ sudo systemctl reload apache2
- To be implemented
We are using Python 3 as our primary language to facilitate scripting and to utilize the dependencies below. We use the following modules:
- sqlite3 (to utilize our sqlite3 database
tuesday.db
) - uuid (to create unique identifiers for projects and messages)
- json & request