SCODA Website Repository
- Project Documentation Links
- Creative Resources
- Website Environments
- Frontend Setup
- Backend Setup
- Module List and Syntax
- Techinical Specs For QA
- Caveats, Dev Notes and or Outstanding Bugs
- SCODA UI
- Needs Design Spec
- Util - Log custom messages to the terminal
- Sass - CSS pre-processor
- Uglify - Minifies all JS files
- Concat - Concatenate any JS or CSS files in the styles or js directories
- Connect - Live Server Reload
Before starting, make sure the gulpfile.js and package.json files are in the static/ directory. Then do the following:
- Make sure you have node.js installed on your local machine
- NPM should be installed with node already, press the following to check if it has and what version
npm -v - Now we want to install gulp globally
npm install --global gulp - Now install the dependencies in the package.json file
npm install - Now all your node plugins are installed, and all that's left is to run the gulp task manager by typing:
gulp
- clone the repo
- install a virtual env and activate it:
virtualenv --no-site-packages env; source env/bin/activate - install requirements:
pip install -r requirements.txt - Locate config folder copy example.development.cfg and paste it as development.cfg into the same config folder
- If needed update any local credentials on the new development.cfg file you've just created
Setup the PostgreSQL database (version 12.13.*) Download and install postgis (version 3.1.1) locally from http://download.osgeo.org/postgis/windows/pg96/
psql -U postgres
=# CREATE USER scoda WITH PASSWORD 'scoda';
=# CREATE DATABASE scoda;
=# GRANT ALL PRIVILEGES ON DATABASE scoda TO scoda;
=# psql -d scoda -c "CREATE EXTENSION postgis;"
=# psql -U postgres -d scoda -c "CREATE EXTENSION postgis;"
=# psql -U postgres -d scoda -c "CREATE EXTENSION postgis_topology;"
=# \q
Construct your db app-side:
- Request Access to the data and empty it's contents into the /scoda/data directory, extracting the contents out of the zipped files. No zipped files or empty folders should be in the scoda/data folder.
- Request access to the drive data folder if unable to download data.
- Activate your local environment
run 'python rebuild_db.py'
- It will take some time to seed the data
- Once the seed has completed, start the server with the command:
python app.py runserver
- SCODA App uses Flask-Migrate (which uses Alembic) to handle database migrations.
- To add a new model or make changes, update the SQLAlchemy definitions in
scoda/models/. Then runpython app.py db migrate --message "a description of your change" - This will autogenerate a change. Double check that it make sense. To apply it on your machine, run
python app.py db upgrade head
- Insall Redis on local
- Update the development.cfg REDIS_URL to your local configurations - Default is "redis://localhost:6379"
- Start the server with
redis-server
V1.0 will be a mobile first web-app, designed purely for mobile but viewable by web. The following browsers and devices need to be 100% design match:
- Latest 3 Chrome, IE, Edge, Firefox Desktop
- Latest 2 Chrome, Edge, Safari Mobile