Basic Workflow
Preliminaries
This project uses Tauri v2. Please install:
For Linux, you may need extra system prerequisites. See Tauri Prerequisites.
Fork this repository first, then clone your own fork:
git clone git@github.com:<your-github-username>/SJMCL.gitThen install dependencies with npm:
npm installConfigure environment variables
Copy .env.template to .env, then fill in the required values based on the comments in the template.
These values are embedded into the Rust backend as compile-time constants.
Run locally
npm run tauri devCheck the code style
We use ESLint and Prettier for frontend code, and rustfmt for backend code to ensure consistent formatting.
npm run lint-stagedAlternatively, to manually check and fix formatting issues:
# For frontend part
npx eslint "src/**/*.{js,jsx,ts,tsx}" --no-fix # check
npx eslint "src/**/*.{js,jsx,ts,tsx}" --fix # fix
# For backend part (For Linux, macOS or Git Bash on Windows)
rustfmt --check src-tauri/src/**/*.rs # check
rustfmt src-tauri/src/**/*.rs # fix
# For backend part (For Windows PowerShell)
cd src-tauri
cargo fmt -- --check src/**/*.rs # check
cargo fmt -- src/**/*.rs # fixIf you use VS Code for developing this project, we recommend setting rust-analyzer.check.command to clippy in your workspace settings for stricter code checking.
Build
Build the project into an executable:
npm run tauri buildFor cross-platform compilation, packaging in a specific format, or more details, please refer to the official Tauri distribution guide.
