Skip to main content

Development Setup

Prerequisites

Before starting development, ensure you have the following installed:
  • Node.js v20+ - JavaScript runtime
  • npm v10+ - Package manager

Quick Start

Get the project running locally in three simple steps:
The development server will start at http://localhost:4321.
The project uses Astro with TypeScript. The dev server provides hot module replacement for fast development.

Pull Request Process

Before Submitting

Run these checks before creating a pull request:
1

Format Code

Run the formatter to ensure consistent code style:
2

Build Verification

Verify the build completes successfully:
This must pass without errors.
3

Test Functionality

Manually test your changes across different screen sizes:
  • Desktop: Window management, drag & drop, right-click menus
  • Mobile: Touch gestures, responsive layouts
4

Lint Check

Follow existing TypeScript patterns and strict typing requirements.

PR Requirements

Documentation

Reference issue number if applicableInclude clear description of changes

Testing

Test on desktop and mobile for UI changesVerify theme system if modifying styles

Code Quality

Follow existing code patternsMaintain architecture consistency

Build Status

Ensure build passesFix any TypeScript errors

Review Process

  • Automatic Deployment: PRs merged to main deploy automatically
  • Build Verification: GitHub Actions validates builds
  • Manual Testing: UI/UX changes undergo manual review

Code Standards

TypeScript

The project uses strict TypeScript configuration:
  • All variables must have explicit types
  • No any types unless absolutely necessary
  • Use existing interfaces and types from core systems
  • Follow patterns in /src/scripts/
  • Use class-based architecture for core systems
  • Implement proper error handling
  • Use relative imports for local modules
  • Import from utilities for shared functionality
  • Lazy load features when possible

CSS

Use existing CSS variables from /public/css/base/variables.css:

File Organization

The codebase follows a modular structure:
Do not modify core system files without understanding the architecture. See Architecture Overview for details.

Architecture Guidelines

Key Systems

Refer to technical documentation for detailed architecture:

Architecture

System design and module patterns

Storage

IndexedDB and localStorage usage

Version Updates

Update system and migrations

Module Patterns

Style modules must implement these methods:
See existing style modules in /src/scripts/features/style/ for reference implementations.

Performance Considerations

Use Web Workers for heavy operations:
Implement proper cleanup:
Cache expensive operations:

Common Tasks

Adding a New Style Module

1

Create Module File

Create your module in /src/scripts/features/style/:
2

Register in StyleManager

Add to StyleManager constructor:
3

Add UI Component

Create component in /src/components/features/style/:
4

Add CSS Styles

Add styles in /public/css/components/style-manager/:

Adding a Desktop Icon

1

Add Icon File

Place icon in /public/icons/ (preferably SVG or PNG).
2

Update SYSTEM_ICONS

Edit desktop.ts:
3

Implement Click Handler

Add handler if needed:

Modifying Themes

XPM backdrops use palette colors. Clear cache on palette changes to ensure proper rendering.
1

Test with Multiple Palettes

Ensure your theme works with different color palettes from /src/data/cde_palettes.json.
2

Handle Backdrop Rendering

XPM files are parsed with current palette colors:
3

Test URL Sharing

Verify theme state is preserved in URL parameters for sharing.

Testing

Manual Testing Checklist

  • Window management (open, close, minimize, maximize)
  • Drag and drop operations
  • Right-click context menus
  • Keyboard shortcuts
  • Multi-window interactions
  • Touch gestures (tap, swipe, pinch)
  • Responsive layouts
  • Mobile menu navigation
  • Virtual keyboard handling
  • Palette changes apply correctly
  • Backdrop rendering works
  • Theme state persists
  • URL sharing preserves theme
  • Cache clears on palette change

Build Verification

Run these commands to verify your changes:
The build process uses Astro for static site generation and Vite for bundling. TypeScript compilation happens during build.

Documentation

For detailed information about the system architecture and features:

User Guide

End-user documentation and tutorials

Technical Docs

System architecture and implementation

Documentation Standards

  • Use clear, concise English
  • Avoid unnecessary jargon
  • Define technical terms when first used
  • Write for both beginners and experts

Contributing to Documentation

Found an error or want to improve the documentation?
1

Identify

Find the relevant .md file in the docs/ directory.
2

Edit

Make your changes, ensuring they follow the standards above.
3

Verify

Check that all links work and formatting is correct.
4

Submit PR

Submit a pull request with a description of the documentation improvements.
For major documentation changes, please open an issue first to discuss the structure.

Issues and Discussions

Bug Reports

Use GitHub Issues with:
  • Clear reproduction steps
  • Expected vs actual behavior
  • Environment details
  • Screenshots if applicable

Feature Requests

Propose in GitHub Discussions:
  • Describe the use case
  • Explain expected behavior
  • Consider implementation impact

Questions

Before asking:
  • Check existing documentation
  • Search closed issues
  • Review architecture docs

Build Information

Built with TypeScript, Astro, and authentic CDE design principles. Current version: 1.0.31

Project Dependencies

Available Scripts