Contributing
Thank you for your interest in developing ElyOS! This guide will help you get started, shows our conventions, and walks you through submitting your first contribution.
Code of Conduct
Section titled “Code of Conduct”We are committed to providing an inclusive, friendly, and harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, experience level, nationality, appearance, race, religion, or sexual identity and orientation.
Expected Behavior
Section titled “Expected Behavior”- Be respectful and considerate in all interactions
- Welcome newcomers and help them get started
- Accept constructive criticism openly
- Focus on what’s best for the community and project
- Show empathy toward other community members
Unacceptable Behavior
Section titled “Unacceptable Behavior”- Harassment, trolling, or personal attacks
- Publishing others’ private information without consent
- Discriminatory language or imagery
- Any behavior that would be unacceptable in a professional environment
Prerequisites
Section titled “Prerequisites”Before starting development, ensure you have the required tools installed (Bun, Node.js, Docker, Git).
Detailed guide: Getting Started →
Setting Up Development Environment
Section titled “Setting Up Development Environment”- Fork and clone — Fork the repo on GitHub, then clone it
- Install dependencies —
bun install - Environment variables — Copy
.env.exampleto.envand fill in values - Start database —
bun docker:dbandbun db:init - Dev server —
bun app:dev
Detailed guide: Getting Started →
Code Style and Conventions
Section titled “Code Style and Conventions”Language
Section titled “Language”The codebase uses English for code comments, variable names, and documentation. When modifying existing files, follow the language convention already present in that file.
TypeScript
Section titled “TypeScript”- Strict mode enabled — avoid
anywhere possible - Use explicit return types for exported functions
- Prefer
interfaceovertypefor object shapes - Use
$lib/...path aliases for internal imports
Svelte 5
Section titled “Svelte 5”ElyOS uses Svelte 5 with runes. Key patterns:
- Use
$state,$derived, and$effectrunes for reactivity (not the old$:syntax) - Class-based stores with
$stateproperties, exported viacreateX()/setX()/getX()functions - Store files use
.svelte.tsextension
Formatting and Linting
Section titled “Formatting and Linting”We use Prettier and ESLint. Before committing, always run:
bun format # Automatic formattingbun lint # Check for issuesServer Actions
Section titled “Server Actions”Server-side logic in *.remote.ts files follows this pattern:
command(schema, handler)for mutationsquery(handler)for reads- Always validate input with Valibot schemas
- Return value:
{ success: boolean, error?: string, ...data }
Detailed guide: Server Actions →
Database
Section titled “Database”- Schemas live in
packages/database/src/schemas/ - Use Drizzle ORM for all database operations
- After schema changes, run
bun db:generateto create migrations
Detailed guide: Database →
Testing
Section titled “Testing”- Vitest for unit tests
- fast-check for property-based tests
- Playwright for end-to-end tests
- Run tests from
apps/web:bun test
Detailed guide: Testing →
Commit Messages
Section titled “Commit Messages”We follow the Conventional Commits specification.
Format
Section titled “Format”<type>(<scope>): <description>
[optional body]
[optional footer(s)]| Type | Description |
|---|---|
feat | New feature |
fix | Bug fix |
docs | Documentation changes only |
style | Formatting, missing semicolons, etc. (not code changes) |
refactor | Code change that neither fixes a bug nor adds a feature |
perf | Performance improvement |
test | Adding or updating tests |
build | Build system or dependency changes |
ci | CI/CD configuration changes |
chore | Other changes that don’t modify src or test files |
Use the package or area name as scope:
core— main SvelteKit app (apps/web)sdk— SDK package (packages/sdk)cli— CLI tool (packages/create-elyos-app)db— database package (packages/database)docker— Docker configurationdocs— documentation
Examples
Section titled “Examples”feat(core): add keyboard shortcuts to window managerfix(sdk): resolve mock data service localStorage race conditiondocs(cli): update template selection instructionsrefactor(db): simplify user schema relationstest(core): add property-based tests for taskbar sortingci: add arm64 platform to Docker buildBranching Strategy
Section titled “Branching Strategy”main— stable, production-ready codedevelop— integration branch for next releasefeat/<name>— feature branches (branch fromdevelop)fix/<name>— bugfix branches (branch fromdevelopormainfor hotfixes)
Pull Request Process
Section titled “Pull Request Process”Before Submitting
Section titled “Before Submitting”-
Sync with upstream:
Terminál git fetch upstreamgit rebase upstream/develop -
Run all checks:
Terminál bun formatbun lintbun app:checkbun test # from apps/web directory -
Stay focused — one PR for one feature or fix. Avoid mixing unrelated changes.
Submitting PR
Section titled “Submitting PR”- Push your branch to your fork
- Open a Pull Request against the
developbranch - Fill in the PR template with:
- Clear description and rationale
- Related issue number(s) (e.g.,
Closes #42) - Screenshots for UI changes
- Breaking changes or migration steps, if any
Review Process
Section titled “Review Process”- At least one maintainer approval required before merging
- CI checks (lint, type check, tests, build) must pass
- Reviewers may request changes — address feedback and push updates to the same branch
- After approval, maintainer squash and merge
Reporting Issues
Section titled “Reporting Issues”Bug Reports
Section titled “Bug Reports”When reporting a bug, provide:
- Description — what happened and what was expected
- Reproduction steps — minimal steps to reproduce
- Environment — OS, browser, Bun version, Node.js version
- Screenshots or logs — if relevant
- ElyOS version — commit hash or release tag
Feature Requests
Section titled “Feature Requests”When requesting a feature, provide:
- Problem — what problem does it solve?
- Proposed solution — how should it work?
- Alternatives considered — what other approaches did you explore?
- Additional context — mockups, examples, or references
Development Tips
Section titled “Development Tips”Working with Built-in Applications
Section titled “Working with Built-in Applications”Each application has its own entry point (index.svelte), icon, and optional server actions in src/apps/[app-name]/.
Detailed guide: Built-in Applications →
Hot Reload
Section titled “Hot Reload”The dev server supports hot module replacement. Changes to .svelte, .ts, and .css files appear instantly without full page reload.
Database Changes
Section titled “Database Changes”- Modify schemas in
packages/database/src/schemas/ - Run
bun db:generateto create migration - Run
bun db:migrateto apply - Test with
bun db:studioto inspect database
Detailed guide: Database →
Getting Help
Section titled “Getting Help”If you have questions or get stuck:
- Issues — search existing issues or open a new one
- Discussions — use GitHub Discussions for questions and ideas
- Documentation — check this documentation site for guides
- Troubleshooting — common problems and solutions: Troubleshooting →
Thank you for contributing to ElyOS! Every contribution matters, no matter how small. 🎉