Coursetable is made of two big parts:
- Website: The site you see when you go to coursetable.com. The code for this – the front-end site as well as the various back-end scripts that handle user actions – is contained within this repository.
- Crawler: The scripts behind the scenes that actually get all the data from Yale’s websites. The code for this is in our ferry repository.
The various functions of the website are compartmentalized as follows:
/api
: An Express server for back-end logic going forward. Currently handles user challenges./dev_proxy
: Proxy configuration for relaying connections between services (e.g. authentication headers, CAS cookies, etc.)/docker
: Configuration files for running everything together in Docker./frontend
: The current face of the site, built in React./sysadmin
: Administrative tools such as phpMyAdmin./web
: Older PHP scripts migrated from the legacy site.
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.