githubEdit

Project Structure

Top-Level Directories

chamilo/
├── assets/          # Frontend source code
│   ├── vue/         # Vue 3 application (components, views, router, stores)
│   ├── css/         # SCSS stylesheets
│   └── js/          # Legacy JavaScript
├── config/          # Symfony configuration (routes, services, packages)
├── public/          # Web root (index.php, legacy PHP pages, plugins)
│   ├── main/        # Legacy PHP modules (one subdirectory per tool)
│   └── plugin/      # Bundled and custom plugins
├── src/             # PHP source code (Symfony bundles)
│   ├── CoreBundle/  # Core platform logic
│   ├── CourseBundle/# Course-specific features
│   └── LtiBundle/   # LTI 1.3 integration
├── templates/       # Twig templates
├── var/             # Cache, logs, uploads (generated)
├── vendor/          # Composer dependencies (generated)
├── node_modules/    # npm dependencies (generated)
└── translations/    # Translation files

Source Code (src/)

CoreBundle

The largest bundle. Notable subdirectories:

Directory
Contents

Entity/

Doctrine entities (User, Course, Session, ResourceNode, etc.)

Controller/

Admin, API action, and page controllers (the Api/ subfolder holds custom API Platform actions)

Settings/

Settings schema files (platform configuration)

Repository/

Doctrine repositories

AiProvider/

AI provider implementations (OpenAI, Gemini, Mistral, DeepSeek, Grok)

Tool/

Course tool definitions

Security/

Voters, authenticators, authorization

EventListener/

Event listeners

EventSubscriber/

Event subscribers

Command/

Symfony console commands

Migrations/

Database migrations

Twig/

Twig extensions

Storage/

Flysystem storage adapters

CourseBundle

Course-specific entities and logic:

Directory
Contents

Entity/

Course-content entities (CDocument, CQuiz, CLp, CForum, CStudentPublication, etc.)

Controller/

Course controllers

Settings/

Course-level settings schemas

Component/CourseCopy/

Course import/export (Common Cartridge, Moodle)

LtiBundle

LTI 1.3 integration:

Directory
Contents

Entity/

LTI platform, tool, and deployment entities

Controller/

LTI launch and configuration endpoints

Frontend (assets/vue/)

Configuration (config/)

Symfony automatically merges the base packages/*.yaml files with those in the matching environment subdirectory (dev/, prod/, or test/), so environment-specific files only need to override the values that differ.

Build Configuration

File
Purpose

webpack.config.js

Webpack Encore configuration (entries, loaders, plugins)

tailwind.config.js

Tailwind CSS configuration (content paths, theme extensions, plugins)

tsconfig.json

TypeScript configuration

eslint.config.mjs

ESLint rules (flat config)

.prettierrc.json

Prettier formatting rules

All files sit at the project root. PostCSS plugins (Tailwind + Autoprefixer) are configured inline inside webpack.config.js via enablePostCssLoader() — there is no standalone postcss.config.js. webpack.config.js reads tailwind.config.js indirectly through PostCSS, so changes to Tailwind's content or theme sections take effect on the next yarn encore dev / yarn encore production run.

Webpack Entry Points

The build produces these bundles:

JavaScript:

  • vue — Main Vue 3 application (assets/vue/main.js)

  • vue_installer — Installation wizard (assets/vue/main_installer.js)

  • legacy_app, legacy_exercise, legacy_lp, legacy_document — Legacy JS for pages not yet migrated to Vue

CSS:

  • app — Main stylesheet (assets/css/app.scss)

  • Plus specialized sheets: chat, document, editor, editor_content, markdown, print, responsive, scorm

CSS Structure (assets/css/)

Tailwind CSS

Tailwind is integrated via PostCSS. assets/css/_tailwind.scss emits the base, component, and utility layers; assets/css/app.scss imports it first so Tailwind utilities are available throughout all other partials. The Tailwind configuration — content paths for purging, theme extensions, and plugins — lives in tailwind.config.js at the project root (/var/www/chamilo/tailwind.config.js).

Custom utility classes and component classes defined with @layer (visible in app.scss) follow Tailwind's layering convention so that user-defined classes respect the same specificity rules as the generated utilities.

Color Themes

Chamilo supports a color theming system that can be configured directly from the admin interface (Admin > Color Themes). Each saved theme writes its files into a dedicated directory under var/themes/:

colors.css defines CSS custom properties as space-separated RGB channel triplets rather than rgb() values, which allows Tailwind to compose opacity variants (e.g. bg-primary/50) without additional configuration:

The theme layer sits on top of the compiled Tailwind/SCSS bundle: the browser loads colors.css after the main stylesheet, so theme changes take effect immediately without a build step.

Last updated

Was this helpful?