Name | Last Update | Last Commit dda84e6b001 – delay end of quarter by a month | history |
---|---|---|---|
flashcards | Loading commit data... | ||
flashy | |||
nginxconf | |||
schedule_scraper | |||
scripts | |||
templates | |||
.gitignore | |||
.gitmodules | |||
README.md | |||
flashy.ini | |||
manage.py | |||
requirements.txt |
README.md
Flashy
Flashy is a realtime collaborative flashcard sharing app combined with a spaced-repetition study system. Flashy was developed by CSE 110 students in spring quarter 2015:
- lhawkins
- ckwang
- arnog
- abuss
- rray
- rlee
- mjeng
- kmach
- mrahman
- namtran
Flashy's code is divided among the flashy-backend repository (this one!) and the flashy-frontend repository. When running the local server, these repositories should be sibling directories and the flashy-frontend repository must be cloned into a directory of the same name.
Flashy officially supports Ubuntu 14.04 with at least 2 GB of RAM. A VM is acceptable but performance may be impaired.
Installing Flashy on Ubuntu 14.04 (development/testing)
We recommend installing Flashy on a fresh installation of Ubuntu 14.04. Before installing, make sure all packages are up to date:
sudo apt-get update
sudo apt-get upgrade
It is important that Python 3 not be installed, as this causes issues when creating the virtualenv.
Install required packages
sudo apt-get install python-virtualenv redis-server git python-dev
Start Redis
sudo service redis_6379 start
echo PING | redis-cli
Redis should respond PONG to the last command.
Prepare installation directory
mkdir ~/flashy/
cd ~/flashy/
Retrieve source
Clone the two repositories. Provide credentials in each case.
git clone https://git.ucsd.edu/110swag/flashy-frontend.git
git clone https://git.ucsd.edu/110swag/flashy-backend.git
Prepare backend environment
When running the setup script, gevent may take a while to install and throw several compiler warnings. These are expected.
cd flashy-backend
scripts/setup.sh
source venv/bin/activate
python manage.py migrate
python manage.py loaddata sections
Run backend server
scripts/run_local.sh
You should be able to access the application at http://127.0.0.1:8080/app/
Email on the Locally Server
In production, Flashy uses AWS SES to send emails. However, we did not want to bundle the AWS key with the source of our app, so when run locally, Flashy falls back to the ConsoleBackend. In practice, this means that when run in development, emails will be printed to the terminal and not actually sent.
Troubleshooting
If you get errors about a module not being found, make sure you are working in the virtualenv. To enter the venv:
source venv/bin/activate
If you still get errors about a module not being found, make sure your virtualenv is up to date. Re-run:
scripts/setup.sh
If you get errors about a missing column or table, make sure you have migrated:
python manage.py migrate
Notes for Windows
As on Linux, Redis must be installed and running on port 6379.
Wherever venv/bin/ appears, use venv/Scripts instead. Virtualenv inexplicably creates a Scripts directory rather than bin on Windows