Coursetable is made of two big parts:
- Website: this is the site you see when you go to coursetable.com. The code for this is in the
web
directory. - Crawler: these are the scripts behind the scenes that actually get all the data from Yale’s websites. The code for this is in the
crawler
directory, which is currently included via a Git submodule.
The latest development instructions are now maintained in a Google Doc called the CourseTable development guide.
The document includes instructions on how to:
- Set up the dev environment
- Learn about the code
- Make your first changes
Contributing code:
- Create a branch for your feature. This can usually be done with
git checkout -b <username>/<feature_name>
- make changes.
- Create some commits and push your changes to the origin.
- Create a pull request and add a few reviewers. In the pull request, be sure to reference any relevant issue numbers.
- Once the pull request has been approved, merge it into the master branch.
Issues:
We use GitHub issues to track bugs and feature requests: https://github.com/coursetable/coursetable/issues.
For different languages:
- Javascript: We use
prettier
to automatically format the code. Make sure you use your editor's integration! - PHP: We use PHP CodeSniffer to maintain coding standards; generally, it's 4 spaces for tabs, camelCase for variables, and follow whatever else that's in use right now.
We have automated checks set up that will run for every commit and pull request.
- Create a SSH key, and add it as a deploy key for both this repository and
install-scripts
. - Run
cd /home/web && git clone git@gitlab.com:myrtlelime/coursetable.git app
- Run
install.sh
- Run
components/gencerts.sh
to generate certificates if needed - Load the database locally, if needed
- Run
finish-install.sh
Check out How to deploy
- Change
web/includes/ProjectCommon.php
to point to a remote database - Run
composer install
inweb/libs
and incrawler
- In your php.ini, make sure cURL, MySQLi, SQLite3 are enabled
- Run
php Build.php
inweb/tools
- Run
php RegenerateDataFiles.php
incrawler
to either generate the JSON locally
Fatal error: Uncaught SmartyException: unable to write file [...]
: execute chmod -R 777 web/gen
in your terminal.