Skip to content

Latest commit

 

History

History
156 lines (104 loc) · 5.12 KB

CONTRIBUTING.md

File metadata and controls

156 lines (104 loc) · 5.12 KB

Contributing to Sync-in

We appreciate your contributions and efforts in making this project better.
Before you contribute, please read the following guidelines to ensure a smooth collaboration.

Code of Conduct

All contributors must follow our Code of Conduct to ensure a friendly and inclusive environment.

How to Contribute

Reporting Issues & Suggesting Features

Bugs

  • Check existing issues before opening a new one.
  • Include detailed steps, logs, and screenshots when possible.

Feature Requests

  • Describe the problem the feature solves.
  • Provide use cases and, if possible, implementation suggestions.

Submitting Pull Requests

  • Open an issue before submitting any pull request for a new feature or bug fix to avoid duplicate work, ensure alignment with the project’s goals, and prevent wasted effort.
  • All pull requests must target the main branch, following the GitHub Flow model with continuous deployment.
  • Make sure your work fits with the existing architecture, code style, and documentation standards.
  • All contributions must comply with the CLA.
  • AI-assisted contributions must comply with the AI Usage Policy.
  • Contributions are made under the AGPL-3.0 license, which is the same license used by the project.

Submission Guidelines

  • Keep pull requests small and focused; avoid addressing multiple unrelated issues in a single PR.
  • Ensure all CI checks pass before submitting (linting, type checking, tests, and build).
  • Reference the related issue number in the PR description when applicable.
  • Include tests and update documentation as needed when introducing new features.
  • The PR author is responsible for resolving merge conflicts.
  • Use the Conventional Commits specification for commit messages; pull requests are squashed on merge.

Branching

  • Main: Production branch; all pull requests must target main.
  • Feature branches: Create a dedicated branch per feature or fix and submit a PR to main.

Development Setup

You will need the following on your system:

  • Git
  • Node.js with npm

Project Structure

The project uses npm workspaces to manage a monorepo with multiple workspaces. This structure enables shared tooling, coordinated builds, and simplified dependency management.

Workspace Path Technology Purpose
Root / npm workspaces Monorepo orchestration, shared scripts
Core /core Node.js Shared synchronization components and core logic
CLI /cli Node.js Command-line tool to use sync
Main /main Electron Desktop app process used by Electron
Renderer /renderer Angular User interface used by main, client-side logic

Setup Instructions

Clone the repo

git clone git@github.com:Sync-in/desktop.git
cd desktop

Install dependencies

npm ci

Build App & CLI for development

Run these commands in separate terminals. Both run in watch mode.

npm run angular:dev # build renderer (dist/renderer)
npm run webpack:all:dev # build app (dist/main) & cli (releases/sync-in-cli)

To build only App:

npm run webpack:app:dev

To build only CLI:

npm run webpack:cli:dev

Start App (dev mode)

npm run app # restart after code changes in `main`; renderer changes are handled by `angular:dev`

Start CLI (dev mode)

./releases/sync-in-cli/sync-in-cli-*.js --help

Happy coding!

Useful Script

In the root workspace

  • npm run lint code linting

Development Guidelines

  • Always write/review tests for new features and bug fixes
  • Follow code style rules (eslint.config.mjs, .prettierrc)
  • Prefer clear naming and documentation within your code
  • Document significant architectural changes and updates

i18n Translations

To declare a new language:

  1. Edit i18n/index.ts and add the language code to the LANG_SUPPORTED constant.
  2. Create a new language file in i18n/ named language-region.json, using the same language code declared previously.
  3. Import the ngx-bootstrap locale in renderer/src/i18n/lib/bs.i18n.ts. Check if the locale exists in:
    https://github.com/valor-software/ngx-bootstrap/tree/development/src/chronos/i18n
  4. Import the dayjs locale in renderer/src/i18n/lib/dayjs.i18n.ts. Check if the locale exists in:
    https://github.com/iamkun/dayjs/tree/dev/src/locale

Troubleshooting

  • App & CLI: In dev mode, the default log level is debug.
  • Renderer: Use Angular DevTools for debugging. Check browser console for runtime errors.

Useful Links


Thanks again for helping make Sync-in better! 🚀