Skip to content

Commit 04bb2e6

Browse files
docs: reorganize contributor setup flow and fix git branch references
- Reorganize README.md contributor setup to prioritize .env configuration - Change all git branch references from 'main' to 'master' - Update CONTRIBUTING.md with improved setup flow - Fix markdown formatting issues (headers and bare URLs) - Ensure .env.example is copied before any setup commands
1 parent e03f31a commit 04bb2e6

File tree

2 files changed

+56
-42
lines changed

2 files changed

+56
-42
lines changed

CONTRIBUTING.md

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,26 +27,40 @@ We use GitHub to host code, to track issues and feature requests, as well as acc
2727
```bash
2828
git clone https://github.com/YOUR_USERNAME/SafeExec.git
2929
cd SafeExec
30+
31+
# Add upstream remote for syncing
32+
git remote add upstream https://github.com/vikashkrdeveloper/SafeExec.git
3033
```
3134

32-
2. **Install dependencies**
35+
2. **Environment Setup (REQUIRED FIRST STEP)**
3336

3437
```bash
35-
yarn install
38+
# Copy environment template - MUST DO THIS FIRST
39+
cp .env.example .env
40+
41+
# Edit the .env file with your local configuration
42+
nano .env # or use your preferred editor
3643
```
3744

38-
3. **Set up environment**
45+
3. **Quick Development Setup**
3946

4047
```bash
41-
# Quick setup for development
42-
./scripts/setup.sh --env development --seed
48+
# Complete development setup in one command
49+
yarn setup:dev
4350

44-
# Or manually:
45-
cp config/environments/development.env .env
46-
# Edit .env if needed
51+
# This will install dependencies, build executors,
52+
# start Docker environment, and seed database
4753
```
4854

49-
4. **Start development environment**
55+
4. **Manual Setup (Alternative)**
56+
57+
```bash
58+
# Install dependencies and build executors
59+
yarn setup
60+
61+
# Start development environment
62+
yarn docker:setup:dev
63+
```
5064

5165
```bash
5266
# Using the unified approach
@@ -60,7 +74,7 @@ We use GitHub to host code, to track issues and feature requests, as well as acc
6074
```
6175

6276
5. **Access API Documentation**
63-
- Visit http://localhost:5000/api-docs for interactive API docs
77+
- Visit <http://localhost:5000/api-docs> for interactive API docs
6478

6579
## Environment Management
6680

@@ -91,7 +105,7 @@ ENV=production yarn docker:prod:logs # View logs
91105

92106
## Pull Requests
93107

94-
1. Fork the repository and create your branch from `main`.
108+
1. Fork the repository and create your branch from `master`.
95109
2. If you've added code that should be tested, add tests.
96110
3. If you've changed APIs, update the Swagger documentation.
97111
4. Ensure the test suite passes.
@@ -128,7 +142,7 @@ yarn format # Format code with Prettier
128142
yarn typecheck # TypeScript type checking
129143
```
130144

131-
## Testing
145+
## Testing Guidelines
132146

133147
### Running Tests
134148

README.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -46,32 +46,10 @@ cd SafeExec
4646
git remote add upstream https://github.com/vikashkrdeveloper/SafeExec.git
4747
```
4848

49-
### 2. Quick Setup (Recommended for Contributors)
49+
### 2. Environment Setup (REQUIRED FIRST STEP)
5050

5151
```bash
52-
# Complete development setup in one command
53-
yarn setup:dev
54-
55-
# This command will:
56-
# - Install all dependencies
57-
# - Build Docker executor containers
58-
# - Start development environment with Docker
59-
# - Seed database with sample data
60-
```
61-
62-
### 3. Manual Setup (Step by Step)
63-
64-
**3.1. Install Dependencies & Build Executors**
65-
66-
```bash
67-
yarn setup
68-
# Equivalent to: yarn install && yarn build:executors
69-
```
70-
71-
**3.2. Environment Configuration**
72-
73-
```bash
74-
# Copy environment template
52+
# Copy environment template - MUST DO THIS FIRST
7553
cp .env.example .env
7654

7755
# Edit the .env file with your local configuration
@@ -90,7 +68,29 @@ JWT_SECRET=your-super-secret-jwt-key-for-development
9068
JWT_EXPIRES_IN=24h
9169
```
9270

93-
**3.3. Start Development Environment**
71+
### 3. Quick Setup (Recommended for Contributors)
72+
73+
```bash
74+
# Complete development setup in one command
75+
yarn setup:dev
76+
77+
# This command will:
78+
# - Install all dependencies
79+
# - Build Docker executor containers
80+
# - Start development environment with Docker
81+
# - Seed database with sample data
82+
```
83+
84+
### 4. Manual Setup (Step by Step)
85+
86+
#### 4.1. Install Dependencies & Build Executors
87+
88+
```bash
89+
yarn setup
90+
# Equivalent to: yarn install && yarn build:executors
91+
```
92+
93+
#### 4.2. Start Development Environment
9494

9595
```bash
9696
# Start all services: API, MongoDB, Redis, Nginx
@@ -104,7 +104,7 @@ yarn docker:seed:dev # Seed database with sample data
104104
yarn dev # API only (requires local MongoDB/Redis)
105105
```
106106

107-
**3.4. Verify Setup**
107+
#### 4.3. Verify Setup
108108

109109
```bash
110110
# Check all services are running
@@ -131,9 +131,9 @@ yarn shell
131131

132132
```bash
133133
# 1. Sync with upstream
134-
git checkout main
135-
git pull upstream main
136-
git push origin main
134+
git checkout master
135+
git pull upstream master
136+
git push origin master
137137

138138
# 2. Create feature branch
139139
git checkout -b feature/your-feature-name
@@ -233,7 +233,7 @@ See the [Contributing Guide](CONTRIBUTING.md) for more details.
233233
234234
---
235235

236-
**Thank you for contributing to SafeExec! 🚀**
236+
## Thank you for contributing to SafeExec! 🚀
237237

238238
Your contributions help create a better, more secure code execution platform for developers worldwide.
239239

0 commit comments

Comments
 (0)