Skip to content

Commit fdbe163

Browse files
docs: Add a detailed "Getting Started" guide for beginners in CONTRIBUTING.md file.
1 parent 049ef40 commit fdbe163

1 file changed

Lines changed: 87 additions & 9 deletions

File tree

CONTRIBUTING.md

Lines changed: 87 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,68 +2,146 @@
22

33
Thanks for helping improve FairShare. This guide covers setup, workflow, and contribution standards.
44

5+
## Getting Started (for Beginners)
6+
7+
This section explains how to start contributing if you're new to the project or open source in general.
8+
9+
### 1. Fork the Repository
10+
11+
Click the **Fork** button at the top-right of the repository page to create your own copy of the codebase.
12+
13+
### 2. Clone Your Fork
14+
15+
Clone your forked repository to your local machine:
16+
17+
```bash
18+
git clone https://github.com/YOUR_USERNAME/FairShare.git
19+
cd FairShare
20+
```
21+
22+
*Replace `YOUR_USERNAME` with your GitHub username.*
23+
24+
### 3. Set Up Upstream
25+
26+
Keep your fork in sync with the main project:
27+
28+
```bash
29+
git remote add upstream https://github.com/Arun-kushwaha007/FairShare.git
30+
```
31+
32+
### 4. Create a Branch
33+
34+
Always create a new branch for your work. Use the following naming standard:
35+
36+
- `feat/your-feature-name` (for new features)
37+
- `fix/bug-description` (for bug fixes)
38+
- `docs/what-changed` (for documentation updates)
39+
40+
```bash
41+
git checkout -b feat/add-new-feature
42+
```
43+
44+
### 5. Make Changes & Commit
45+
46+
After making your changes, stage and commit them. Follow the conventional commit style (see below).
47+
48+
```bash
49+
git add .
50+
git commit -m "feat(scope): add helpful description"
51+
```
52+
53+
### 6. Push & Pull Request
54+
55+
Push your changes to your fork and open a Pull Request (PR) on the main repository.
56+
57+
```bash
58+
git push origin feat/add-new-feature
59+
```
60+
61+
Go to the original repository on GitHub, and you'll see a "Compare & pull request" button.
62+
63+
---
64+
565
## Setup
66+
667
1. Install dependencies:
7-
```
68+
69+
```bash
870
pnpm install
971
```
10-
2. Create environment files:
11-
```
72+
73+
1. Create environment files:
74+
75+
```bash
1276
cp .env.example .env
1377
cp apps/mobile/.env.example apps/mobile/.env
1478
```
15-
3. Start local services:
16-
```
79+
80+
1. Start local services:
81+
82+
```bash
1783
docker-compose up -d
1884
```
19-
4. Run apps:
20-
```
85+
86+
1. Run apps:
87+
88+
```bash
2189
pnpm dev
2290
```
2391

24-
## Project Structure
92+
## Projects Structure
93+
2594
- `apps/backend`: NestJS API
2695
- `apps/web`: Next.js dashboard
2796
- `apps/mobile`: Expo app
2897
- `packages/shared-types`: shared types across apps
2998

3099
## Branching and Commits
100+
31101
- Create a feature branch from `main`.
32102
- Keep commits focused and readable.
33103
- Use conventional commit style when possible:
104+
34105
- `feat(scope): message`
35106
- `fix(scope): message`
36107
- `chore(scope): message`
37108

38109
## Code Style
110+
39111
- TypeScript everywhere
40112
- Keep UI changes consistent with existing design tokens
41113
- Avoid introducing new dependencies unless necessary
42114
- Prefer shared types in `packages/shared-types`
43115

44116
## Testing
117+
45118
Run what applies to your change:
46-
```
119+
120+
```bash
47121
pnpm lint
48122
pnpm test
49123
pnpm --filter web build
50124
```
51125

52126
## Pull Request Checklist
127+
53128
- Changes compile and relevant tests pass
54129
- Screenshots for UI changes (web/mobile)
55130
- No secrets or credentials committed
56131
- Updated README/docs if behavior changed
57132

58133
## Security Checklist
134+
59135
- Never commit `.env` or real credentials
60136
- Use placeholders or local-only values for compose/dev configs
61137
- Avoid logging tokens or sensitive payloads
62138
- Rotate keys immediately if a secret is exposed
63139
- Keep dependencies updated and audited
64140

65141
## Reporting Issues
142+
66143
When filing a bug, include:
144+
67145
- Reproduction steps
68146
- Expected vs actual behavior
69147
- Logs or screenshots

0 commit comments

Comments
 (0)