Skip to content

Commit a55d3e9

Browse files
committed
docs: enhance CONTRIBUTING.md, add issue/PR templates, add CoC
1 parent b437fe6 commit a55d3e9

5 files changed

Lines changed: 232 additions & 18 deletions

File tree

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ""
5+
labels: bug
6+
assignees: ""
7+
---
8+
9+
**Describe the bug**
10+
A clear and concise description of what the bug is.
11+
12+
**To Reproduce**
13+
Steps to reproduce the behavior:
14+
1. Go to '...'
15+
2. Tap on '....'
16+
3. See error
17+
18+
**Expected behavior**
19+
A clear and concise description of what you expected to happen.
20+
21+
**Screenshots / Screen recording**
22+
If applicable, add screenshots or a screen recording to help explain your problem.
23+
24+
**Environment (please complete the following information):**
25+
- Device: [e.g. Pixel 7, iPhone 14]
26+
- OS version: [e.g. Android 14, iOS 17]
27+
- App version: [e.g. v1.3.0]
28+
29+
**Additional context**
30+
Add any other context about the problem here.
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 for this project
4+
title: ""
5+
labels: enhancement
6+
assignees: ""
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
A clear and concise description of what the problem is.
11+
12+
**Describe the solution you'd like**
13+
A clear and concise description of what you want to happen.
14+
15+
**Describe alternatives you've considered**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
**Additional context**
19+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## Description
2+
3+
Please include a summary of the changes and the issue that is fixed.
4+
5+
Fixes #(issue)
6+
7+
## Type of change
8+
9+
- [ ] Bug fix
10+
- [ ] New feature
11+
- [ ] Refactoring
12+
- [ ] Documentation update
13+
- [ ] CI / build
14+
15+
## Checklist
16+
17+
- [ ] My code follows the existing code style and conventions
18+
- [ ] I have run `flutter analyze` and fixed any warnings
19+
- [ ] I have run `flutter test` and all tests pass
20+
- [ ] I have added tests for my changes (if applicable)
21+
- [ ] I have run `build_runner` if I changed models: `flutter pub run build_runner build --delete-conflicting-outputs`
22+
- [ ] My commit messages are clear and descriptive

CODE_OF_CONDUCT.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment:
18+
19+
* Demonstrating empathy and kindness toward other people
20+
* Being respectful of differing opinions, viewpoints, and experiences
21+
* Giving and gracefully accepting constructive feedback
22+
* Accepting responsibility and apologizing to those affected by our mistakes
23+
* Focusing on what is best for the overall community
24+
25+
Examples of unacceptable behavior:
26+
27+
* The use of sexualized language or imagery, and sexual attention or advances
28+
* Trolling, insulting or derogatory comments, and personal or political attacks
29+
* Public or private harassment
30+
* Publishing others' private information without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate
32+
33+
## Enforcement Responsibilities
34+
35+
Project maintainers are responsible for clarifying and enforcing our standards.
36+
37+
## Scope
38+
39+
This Code of Conduct applies within all community spaces, and also applies when
40+
an individual is officially representing the community in public spaces.
41+
42+
## Enforcement
43+
44+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
45+
reported to the project maintainer. All complaints will be reviewed and
46+
investigated.
47+
48+
## Attribution
49+
50+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org),
51+
version 2.1, available at
52+
https://www.contributor-covenant.org/version/2/1/code_of_conduct.html.

CONTRIBUTING.md

Lines changed: 109 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,120 @@
11
# Contributing to termchat-mobile
22

3-
Thank you for your interest in contributing to `termchat-mobile`!
3+
Thank you for your interest in contributing to termchat-mobile!
4+
5+
## Table of Contents
6+
7+
- [Code of Conduct](#code-of-conduct)
8+
- [Getting Started](#getting-started)
9+
- [Development Setup](#development-setup)
10+
- [Project Structure](#project-structure)
11+
- [Making Changes](#making-changes)
12+
- [Style Guidelines](#style-guidelines)
13+
- [Testing](#testing)
14+
- [Pull Request Process](#pull-request-process)
15+
- [Questions?](#questions)
16+
17+
## Code of Conduct
18+
19+
This project is governed by the [Contributor Covenant](https://www.contributor-covenant.org/version/2/1/code_of_conduct/). By participating, you are expected to uphold this code.
420

521
## Getting Started
622

7-
1. **Open an Issue:** Before submitting a Pull Request, please open a corresponding issue to discuss your proposed changes, bug fix, or feature.
8-
2. **Fork the repository** on GitHub.
9-
3. **Clone your fork** to your local machine.
10-
4. **Create a new branch** for your feature or bug fix (`git checkout -b feature/amazing-feature`).
23+
1. **Open an Issue** Before submitting a Pull Request, please open a corresponding issue to discuss your proposed changes.
24+
2. **Fork the repository** on GitHub.
25+
3. **Clone your fork** to your local machine.
26+
4. **Create a new branch** — Use a descriptive name like `feat/amazing-feature` or `fix/bug-description`.
1127

12-
## Development
28+
## Development Setup
1329

14-
- This project is built with **Flutter**.
15-
- We use **BLoC** for state management (`flutter_bloc`).
16-
- Please ensure all new code is covered by tests in the `test/` directory.
17-
- Run tests before submitting your PR: `flutter test`.
18-
- Run code generation if you've changed models: `flutter pub run build_runner build --delete-conflicting-outputs`.
30+
### Prerequisites
1931

20-
## Pull Requests
32+
- **Flutter** (stable channel) — [Install](https://docs.flutter.dev/get-started/install)
33+
- **Dart** (bundled with Flutter)
34+
- **Android Studio / Xcode** — for running on device/emulator
2135

22-
1. Ensure your code follows the existing style and conventions.
23-
2. Reference the issue number in your PR description.
24-
3. Provide a clear, concise description of your changes.
25-
4. Wait for feedback and address any requested changes.
36+
### Setup
2637

27-
## Code of Conduct
38+
```bash
39+
# Get dependencies
40+
flutter pub get
41+
42+
# Run code generation (if you changed models or DI)
43+
flutter pub run build_runner build --delete-conflicting-outputs
44+
45+
# Run the app
46+
flutter run
47+
```
48+
49+
## Project Structure
50+
51+
```
52+
lib/
53+
core/ — Theme, router, constants, shared widgets
54+
data/ — Backend DTOs (JSON models)
55+
features/ — Feature modules, each with:
56+
<feature>/
57+
bloc/ — BLoC events, states, and logic
58+
pages/ — UI screens
59+
widgets/ — Reusable widgets for this feature
60+
repositories/ — Data access layer
61+
di/ — Dependency injection (GetIt + Injectable)
62+
```
63+
64+
Each feature is organized around the BLoC pattern: Event → BLoC → State → UI.
65+
66+
## Making Changes
67+
68+
### What to Work On
69+
70+
Check [open issues](https://github.com/ishaan-jindal/termchat-mobile/issues) for `good first issue` or `help wanted` labels.
71+
72+
### Commit Messages
73+
74+
Write clear, concise commit messages:
75+
76+
```
77+
feat: add copy room code button to chat top bar
78+
fix: handle WebSocket reconnection timeout
79+
refactor: extract notification helper
80+
```
81+
82+
## Style Guidelines
83+
84+
- Run `flutter analyze` and fix all warnings before committing.
85+
- Follow the [Flutter style guide](https://docs.flutter.dev/style-guide).
86+
- Use `snake_case` for file and directory names.
87+
- Use `lowerCamelCase` for variables, methods, and parameters.
88+
- Use `UpperCamelCase` for types and classes.
89+
- Keep widgets focused — extract reusable widgets when a build method exceeds ~100 lines.
90+
- Prefer `const` constructors where possible.
91+
- Use `@injectable` / `@lazySingleton` for services registered with GetIt.
92+
93+
## Testing
94+
95+
```bash
96+
# Run all tests
97+
flutter test
98+
99+
# Run tests for a specific feature
100+
flutter test test/features/chat/
101+
102+
# Run with coverage
103+
flutter test --coverage
104+
genhtml coverage/lcov.info -o coverage/html
105+
```
106+
107+
We use `mocktail` for mocking. See existing test files in `test/` for patterns.
108+
109+
## Pull Request Process
110+
111+
1. Ensure your code passes `flutter analyze` with no warnings.
112+
2. Run `flutter test` and ensure all tests pass. Add tests for new functionality.
113+
3. If you changed models or DI, run code generation and commit the generated files.
114+
4. Reference the issue number in your PR description (e.g., `Fixes #123`).
115+
5. Provide a clear, concise description of your changes.
116+
6. Wait for feedback and address any requested changes.
117+
118+
## Questions?
28119

29-
Please be respectful and follow community guidelines in all interactions.
120+
Open a [discussion](https://github.com/ishaan-jindal/termchat-mobile/discussions) or ask in the issue you're working on.

0 commit comments

Comments
 (0)