Skip to content

Commit 3474526

Browse files
committed
docs: add open source community health files, issue templates, and contributing guide
1 parent 34305a0 commit 3474526

6 files changed

Lines changed: 226 additions & 0 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Bug Report
3+
about: Create a report to help us reproduce and fix an issue
4+
title: 'bug: '
5+
labels: 'bug'
6+
assignees: ''
7+
---
8+
9+
## Description
10+
A clear and concise description of the bug.
11+
12+
## Steps to Reproduce
13+
1. Launch AlgoBuddy (Native desktop or WASM web build).
14+
2. Select problem `#XX: [Problem Title]`.
15+
3. Input parameters: `...`
16+
4. Click 'Play' or scrub timeline to step `X`.
17+
5. Observe error behavior.
18+
19+
## Expected Behavior
20+
A clear description of what you expected to happen.
21+
22+
## Platform Environment
23+
- OS: [e.g. Windows 11, macOS Sonoma, Ubuntu 22.04, WASM / Browser]
24+
- Browser (if WASM): [e.g. Chrome 125, Firefox 126, Safari 17]
25+
- Application Version: [e.g. v0.5.0]
26+
27+
## Screenshots / Console Output
28+
If applicable, attach screenshots or terminal logs to help explain the issue.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an idea or enhancement for AlgoBuddy
4+
title: 'feat: '
5+
labels: 'enhancement'
6+
assignees: ''
7+
---
8+
9+
## Feature Description
10+
A clear and concise description of the proposed feature or visualizer enhancement.
11+
12+
## Motivation / Problem Statement
13+
What problem does this feature solve, or how does it improve the visual learning experience?
14+
15+
## Proposed Implementation Details
16+
If applicable, describe how the proposed feature would interact with the UI, step generator engine, or canvas state renderers.
17+
18+
## Alternative Solutions
19+
Describe any alternative solutions or features considered.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Description
2+
Summary of the changes made in this pull request and the rationale behind them.
3+
4+
## Related Issues
5+
Closes #[issue_number]
6+
7+
## Type of Change
8+
- [ ] Bug fix (non-breaking change fixing an issue)
9+
- [ ] New problem visualizer audit / promotion (`AuditStatus::Audited`)
10+
- [ ] New feature (non-breaking change adding functionality)
11+
- [ ] Documentation update
12+
- [ ] Refactoring / performance optimization
13+
14+
## Verification Checklist
15+
- [ ] Code compiles cleanly without errors
16+
- [ ] `cargo test` passes 100% of unit tests
17+
- [ ] `cargo fmt --all -- --check` complies with standard Rust formatting
18+
- [ ] `cargo clippy --all-targets -- -D warnings` produces zero warnings
19+
- [ ] Step visualizer tested locally in desktop mode (`cargo run`) and/or WebAssembly mode (`trunk serve`)

CODE_OF_CONDUCT.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8+
9+
---
10+
11+
## Our Standards
12+
13+
Examples of behavior that contributes to a positive environment for our project include:
14+
15+
- Demonstrating empathy and kindness toward other people
16+
- Being respectful of differing opinions, viewpoints, and experiences
17+
- Giving and gracefully accepting constructive feedback
18+
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
19+
- Focusing on what is best not just for us as individuals, but for the overall community
20+
21+
Examples of unacceptable behavior include:
22+
23+
- The use of sexualized language or imagery, and sexual attention or advances of any kind
24+
- Trolling, insulting or derogatory comments, and personal or political attacks
25+
- Public or private harassment
26+
- Publishing others' private information, such as a physical or email address, without their explicit permission
27+
- Other conduct which could reasonably be considered inappropriate in a professional setting
28+
29+
---
30+
31+
## Enforcement Responsibilities
32+
33+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
34+
35+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for enforcement decisions when appropriate.
36+
37+
---
38+
39+
## Scope
40+
41+
This Code of Conduct applies within all project spaces, and also applies when an individual is officially representing the project in public spaces. Examples of representing a project or community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
42+
43+
---
44+
45+
## Enforcement
46+
47+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the project maintainers. All complaints will be reviewed and investigated promptly and fairly.
48+
49+
All project leaders are obligated to respect the privacy and security of the reporter of any incident.
50+
51+
---
52+
53+
## Attribution
54+
55+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1, available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.

CONTRIBUTING.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Contributing to AlgoBuddy
2+
3+
Thank you for your interest in contributing to AlgoBuddy. This document outlines the development workflow, project architecture, testing requirements, and submission process for pull requests.
4+
5+
---
6+
7+
## Development Setup
8+
9+
### Prerequisites
10+
- Rust 1.75 or later (`rustup update stable`)
11+
- Cargo (included with standard Rust installation)
12+
- Trunk (for WebAssembly builds): `cargo install trunk`
13+
- WASM target: `rustup target add wasm32-unknown-unknown`
14+
15+
### Local Execution
16+
17+
To run the native desktop application:
18+
```bash
19+
cargo run
20+
```
21+
22+
To run the WebAssembly application locally in a browser:
23+
```bash
24+
trunk serve
25+
```
26+
Then navigate to `http://127.0.0.1:8080`.
27+
28+
---
29+
30+
## Running Tests
31+
32+
All algorithm step generators and parsing logic are validated using automated Rust unit tests. Run the full test suite with:
33+
34+
```bash
35+
cargo test
36+
```
37+
38+
Ensure all tests pass before submitting a pull request.
39+
40+
---
41+
42+
## Architecture Overview
43+
44+
AlgoBuddy is structured into four core areas:
45+
46+
1. `src/main.rs`: Application entry points for native execution (`eframe::run_native`) and WASM execution (`eframe::WebRunner`).
47+
2. `src/model.rs`: Problem definitions (`Problem`), category taxonomy (`Category`), difficulty levels (`Difficulty`), metadata specs (`ProblemDetails`), and visual state snapshots (`VisualState`).
48+
3. `src/app.rs`: Main GUI application state (`VisualizerApp`), UI view modes, navigation, playback controls, canvas renderers, and theme palettes.
49+
4. `src/algorithms/`: Step snapshot generator functions (`generate_*_steps`) for each algorithm.
50+
51+
### Deterministic State Engine
52+
Algorithms in AlgoBuddy do not execute asynchronously during playback. Instead, generator functions in `src/algorithms/` execute synchronously upfront and produce a `Vec<Step>` snapshot vector. The GUI renders state snapshots based on the active timeline index (`current_step_idx`), allowing forward and backward scrubbing.
53+
54+
### Release Mode and Audit Gating
55+
Problems in AlgoBuddy carry an audit status (`AuditStatus::Audited` or `AuditStatus::Unaudited`).
56+
- By default (Public Release Mode), the UI presents only audited problems.
57+
- Developer Mode (toggleable in Settings) displays all implemented problems, flagging unaudited implementations with an `[EXP]` tag.
58+
59+
---
60+
61+
## How to Audit or Promote a Problem
62+
63+
To audit an existing problem visualizer and promote it to Public Release status:
64+
65+
1. Open the application in Developer Mode (`show_unaudited: true`).
66+
2. Verify that the algorithm step generator produces accurate state snapshots for standard and edge-case inputs.
67+
3. Ensure active line highlighting (`code_line`) matches the associated source code snippet.
68+
4. Add a unit test in `src/app.rs` under `#[cfg(test)] mod tests` asserting expected output values.
69+
5. In `src/model.rs`, update the `audit_status` match arm for the target problem to return `AuditStatus::Audited`.
70+
6. Run `cargo test` to verify build and test compliance.
71+
72+
---
73+
74+
## Pull Request Guidelines
75+
76+
1. **Branch Naming**: Use descriptive branch names such as `feat/audit-two-sum` or `fix/canvas-render-bounds`.
77+
2. **Code Formatting**: Format code using `cargo fmt` before committing.
78+
3. **Clippy Compliance**: Ensure `cargo clippy --all-targets -- -D warnings` reports zero warnings.
79+
4. **Test Coverage**: Include unit tests for any new algorithm step generators or parser utilities.
80+
5. **Commit Messages**: Write concise commit messages following standard conventions (e.g., `feat: add visualizer for problem #X`, `fix: resolve bounds checking on timeline scrubber`).

SECURITY.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
Security updates are applied to the `main` branch and released via the latest tagged GitHub releases and WebAssembly live build.
6+
7+
| Version | Supported |
8+
| ------- | ------------------ |
9+
| latest | Yes |
10+
| < 0.5.0 | No |
11+
12+
---
13+
14+
## Reporting a Vulnerability
15+
16+
If you discover a security vulnerability within AlgoBuddy, please report it responsibly rather than opening a public issue.
17+
18+
### Disclosure Process
19+
20+
1. Email security reports directly to the project maintainers or submit a private security advisory via GitHub Security Advisories.
21+
2. Provide a detailed description of the vulnerability, including steps to reproduce, impacted components, and potential risk assessment.
22+
3. The maintainers will acknowledge receipt of your vulnerability report within 48 hours and provide status updates as investigation progresses.
23+
4. Once a fix is developed and verified, a patched release will be published.
24+
25+
We appreciate your assistance in keeping AlgoBuddy secure for all users and contributors.

0 commit comments

Comments
 (0)