This directory contains comprehensive documentation for contributors working on the LiveCodes codebase. Each document covers a specific system or aspect of the application.
New to contributing? Start with the beginner-friendly introduction, including setup instructions, pull request guidelines, and code of conduct.
- Read the Architecture Overview first to understand the high-level design
- Review the Build System to understand how the project is built
- Check the Code Style section below for coding conventions
| Document | Description |
|---|
| i18n.mdx | Translation workflow, Lokalise integration, and script reference |
| Document | Description |
|---|
| sdk.mdx | SDK architecture, framework wrappers, and API communication |
| Document | Description |
|---|
| storybook.mdx | Storybook setup for SDK component testing |
| Document | Description |
|---|
| release.mdx | Release workflow and version management |
LiveCodes follows specific coding conventions documented in AGENTS.md at the repository root. Key points:
- Semicolons: always
- Single quotes
- Trailing commas: all
- Print width: 100
Use import type for type-only imports:
import type { Config, Language } from '../models';
import { someFunction } from '../utils';
- Files/directories: kebab-case (
build-config.ts)
- Functions/variables: camelCase (
createEventsManager)
- Types/interfaces: PascalCase (
CompileResult)
- No enums: use string union types
- Arrow function constants preferred
- Named exports only (no default exports)
- No classes in application code
- Use factory functions (
createXxx())
- One variable per statement
Tests are co-located in __tests__/ directories:
import { debounce } from '..';
describe('utils', () => {
test('debounce', async () => {
expect(num).toBe(1);
});
});
npm run test # Run all tests (typecheck + lint + unit)
npm run test:unit # Run Jest unit tests only
npm run test:unit -- --testPathPattern="compiler" # Run specific tests
npm run e2e # Run Playwright e2e tests
npm run typecheck:app # TypeScript type check
npm run lint:eslint # ESLint check
npm run fix # Auto-fix all linting issues
npm run start # Dev server with watch (http://127.0.0.1:8080)
npm run build # Full production build
npm run docs # Start documentation server (http://localhost:3000/docs)
npm run storybook # Start storybook (http://localhost:6006)
flowchart TD
subgraph "Core"
A[core.ts<br/>Main Application]
B[config/<br/>Configuration]
C[storage/<br/>Persistence]
D[events/<br/>Event System]
end
subgraph "Editors"
E[monaco.ts]
F[codemirror.ts]
G[codejar.ts]
end
subgraph "Compilation"
H[compiler/<br/>Worker-based]
I[languages/<br/>Language Specs]
J[formatter/<br/>Prettier + Custom]
end
subgraph "UI"
K[UI/<br/>App Controllers]
L[html/<br/>Templates]
M[toolspane/<br/>Console/Tests]
end
subgraph "Services"
N[auth.ts]
O[share.ts]
P[modules.ts]
Q[sandbox.ts]
end
A --> B & C & D
A --> E & F & G
A --> H
H --> I
A --> J
A --> K
K --> L
A --> M
A --> N & O & P & Q
- Client-side only - All compilation happens in the browser
- Worker-based compilation - Heavy work off main thread
- Lazy loading - Compilers and editors loaded on demand
- Modular architecture - Factory functions, no classes
- Type safety - Strict TypeScript with explicit types