Thank you for your interest in contributing to CourseCode! This document provides guidelines and instructions for contributing.
- Code of Conduct
- Getting Started
- Development Setup
- Code Style
- Making Changes
- Pull Request Process
- Reporting Bugs
- Requesting Features
This project follows the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code.
- Fork the repository on GitHub
- Clone your fork locally
- Set up the development environment (see below)
- Create a branch for your changes
- Make your changes and test them
- Submit a pull request
# Clone your fork
git clone https://github.com/course-code-framework/coursecode.git
cd coursecode
# Install dependencies
npm install
# Start the preview server with stub LMS
npm run preview
# Run linting
npm run lint| Command | Purpose |
|---|---|
npm run dev |
Build watch only (no server) |
npm run preview |
Stub LMS player + build watch + live reload |
npm run lint |
Run ESLint |
npm run lint:fix |
Run ESLint with auto-fix |
npm run prerelease:check |
Lint + responsive ownership/scoping checks + production build |
npm run smoke:responsive |
Responsive visual smoke checks (headless preview) |
- ES Modules: Use
import/exportsyntax,const/let(nevervar) - No direct console calls: Use
logger.*instead (enforced by ESLint) - Fail fast, fail loud: Throw errors immediately; never log and continue
- Use stateManager: Never call
window.doSetValue/doGetValuedirectly
For complex components, separate concerns into three files:
- State (
*-State.js): In-memory data container. No DOM, no stateManager access - UI (
*-UI.js): DOM manipulation only. No internal state - Actions (
*-Actions.js): Orchestrates input handling, state updates, UI direction, and manager calls
- Use
data-action="action-name"attributes - Single listener on container delegates based on attribute
All error events must emit a standardized object:
eventBus.emit('*:error', {
domain: 'scorm|state|navigation|interaction|assessment|objective|initialization',
operation: 'methodName',
message: error.message,
stack: error.stack,
context: { /* debug data */ }
});| Path | Purpose |
|---|---|
framework/js/app/ |
Global lifecycle, UI (modals, notifications), state |
framework/js/core/ |
Core services: EventBus, runtime |
framework/js/drivers/ |
LMS format drivers: SCORM 2004, SCORM 1.2, cmi5 |
framework/js/managers/ |
Singleton managers: state, persistence, objectives, etc. |
framework/js/components/ |
Reusable UI and interactions |
framework/js/navigation/ |
Navigation: menu, buttons |
framework/js/utilities/ |
Helper functions |
framework/js/dev/ |
Dev-only code (tree-shaken in prod) |
- Check existing issues and PRs to avoid duplicate work
- For significant changes, open an issue first to discuss the approach
- Read the Framework Guide for architecture details
Use clear, descriptive commit messages:
feat: add support for matching interactions
fix: resolve suspend_data overflow in SCORM 1.2
docs: update CSS reference with new utility classes
refactor: extract shared logic into interaction-base.js
Prefixes:
feat:New featurefix:Bug fixdocs:Documentation onlyrefactor:Code change that neither fixes a bug nor adds a featuretest:Adding or updating testschore:Maintenance tasks
- Run
npm run previewand test in the browser - Check the debug panel for LMS compatibility warnings
- Run
npm run lintto ensure code style compliance - Test with different LMS formats if your change affects drivers
- For layout/responsive changes, run
npm run prerelease:checkandnpm run smoke:responsive -- --profile=expanded
- Framework responsive contracts:
/Users/seth/Documents/GitHub/coursecode/framework/docs/RESPONSIVE_FRAMEWORK_CONTRACTS.md - Manual device/browser checklist:
/Users/seth/Documents/GitHub/coursecode/framework/docs/PRE_RELEASE_QA_CHECKLIST.md
- Update documentation if your change affects user-facing behavior
- Run linting:
npm run lintmust pass - Test thoroughly: Use
npm run previewto test your changes - Keep PRs focused: One feature or fix per PR
- Fill out the PR template completely
- Code follows the established patterns and style
- Changes are well-documented
- No regressions in existing functionality
- Commit history is clean and logical
Use the Bug Report template and include:
- Clear description of the issue
- Steps to reproduce
- Expected vs actual behavior
- Browser/environment details
- LMS format (SCORM 2004, SCORM 1.2, cmi5)
Use the Feature Request template and include:
- Clear description of the feature
- Use case and motivation
- Proposed implementation (if you have ideas)
- Whether you're willing to implement it
If you have questions about contributing, feel free to open a discussion or reach out through GitHub issues.
Thank you for contributing to CourseCode!