Technology Stack
Server-Side (Backend)
The server is built on Django (Python 3.6+) and contains only pure-Python dependencies at runtime. It supports both SQLite and PostgreSQL databases. Key Responsibilities:- Database interface (SQLite or PostgreSQL)
- Authentication and permission middleware
- API routing and handling via Django REST Framework
- Top-level URL routing between application sections
- Serving HTML wrappers with bootstrapped data
- Serving static assets (fonts, images)
Kolibri uses
ValuesViewset or ReadOnlyValuesViewset from kolibri.core.api for new API endpoints, not Django REST Framework’s ModelViewSet or ViewSet.Client-Side (Frontend)
The frontend user interface is built with Vue.js (v2.7 with Composition API) and uses ES6 syntax transpiled by Bublé. Key Responsibilities:- Compositing and rendering the UI
- Managing client-side state using composables (Vuex is deprecated)
- Interacting with the server through the API
Project Structure
Kolibri’s codebase is organized into a clear hierarchy:Core vs. Plugins
Core modules (kolibri/core/*) provide essential, always-available functionality:
- Fundamental to Kolibri’s operation
- Shared infrastructure used across multiple plugins
- Cannot be disabled without breaking Kolibri
- Examples:
auth,content,logger,tasks
kolibri/plugins/*) provide specific features:
- Can be enabled/disabled by administrators
- Self-contained features with minimal dependencies
- Provide user interfaces or workflows
- Examples:
learn,coach,facility
Build Infrastructure
Kolibri uses a combination of Node.js and Python scripts to transform source code for browser execution.Frontend Build Process
Webpack handles the transformation:- ES6 → ES5 transpilation
- Vue.js component files (*.vue) → JS and CSS
- SCSS → CSS with auto-prefixing
- Bundling multiple JS dependencies
- Minification and compression
- Source map generation
- Plugin resource bundling and async loading
Distribution Formats
The Makefile contains top-level commands for building:- Wheel files (
.whl):make dist - PEX files (
.pex):make pex
Automated Testing
Kolibri uses multiple mechanisms to ensure code quality:Python Testing
- pytest: Test runner for all Python tests
- APITestCase: Django REST Framework API tests
- TestCase: Django model and integration tests
Frontend Testing
- Jest: Test runner (not Vitest)
- Vue Testing Library: Component testing
describe,it,expectare Jest globals (no import needed)
Code Quality Tools
- pre-commit: Runs locally on
git committo enforce conventions - EditorConfig: Helps developers set editor preferences
- tox: Runs tests across multiple Python/Node environments
- ESLint: ES6 JavaScript linting
- Stylelint: SCSS linting
- HTMLHint: HTML and Vue.js component linting
- Sentry: Automated error reporting (off by default)
Development Workflow
Start the development servers:Pre-commit hooks are required. If a commit fails, pre-commit auto-fixes files. You must
git add the fixed files and re-commit.Database Support
Kolibri supports two database backends:- SQLite: Default, lightweight, single-file database
- PostgreSQL: For larger deployments requiring concurrent access
Custom Fields
Next Steps
Plugin System
Learn how plugins extend Kolibri functionality
Content Management
Understand how content channels work
User Roles
Explore Kolibri’s permission system
Backend Development
Learn backend API best practices