Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Bug Report
about: Reporting bugs in existing code
title: ''
title: ""
labels: bug, good first issue
assignees: ''

assignees: ""
---

## The Problem
Expand Down
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/documentation.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Documentation
about: Report issues or additions to Documentation
title: ''
title: ""
labels: documentation, good first issue
assignees: ''

assignees: ""
---

## Description of what to add
Expand Down
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/feature-change-request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feature-Change Request
about: Suggest a change in an existing feature
title: ''
title: ""
labels: change, good first issue
assignees: ''

assignees: ""
---

## What needs to change
Expand Down
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feature Request
about: Suggest a new feature for this project
title: ''
title: ""
labels: feature, good first issue
assignees: ''

assignees: ""
---

## Description of the feature
Expand Down
7 changes: 2 additions & 5 deletions .github/ISSUE_TEMPLATE/refactoring.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Refactoring Request
about: Suggest refactoring or code quality improvements
title: ''
title: ""
labels: refactoring, good first issue
assignees: ''

assignees: ""
---

## Area to Refactor
Expand All @@ -20,9 +19,7 @@ assignees: ''

- describe the refactoring approach in bullet points


> [!NOTE]
> **CONTRIBUTIONS ARE WELCOME!**
> If you want to get this issue assigned to you, just comment `assign this issue to me`.
> You will be assigned to the issue instantly via GitHub-actions bot.

1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm exec lint-staged
8 changes: 8 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.next
node_modules
dist
build
coverage
public
pnpm-lock.yaml
*.min.*
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"semi": true,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "all",
"printWidth": 100,
"bracketSpacing": true,
"plugins": ["prettier-plugin-tailwindcss"]
}
22 changes: 11 additions & 11 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
Expand Down Expand Up @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
Expand Down
15 changes: 10 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
> [!WARNING]
> **Important Note on AI-Generated Contributions**
>
> While we appreciate the use of AI as a productivity tool, pull requests consisting of code or documentation generated entirely by AI **without significant human review and testing** are not welcome.
>
>
> While we appreciate the use of AI as a productivity tool, pull requests consisting of code or documentation generated entirely by AI **without significant human review and testing** are not welcome.
>
> Every contributor is responsible for the code they submit. If we suspect a contribution is a "blind" AI generation that has not been verified for logic, security, or style, it will be closed without review.



---

# Contributing to DevImpact
Expand Down Expand Up @@ -48,16 +46,19 @@ Thank you for your interest in contributing to DevImpact! This guide will help y
### Installation

1. Install dependencies:

```bash
pnpm install
```

2. Create a `.env` file in the project root (see `.env.example`):

```
GITHUB_TOKEN=your_github_token_here
```

3. Start the development server:

```bash
pnpm dev
```
Expand Down Expand Up @@ -90,25 +91,29 @@ DevImpact/
## Making Changes

1. **Sync your fork** with the latest upstream changes:

```bash
git fetch upstream
git checkout main
git merge upstream/main
```

2. **Create a feature branch** from `main`:

```bash
git checkout -b feat/your-feature-name
```

3. **Make your changes** and test them locally.

4. **Run the linter** before committing:

```bash
pnpm lint
```

5. **Commit your changes** with a clear message:

```bash
git commit -m "feat: add your feature description"
```
Expand Down
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

# 🚀 DevImpact


<p align="center">
<a href="https://github.com/O2sa/DevImpact/blob/main/LICENSE">
<img src="https://www.shieldcn.dev/github/license/O2sa/DevImpact.svg?variant=branded&size=sm" alt="License">
Expand Down Expand Up @@ -36,9 +35,6 @@
<img src="https://www.shieldcn.dev/badge/CSS-Tailwind-06B6D4.svg?logo=tailwindcss&variant=branded&size=sm&theme=blue" alt="CSS · Tailwind">
</p>




**DevImpact** is an open-source platform that compares software developers based on their real impact in the open-source ecosystem — not just raw numbers.

It evaluates developers using a smart scoring system that considers:
Expand Down Expand Up @@ -141,7 +137,6 @@ Final Score =

---


## 🛠️ Tech Stack

### Frontend
Expand Down Expand Up @@ -172,28 +167,33 @@ cp .env.example .env
# 2. Start full platform
docker compose -f ops/docker/docker-compose.yml up -d --build
```

Then open `http://localhost:3000` in your browser!

---

### 📦 Option B: Run Locally with Node.js & pnpm

1. **Install dependencies**:

```bash
pnpm install
```

2. **Configure environment**:

```bash
cp .env.example .env
```

3. **Start local database & Redis**:

```bash
pnpm db:up && pnpm redis:up
```

4. **Run development server**:

```bash
pnpm run dev
```
Expand All @@ -218,7 +218,6 @@ docker compose -f ops/docker/leaderboard-compose.yml up -d

---


## 🌍 Localization

- Supported languages: English 🇺🇸, Arabic 🇸🇦
Expand Down
26 changes: 16 additions & 10 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,38 @@

We actively provide security updates for the following versions of DevImpact:

| Version | Supported |
| ------- | ------------------ |
| Main | ✅ Yes |
| < 1.0.0 | ❌ No |
| Version | Supported |
| ------- | --------- |
| Main | ✅ Yes |
| < 1.0.0 | ❌ No |

## Reporting a Vulnerability

We take the security of DevImpact seriously. If you discover a security vulnerability, please do not open a public issue. Instead, follow the steps below:

### How to report

1. **Email:** Please send a detailed report to osama.f.mabkhot@gmail.com or use GitHub's Private Vulnerability Reporting.
2. **Details:** Include a description of the vulnerability, steps to reproduce, and the potential impact.
3. **Response:** You can expect an acknowledgment within 48 hours.

### Scope

This policy covers the core DevImpact application, its scoring logic, and how it handles the `GITHUB_TOKEN`. It does not cover the GitHub API itself or third-party dependencies (though we appreciate reports regarding how we use them).

## Best Practices for Contributors

To keep this project secure, please keep the following in mind:
* **Environment Variables:** Never commit your `.env` file. It contains your `GITHUB_TOKEN`.
* **Data Sanitization:** Ensure all data fetched from the GitHub GraphQL API is sanitized before being rendered in the UI to prevent XSS.
* **Dependency Updates:** We use automated tools to keep our dependencies up to date. Please ensure your PRs do not introduce insecure or outdated packages.

- **Environment Variables:** Never commit your `.env` file. It contains your `GITHUB_TOKEN`.
- **Data Sanitization:** Ensure all data fetched from the GitHub GraphQL API is sanitized before being rendered in the UI to prevent XSS.
- **Dependency Updates:** We use automated tools to keep our dependencies up to date. Please ensure your PRs do not introduce insecure or outdated packages.

## Security Controls
* **Code Scanning:** We use GitHub Actions to run automated security scans on every Pull Request.
* **Secret Scanning:** GitHub's secret scanning is enabled to prevent the accidental leak of tokens.

- **Code Scanning:** We use GitHub Actions to run automated security scans on every Pull Request.
- **Secret Scanning:** GitHub's secret scanning is enabled to prevent the accidental leak of tokens.

---
*Thank you for helping keep DevImpact safe for the open-source community!*

_Thank you for helping keep DevImpact safe for the open-source community!_
12 changes: 6 additions & 6 deletions algorithm.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
# DevImpact




### 🧠 Main

```
compareUsers(user1, user2):

Expand All @@ -17,6 +15,7 @@
```

### 🧠 User Score

```
calculateUserScore(user):

Expand All @@ -37,6 +36,7 @@
```

### 📦 Repository Score

```
calculateRepoScore(repos):

Expand Down Expand Up @@ -65,8 +65,8 @@
RETURN total
```


### 🔥 Pull Request Score

```
calculatePRScore(prs, username):

Expand Down Expand Up @@ -119,8 +119,8 @@
RETURN totalScore
```


### 🌍 Contribution Score (Activity)

```
calculateContributionScore(contributions):

Expand All @@ -134,4 +134,4 @@
issues * 0.3

RETURN score
```
```
Loading
Loading