Contributing
Contributions are welcome. Bug fixes, features, documentation improvements, and test coverage — all of it helps.
Before You Start
Section titled “Before You Start”- Check existing issues to avoid duplicating work.
- Check open pull requests for in-progress work.
- For large features, open a discussion first.
- Look for
good first issuelabels if you are a first-time contributor.
Workflow
Section titled “Workflow”# 1. Fork and clonegh repo fork lokus-ai/lokus --clonecd lokus
# 2. Create a branchgit checkout -b feat/your-feature-name# or: fix/issue-42-editor-crash
# 3. Install dependenciesnpm install
# 4. Make changes and testnpm run tauri dev # Run the appnpm test # Unit testsnpm run test:e2e # E2E tests
# 5. Commit with conventional commitsgit add .git commit -m "feat: add wiki link autocomplete"
# 6. Push and open a PRgit push origin feat/your-feature-namegh pr create --title "feat: add wiki link autocomplete"Commit Messages
Section titled “Commit Messages”Follow Conventional Commits:
feat: add wiki link autocompletionfix: resolve math rendering issue in tablesdocs: update installation instructionstest: add e2e tests for preferencesrefactor: improve editor extension architectureperf: optimize file search performanceTypes: feat, fix, docs, style, refactor, perf, test, chore.
Coding Standards
Section titled “Coding Standards”JavaScript / React
Section titled “JavaScript / React”- Use ES6+ syntax and React hooks (no class components).
- Use semantic HTML and accessibility attributes in JSX.
- Format with Prettier, lint with ESLint. Both run automatically on commit.
npm run lint # Check for lint errorsnpm run lint:fix # Auto-fix lint errorsnpm run format # Format with PrettierNaming Conventions
Section titled “Naming Conventions”| What | Convention | Example |
|---|---|---|
| Component files | PascalCase.jsx | CommandPalette.jsx |
| Utility files | camelCase.js | markdownParser.js |
| Components | PascalCase | FileTree |
| Variables/functions | camelCase | handleClick |
| Constants | SCREAMING_SNAKE_CASE | MAX_DEPTH |
| CSS classes | kebab-case | file-tree-item |
Follow standard Rust conventions. Run cargo clippy before submitting.
Pull Request Checklist
Section titled “Pull Request Checklist”Before submitting your PR, confirm:
- All tests pass (
npm test && npm run test:e2e) - Code follows the naming conventions above
- New functionality includes tests
- Documentation updated if user-facing behavior changed
- Branch is rebased on latest
main
Review Process
Section titled “Review Process”- CI runs tests and builds on macOS, Windows, and Linux.
- A maintainer reviews the code for correctness and design.
- At least one maintainer approval is required to merge.
- PRs are squash-merged into
main.
License
Section titled “License”By contributing to Lokus, you agree that your contributions will be licensed under the FCL 1.0 (Fair Core License). The license converts to MIT after 2 years.
Getting Help
Section titled “Getting Help”- GitHub Discussions — questions and ideas
- Discord — real-time chat
- GitHub Issues — bug reports and feature requests