Skip to content

Commit dad5ad8

Browse files
committed
chore: add GitHub Actions, issue templates, and contributing guidelines
1 parent 3316de9 commit dad5ad8

File tree

4 files changed

+234
-0
lines changed

4 files changed

+234
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: "[BUG] "
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Environment (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Additional context**
32+
Add any other context about the problem here.
33+
34+
**Concurrency Testing**
35+
If the bug involves multiple users:
36+
- [ ] Bug occurs with single user
37+
- [ ] Bug occurs with multiple users (race condition)
38+
- [ ] Bug occurs during rapid clicking/interactions
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: "[FEATURE] "
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.
21+
22+
**Impact on Concurrency**
23+
- [ ] This feature affects multi-user interactions
24+
- [ ] This feature requires atomic operations
25+
- [ ] This feature might introduce race conditions
26+
- [ ] This feature is single-user only

.github/workflows/ci.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: CI/CD Pipeline
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [18.x, 20.x]
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
cache: 'npm'
26+
27+
- name: Install dependencies
28+
run: npm ci
29+
30+
- name: Run linter
31+
run: npm run lint
32+
33+
- name: Build project
34+
run: npm run build
35+
36+
- name: Run type check
37+
run: npx tsc --noEmit
38+
39+
build:
40+
needs: test
41+
runs-on: ubuntu-latest
42+
if: github.ref == 'refs/heads/main'
43+
44+
steps:
45+
- name: Checkout code
46+
uses: actions/checkout@v4
47+
48+
- name: Setup Node.js
49+
uses: actions/setup-node@v4
50+
with:
51+
node-version: '20.x'
52+
cache: 'npm'
53+
54+
- name: Install dependencies
55+
run: npm ci
56+
57+
- name: Build for production
58+
run: npm run build
59+
60+
- name: Upload build artifacts
61+
uses: actions/upload-artifact@v4
62+
with:
63+
name: production-build
64+
path: dist/
65+
retention-days: 30

CONTRIBUTING.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Contributing to Digital Twin Counter
2+
3+
Thank you for your interest in contributing to Digital Twin Counter! This document provides guidelines and instructions for contributing to this project.
4+
5+
## Code of Conduct
6+
7+
Please be respectful and professional in all interactions. We welcome contributions from developers of all experience levels.
8+
9+
## Development Setup
10+
11+
1. **Fork and Clone**
12+
```bash
13+
git clone https://github.com/YOUR-USERNAME/digital-twin.git
14+
cd digital-twin
15+
```
16+
17+
2. **Install Dependencies**
18+
```bash
19+
npm install
20+
```
21+
22+
3. **Set up Convex**
23+
```bash
24+
npx convex dev
25+
```
26+
Follow the prompts to set up your Convex deployment.
27+
28+
4. **Start Development Server**
29+
```bash
30+
npm run dev
31+
```
32+
33+
## Development Guidelines
34+
35+
### Code Style
36+
- Use TypeScript for all new code
37+
- Follow the existing code patterns and architecture
38+
- Use meaningful variable and function names
39+
- Write clean, self-documenting code
40+
41+
### Testing Concurrency
42+
When working on features that affect multiple users:
43+
1. Test with multiple browser tabs/windows
44+
2. Test rapid clicking/interactions
45+
3. Verify atomic operations work correctly
46+
4. Check for race conditions
47+
48+
### Architecture Principles
49+
- **SOLID Principles**: Follow Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, and Dependency Inversion
50+
- **DRY**: Don't Repeat Yourself
51+
- **Component Separation**: Keep components focused and reusable
52+
- **Type Safety**: Use TypeScript interfaces and types throughout
53+
54+
## Submitting Changes
55+
56+
1. **Create a Branch**
57+
```bash
58+
git checkout -b feature/your-feature-name
59+
```
60+
61+
2. **Make Your Changes**
62+
- Write clean, well-documented code
63+
- Test your changes thoroughly
64+
- Ensure the build passes: `npm run build`
65+
66+
3. **Commit Your Changes**
67+
```bash
68+
git commit -m "feat: add your feature description"
69+
```
70+
Use conventional commit messages:
71+
- `feat:` for new features
72+
- `fix:` for bug fixes
73+
- `docs:` for documentation changes
74+
- `refactor:` for code refactoring
75+
- `test:` for adding tests
76+
77+
4. **Push and Create Pull Request**
78+
```bash
79+
git push origin feature/your-feature-name
80+
```
81+
Then create a pull request through GitHub.
82+
83+
## Pull Request Guidelines
84+
85+
- Provide a clear description of the changes
86+
- Include screenshots for UI changes
87+
- Reference any related issues
88+
- Ensure CI/CD pipeline passes
89+
- Test concurrency scenarios if applicable
90+
91+
## Areas for Contribution
92+
93+
- **UI/UX Improvements**: Better design, animations, accessibility
94+
- **Performance Optimizations**: Faster load times, reduced bundle size
95+
- **New Features**: Additional counter operations, user management
96+
- **Testing**: Unit tests, integration tests, E2E tests
97+
- **Documentation**: Code comments, tutorials, examples
98+
- **Accessibility**: Screen reader support, keyboard navigation
99+
- **Internationalization**: Multi-language support
100+
101+
## Questions?
102+
103+
Feel free to open an issue for questions or discussions about potential contributions.
104+
105+
Thank you for contributing to Digital Twin Counter!

0 commit comments

Comments
 (0)