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: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:Test Functionality
Manually test your changes across different screen sizes:
- Desktop: Window management, drag & drop, right-click menus
- Mobile: Touch gestures, responsive layouts
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
maindeploy automatically - Build Verification: GitHub Actions validates builds
- Manual Testing: UI/UX changes undergo manual review
Code Standards
TypeScript
The project uses strict TypeScript configuration:Strict Typing
Strict Typing
- All variables must have explicit types
- No
anytypes unless absolutely necessary - Use existing interfaces and types from core systems
Code Patterns
Code Patterns
- Follow patterns in
/src/scripts/ - Use class-based architecture for core systems
- Implement proper error handling
Import Standards
Import Standards
- Use relative imports for local modules
- Import from utilities for shared functionality
- Lazy load features when possible
CSS
- Variables
- Naming
- Responsive
Use existing CSS variables from
/public/css/base/variables.css:File Organization
The codebase follows a modular structure: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
Web Workers
Web Workers
Use Web Workers for heavy operations:
Lifecycle Management
Lifecycle Management
Implement proper cleanup:
Caching
Caching
Cache expensive operations:
Common Tasks
Adding a New Style Module
Adding a Desktop Icon
Modifying Themes
Test with Multiple Palettes
Ensure your theme works with different color palettes from
/src/data/cde_palettes.json.Testing
Manual Testing Checklist
Desktop Functionality
Desktop Functionality
- Window management (open, close, minimize, maximize)
- Drag and drop operations
- Right-click context menus
- Keyboard shortcuts
- Multi-window interactions
Mobile Functionality
Mobile Functionality
- Touch gestures (tap, swipe, pinch)
- Responsive layouts
- Mobile menu navigation
- Virtual keyboard handling
Theme System
Theme System
- 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:Documentation Standards
- Language
- Formatting
- Visuals
- Completeness
- 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?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
| Script | Command | Description |
|---|---|---|
| Dev | npm run dev | Start development server |
| Build | npm run build | Build for production |
| Preview | npm run preview | Preview production build |
| Format | npm run format | Format code with Prettier |

