Skip to content

Commit 7ee00d2

Browse files
committed
Replace branch protection doc with contributing guide
1 parent dd17a51 commit 7ee00d2

2 files changed

Lines changed: 162 additions & 35 deletions

File tree

.github/BRANCH_PROTECTION.md

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/CONTRIBUTING.md

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
# Contributing to EduVox AI
2+
3+
Thank you for your interest in contributing to **EduVox AI**! This document outlines the development workflow, branch protection policies, and contribution guidelines.
4+
5+
## 🚀 Quick Start
6+
7+
1. **Fork** the repository
8+
2. **Clone** your fork locally
9+
3. **Create** a feature branch from `main`
10+
4. **Make** your changes
11+
5. **Test** thoroughly
12+
6. **Submit** a pull request
13+
14+
## 🛡️ Branch Protection & Workflow
15+
16+
### **Main Branch Protection**
17+
18+
The `main` branch is protected with strict rules to ensure code quality and stability:
19+
20+
#### **Required Status Checks**
21+
- **Code Quality & Build Check** - ESLint, TypeScript, and build verification
22+
- **Security & Dependency Check** - Vulnerability scanning and dependency audit
23+
- **All CI/CD pipeline jobs must pass** before merging
24+
25+
#### **Pull Request Requirements** 🔍
26+
- **Require pull request reviews** before merging
27+
- **Require branches to be up to date** before merging
28+
- **Restrict direct pushes** to admins only
29+
- **Automatic deletion** of head branches after merge
30+
31+
#### **Quality Standards** 📊
32+
- Code must pass **ESLint** with zero errors
33+
- **TypeScript** compilation must succeed
34+
- **Build process** must complete successfully
35+
- **Security audit** must pass with no high/critical vulnerabilities
36+
37+
## 🔄 Development Workflow
38+
39+
### **1. Setting Up Your Environment**
40+
41+
```bash
42+
# Clone your fork
43+
git clone https://github.com/YOUR_USERNAME/eduvox-ai.git
44+
cd eduvox-ai
45+
46+
# Install dependencies
47+
npm install
48+
49+
# Set up environment variables
50+
cp .env.example .env.local
51+
# Add your API keys and configuration
52+
```
53+
54+
### **2. Creating a Feature Branch**
55+
56+
```bash
57+
# Create and switch to a new branch
58+
git checkout -b feature/your-feature-name
59+
60+
# Or for bug fixes
61+
git checkout -b fix/bug-description
62+
```
63+
64+
### **3. Development Guidelines**
65+
66+
#### **Code Quality**
67+
- Follow **TypeScript** best practices
68+
- Use **ESLint** and fix all warnings
69+
- Write **clean, readable code** with proper comments
70+
- Follow existing **code style** and patterns
71+
72+
#### **Commit Messages** 📝
73+
Use conventional commit format:
74+
```
75+
feat: add new voice synthesis feature
76+
fix: resolve authentication timeout issue
77+
docs: update API documentation
78+
style: fix code formatting
79+
refactor: optimize database queries
80+
test: add unit tests for companion creation
81+
```
82+
83+
#### **Testing** 🧪
84+
- Test your changes thoroughly
85+
- Ensure **build process** works: `npm run build`
86+
- Run **linting**: `npm run lint`
87+
- Check **TypeScript**: `npx tsc --noEmit`
88+
89+
### **4. Submitting Changes**
90+
91+
#### **Before Submitting** 📋
92+
- [ ] Code passes all **ESLint** checks
93+
- [ ] **TypeScript** compiles without errors
94+
- [ ] **Build** completes successfully
95+
- [ ] Changes are **tested** and working
96+
- [ ] **Commit messages** follow conventions
97+
98+
#### **Pull Request Process** 🔄
99+
100+
1. **Push** your branch to your fork
101+
2. **Create** a pull request to `main` branch
102+
3. **Fill out** the PR template completely
103+
4. **Wait** for automated checks to pass
104+
5. **Address** any review feedback
105+
6. **Merge** once approved and checks pass
106+
107+
## 🔒 Branch Protection Setup
108+
109+
### **For Repository Administrators**
110+
111+
To configure branch protection rules:
112+
113+
1. Go to **Repository Settings****Branches**
114+
2. **Add rule** for `main` branch
115+
3. **Enable** "Require status checks to pass before merging"
116+
4. **Select** the required checks:
117+
- `Code Quality & Build Check`
118+
- `Security & Dependency Check`
119+
5. **Enable** "Require pull request reviews before merging"
120+
6. **Enable** "Require branches to be up to date before merging"
121+
7. **Save** changes
122+
123+
This ensures all code goes through proper **CI/CD validation** before reaching production.
124+
125+
## 🏗️ Development Environment
126+
127+
### **Required Tools** 🛠️
128+
- **Node.js** 18+
129+
- **npm** or **yarn**
130+
- **Git**
131+
- **VS Code** (recommended)
132+
133+
### **Environment Variables** 🔐
134+
Required environment variables (add to `.env.local`):
135+
- `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY`
136+
- `CLERK_SECRET_KEY`
137+
- `NEXT_PUBLIC_SUPABASE_URL`
138+
- `NEXT_PUBLIC_SUPABASE_ANON_KEY`
139+
- `SUPABASE_SERVICE_ROLE_KEY`
140+
- `NEXT_PUBLIC_VAPI_WEB_TOKEN`
141+
- `SENTRY_AUTH_TOKEN`
142+
143+
## 🚨 Security Guidelines
144+
145+
- **Never commit** sensitive information (API keys, passwords)
146+
- **Use environment variables** for all secrets
147+
- **Follow** security best practices
148+
- **Report** security issues privately
149+
150+
## 📞 Getting Help
151+
152+
- **Issues** - Create a GitHub issue for bugs or feature requests
153+
- **Discussions** - Use GitHub Discussions for questions
154+
- **Documentation** - Check the README.md for setup instructions
155+
156+
## 📜 Code of Conduct
157+
158+
This project follows the **Contributor Covenant Code of Conduct**. Please be respectful and inclusive in all interactions.
159+
160+
---
161+
162+
Thank you for contributing to **EduVox AI**! Your contributions help make AI-powered education accessible to everyone. 🎓✨

0 commit comments

Comments
 (0)