Tech stack overview¶
The server is a Django application, and contains only pure-Python (2.7+) dependencies at run-time. It is responsible for:
Authentication and permission middleware
Routing and handling of API calls, using the Django REST Framework
Top-level URL routing between high-level sections of the application
Serving basic HTML wrappers for the UI with data bootstrapped into the page
Serving additional client assets such as fonts and images
Compositing and rendering the UI
Managing client-side state using Vuex
Interacting with the server through the API
Additionally, information about the design and implementation of Kolibri might be found on Google Drive, Github, Trello, Slack, InVision, mailing lists, office whiteboards, and lurking in the fragmented collective consciousness of our team and contributors.
We use a combination of both Node.js and Python scripts to transform our source code as-written to the code that is run in a browser. This process involves webpack, plus a number of both custom and third-party extensions.
Preparation of client-side resources involves:
ES6 to ES5
Transforming Vue.js component files (*.vue) into JS and CSS
SCSS to CSS
Bundling multiple JS dependencies into single files
Minifying and compressing code
Bundle resources such as fonts and images
Generating source maps
Providing mechanisms for decoupled “Kolibri plugins” to interact with each other and asynchronously load dependencies
The builds are automated using buildkite, whose top-level configuration lives in the Kolibri repo. Other platform distributions such as Windows, Debian, and Android are built from the wheel files and maintained in their own repositories.
We use a number of mechanisms to help encourage code quality and consistency. Most of these are run automatically on Github pull requests, and developers should run them locally too.
pre-commit is run locally on
git commitand enforces a variety of code conventions
We use EditorConfig to help developers set their editor preferences
tox is used to run our test suites under a range of Python and Node environment versions
sphinx-build -b linkcheckchecks the validity of documentation links
Client-side code is tested using Jest
codecov reports on the test coverage
We have Sentry clients integrated (off by default) for automated error reporting