Contribute¶
River Admin consists of two parts that are backend and ui.
It is built with Django Rest Framework on the backend
side whereas Vue on the front end side.
Rive Admin Backend¶
River Admin backend side is built with Django
and Django Rest Framework. So you need Django
development environment to be set up.
Install the dependencies
pip install -r requirements.txt
Install Tox to run the tests for all environments.
pip install tox
Install Twine and other necessary packages to upload packages to
PyPIpip install wheel setuptools twine
You are ready to develop the backend side now.
Development¶
python manage.py runserver
River Admin UI¶
River Admin ui is built with Vue. So you need Vue
development environment to be set up.
Install
node&npmInstall
yarn(Install Yarn)Install dependencies
yarn install
Development¶
While developing the front end Vue app of River Admin,
you can run it without building it and the server will
auotmatically reload on any changes in the code. This is quite
useful thing for fast feedback and debugging. One thing you
should make sure before you run this, backend server is also
running since it needs to call the backend
python manage.py runserveryarn serve
Tests¶
UI tests are written with Jest javascript testing
framework from Facebook. Tests are under ui/tets/.
To run the tests simply;
yarn test:unit
To run a specific one;
yarn test:unit StateInput.spec.js
To run the tests with a fresh snapshot (to clean the snapshots);
yarn test:unit -u
Build¶
yarn build
The distribution folders of the Vue app are
river_admin/templates and river_admin/static.
The reason for that is because a Django app should
contains all the html and static files under
templates and static folders.