Skip to content

Commit dc6f6eb

Browse files
add contribution guide
1 parent 909263a commit dc6f6eb

File tree

1 file changed

+141
-0
lines changed

1 file changed

+141
-0
lines changed

.github/CONTRIBUTING.md

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
# Contributing to Better-T-Stack
2+
3+
Thank you for your interest in contributing to Better-T-Stack! This document provides guidelines and setup instructions for contributors.
4+
5+
## Project Structure
6+
7+
This repository is organized as a monorepo containing:
8+
9+
- **CLI**: [`apps/cli`](apps/cli) - The scaffolding CLI tool (`create-better-t-stack`)
10+
- **Documentation**: [`apps/web`](apps/web) - Official website and documentation
11+
12+
## Development Setup
13+
14+
### Prerequisites
15+
16+
- Node.js 20+
17+
- Bun (recommended)
18+
- Git
19+
20+
### Initial Setup
21+
22+
1. **Clone the repository**
23+
```bash
24+
git clone https://github.com/better-t-stack/create-better-t-stack.git
25+
cd create-better-t-stack
26+
```
27+
28+
2. **Install dependencies**
29+
```bash
30+
bun install
31+
```
32+
33+
### CLI Development
34+
35+
1. **Navigate to CLI directory**
36+
```bash
37+
cd apps/cli
38+
```
39+
40+
2. **Link the CLI globally** (optional, for testing anywhere in your system)
41+
```bash
42+
bun link
43+
```
44+
Now you can use `create-better-t-stack` from anywhere in your system.
45+
46+
3. **Start development server**
47+
```bash
48+
bun dev:cli
49+
```
50+
This runs the CLI in watch mode, automatically rebuilding on changes.
51+
52+
### Web Development
53+
54+
1. **Start the documentation website**
55+
```bash
56+
bun dev:web
57+
```
58+
This starts the Next.js development server for the documentation site.
59+
60+
## Contribution Guidelines
61+
62+
### Before You Start
63+
64+
**Please ask before working on any new features!** We don't want to waste your time on features that might not align with the project's direction. Open an issue or discussion first to discuss your proposed changes.
65+
66+
### Standard Contribution Steps
67+
68+
1. **Create an issue** (if one doesn't exist)
69+
- Describe the bug or feature request
70+
- Include steps to reproduce (for bugs)
71+
- Discuss the proposed solution
72+
73+
2. **Fork the repository**
74+
75+
3. **Create a feature branch**
76+
```bash
77+
git checkout -b feature/your-feature-name
78+
# or
79+
git checkout -b fix/your-bug-fix
80+
```
81+
82+
4. **Make your changes**
83+
- Follow the existing code style
84+
- Update documentation as needed
85+
86+
5. **Test and format your changes**
87+
```bash
88+
# For CLI changes
89+
cd apps/cli
90+
bun dev:cli
91+
92+
# For web changes
93+
bun dev:web
94+
95+
# Format files
96+
bun run format
97+
98+
# Run type checks
99+
bun check
100+
```
101+
102+
6. **Add changeset** (for CLI-related changes)
103+
```bash
104+
bunx changeset select create-better-t-stack
105+
# Choose 'patch' for small fixes, 'minor' for features
106+
# Never choose 'major'
107+
```
108+
109+
7. **Commit your changes**
110+
```bash
111+
git add .
112+
git commit -m "feat(web): add your feature description"
113+
# or
114+
git commit -m "fix(cli): fix your bug description"
115+
```
116+
117+
8. **Push to your fork**
118+
```bash
119+
git push origin feature/your-feature-name
120+
```
121+
122+
9. **Create a Pull Request**
123+
- Link to the related issue
124+
- Describe your changes
125+
126+
### Testing
127+
128+
- **Manual testing**: Test your changes manually to ensure everything works as expected
129+
- For CLI changes: Test with different configurations and options
130+
- For web changes: Ensure the site builds and displays correctly
131+
132+
## Getting Help
133+
134+
- Open an issue for bugs or feature requests
135+
- Join discussions for questions or ideas
136+
- Check existing issues and PRs for similar work
137+
- Join our [Discord](https://discord.gg/ZYsbjpDaM5) if you have any problems
138+
139+
## License
140+
141+
By contributing to Better-T-Stack, you agree that your contributions will be licensed under the MIT License.

0 commit comments

Comments
 (0)