Skip to content

Latest commit

 

History

History
103 lines (73 loc) · 2.79 KB

File metadata and controls

103 lines (73 loc) · 2.79 KB

Contributing to Sinau LMS

Thanks for your interest in contributing! This guide covers the basics.

Prerequisites

  • Rust 1.80+ — install via rustup
  • Git

Build

git clone https://github.com/codecoradev/sinau-lms.git
cd sinau-lms/server
cargo build

Test

cd server

# Run all tests (unit + integration)
cargo test

# Run integration tests for a specific sprint
cargo test --test sprint9_communities_test

Code Style

cd server

# Format check — must pass
cargo fmt --all -- --check

# Lint — must pass with no warnings
cargo clippy --all-targets -- -D warnings

Run cargo fmt before committing. Clippy warnings are treated as errors in CI.

Submitting a PR

  1. Fork the repository
  2. Create a branch from develop — use descriptive names like fix/auth-crash or feat/certificates
  3. Make your changes — keep PRs focused and small
  4. Add tests for new functionality
  5. Run checks locallycargo fmt, cargo clippy, cargo test all green
  6. Open a Pull Request against the develop branch

CI Checks

Every PR runs these checks (all must pass before merge):

Check Description
Check cargo check --all-targets
Format cargo fmt --all -- --check
Clippy cargo clippy --all-targets -- -D warnings
Test cargo test (all unit + integration tests)
Build cargo build --release

Commit Messages

Use clear, descriptive commit messages:

feat(courses): add certificate PDF generation
fix(auth): handle expired tokens gracefully
docs: update README with setup instructions
refactor: extract RBAC helpers into module

Prefix with type: feat, fix, docs, refactor, test, chore, style.

Architecture

Sinau LMS is a Rust backend (Axum + SQLx + SQLite) with a SvelteKit 5 frontend:

server/                  # Rust backend
├── src/
│   ├── lib.rs           # App setup, route registration
│   ├── routes/          # API route handlers
│   ├── config.rs        # Configuration
│   ├── errors.rs        # Error types
│   └── rbac.rs          # Role-based access control
├── migrations/          # SQLite migrations (sequential)
└── tests/               # Integration tests (per-sprint)
    └── common/          # Shared test utilities
web/                     # SvelteKit 5 frontend (planned)

Reporting Issues

License

By contributing, you agree that your contributions will be licensed under the project license.