diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index eb106ba..3901cb1 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -1,10 +1,9 @@ --- name: Bug Report about: Reporting bugs in existing code -title: '' +title: "" labels: bug, good first issue -assignees: '' - +assignees: "" --- ## The Problem diff --git a/.github/ISSUE_TEMPLATE/documentation.md b/.github/ISSUE_TEMPLATE/documentation.md index 2a85514..7e53c61 100644 --- a/.github/ISSUE_TEMPLATE/documentation.md +++ b/.github/ISSUE_TEMPLATE/documentation.md @@ -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 diff --git a/.github/ISSUE_TEMPLATE/feature-change-request.md b/.github/ISSUE_TEMPLATE/feature-change-request.md index 7cc49cc..dd91022 100644 --- a/.github/ISSUE_TEMPLATE/feature-change-request.md +++ b/.github/ISSUE_TEMPLATE/feature-change-request.md @@ -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 diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md index 8864bec..4bc541e 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -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 diff --git a/.github/ISSUE_TEMPLATE/refactoring.md b/.github/ISSUE_TEMPLATE/refactoring.md index 7fca9e2..6fec0d5 100644 --- a/.github/ISSUE_TEMPLATE/refactoring.md +++ b/.github/ISSUE_TEMPLATE/refactoring.md @@ -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 @@ -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. - diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..60a2768 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,7 @@ +.next +node_modules +out +dist +build +pnpm-lock.yaml +package-lock.json diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..de706b3 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,12 @@ +{ + "semi": true, + "trailingComma": "es5", + "singleQuote": false, + "printWidth": 80, + "tabWidth": 2, + "useTabs": false, + "bracketSpacing": true, + "arrowParens": "always", + "endOfLine": "lf", + "jsxSingleQuote": false +} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7c454ed..6a4a3ff 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -37,16 +37,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 ``` @@ -79,6 +82,7 @@ DevImpact/ ## Making Changes 1. **Sync your fork** with the latest upstream changes: + ```bash git fetch upstream git checkout main @@ -86,6 +90,7 @@ DevImpact/ ``` 2. **Create a feature branch** from `main`: + ```bash git checkout -b feat/your-feature-name ``` @@ -93,11 +98,13 @@ DevImpact/ 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" ``` diff --git a/README.md b/README.md index 862aaff..9663d12 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # π DevImpact +    @@ -11,14 +12,13 @@   - **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: -* Repository quality π¦ -* Pull request impact π -* Community contributions π¬ +- Repository quality π¦ +- Pull request impact π +- Community contributions π¬ --- @@ -28,9 +28,9 @@ Traditional metrics (followers, stars, commit counts) are often misleading. DevImpact focuses on: -* β Quality over quantity -* β Real contributions to valuable projects -* β Fair comparison between developers +- β Quality over quantity +- β Real contributions to valuable projects +- β Fair comparison between developers --- @@ -44,9 +44,9 @@ Measures the quality and impact of repositories owned by the user. Factors include: -* Stars β -* Forks π΄ -* Watchers +- Stars β +- Forks π΄ +- Watchers --- @@ -59,10 +59,10 @@ Measures contributions to **other developers' repositories**. Factors include: -* Target repository quality -* PR size (additions/deletions) -* Repository popularity -* Contribution diversity +- Target repository quality +- PR size (additions/deletions) +- Repository popularity +- Contribution diversity --- @@ -72,8 +72,8 @@ Measures community engagement. Includes: -* Issues opened in external repositories -* Discussions participation +- Issues opened in external repositories +- Discussions participation β οΈ Does NOT include commits or PRs (to avoid duplication) @@ -96,21 +96,21 @@ Final Score = ## βοΈ Key Design Principles -* β No self-inflation (own PRs excluded) -* π Diminishing returns to prevent spam -* π― External impact is prioritized -* βοΈ Balanced scoring between builders and contributors +- β No self-inflation (own PRs excluded) +- π Diminishing returns to prevent spam +- π― External impact is prioritized +- βοΈ Balanced scoring between builders and contributors --- ## π₯οΈ Features -* π Compare two GitHub users side-by-side -* π Visual score breakdown (charts & insights) -* π§ Smart ranking system -* π Localization support (EN / AR) -* β‘ Fast API powered by GitHub GraphQL -* π§© Extensible scoring system +- π Compare two GitHub users side-by-side +- π Visual score breakdown (charts & insights) +- π§ Smart ranking system +- π Localization support (EN / AR) +- β‘ Fast API powered by GitHub GraphQL +- π§© Extensible scoring system --- @@ -118,22 +118,19 @@ Final Score = ### Frontend -* Next.js (App Router) -* TypeScript -* Tailwind CSS -* Recharts +- Next.js (App Router) +- TypeScript +- Tailwind CSS +- Recharts ### API -* Node.js + Express -* GitHub GraphQL API -* Octokit +- Node.js + Express +- GitHub GraphQL API +- Octokit --- - - - ## π Getting Started ### 1. Clone the repo @@ -173,14 +170,13 @@ pnpm run dev ## π Localization -* Supported languages: English πΊπΈ, Arabic πΈπ¦ -* Automatically detects user language -* Allows manual switching -* Easy to add new languages via `/locales` +- Supported languages: English πΊπΈ, Arabic πΈπ¦ +- Automatically detects user language +- Allows manual switching +- Easy to add new languages via `/locales` --- - ## π€ Contributing Contributions are welcome! @@ -196,22 +192,21 @@ Contributions are welcome! ### Contribution ideas: -* Improve scoring algorithm -* Add new metrics -* Enhance UI/UX -* Add new languages π +- Improve scoring algorithm +- Add new metrics +- Enhance UI/UX +- Add new languages π --- ## β οΈ Limitations -* GitHub API rate limits -* Some private contributions are not accessible -* Scoring system is heuristic (not perfect) +- GitHub API rate limits +- Some private contributions are not accessible +- Scoring system is heuristic (not perfect) --- - ## π‘ Inspiration DevImpact was created to answer a simple question: @@ -224,7 +219,6 @@ DevImpact was created to answer a simple question: If you like this project: -* β Star the repo -* π Report issues -* π‘ Suggest features - +- β Star the repo +- π Report issues +- π‘ Suggest features diff --git a/app/globals.css b/app/globals.css index cf67854..72a5415 100644 --- a/app/globals.css +++ b/app/globals.css @@ -12,10 +12,23 @@ body { @apply bg-slate-50 text-slate-900 antialiased; - font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; + font-family: + "Inter", + system-ui, + -apple-system, + "Segoe UI", + sans-serif; background-image: - radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.08), transparent 35%), - radial-gradient(circle at 80% 0%, rgba(168, 85, 247, 0.08), transparent 30%), + radial-gradient( + circle at 20% 20%, + rgba(59, 130, 246, 0.08), + transparent 35% + ), + radial-gradient( + circle at 80% 0%, + rgba(168, 85, 247, 0.08), + transparent 30% + ), linear-gradient(180deg, #f8fbff 0%, #f2f5f9 40%, #f9fafb 100%); min-height: 100vh; } @@ -23,20 +36,28 @@ body { .dark body { @apply bg-slate-950 text-slate-100; background-image: - radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.08), transparent 35%), - radial-gradient(circle at 80% 0%, rgba(124, 58, 237, 0.12), transparent 30%), + radial-gradient( + circle at 20% 20%, + rgba(59, 130, 246, 0.08), + transparent 35% + ), + radial-gradient( + circle at 80% 0%, + rgba(124, 58, 237, 0.12), + transparent 30% + ), linear-gradient(180deg, #0f172a 0%, #0b1221 40%, #0a0f1c 100%); } .card { @apply bg-white/90 shadow-card rounded-2xl border border-slate-100 backdrop-blur; - transition: transform 180ms ease, box-shadow 180ms ease; - box-shadow: 0 18px 48px rgba(15, 23, 42, 0.12); - + transition: + transform 180ms ease, + box-shadow 180ms ease; + box-shadow: 0 18px 48px rgba(15, 23, 42, 0.12); } - .dark .card { @apply bg-slate-900/80 border-slate-800; box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45); -} \ No newline at end of file +} diff --git a/app/page.tsx b/app/page.tsx index da46309..fb006ea 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -74,7 +74,6 @@ export default function HomePage() { DevImpact -
Enter two usernames to compare
++ Enter two usernames to compare +
Compare GitHub developer metrics side by side
@@ -120,7 +121,8 @@ export default function HomePage() {- Metric -
+Metric
@@ -133,7 +126,7 @@ export function TopList({ userResults }: Props) {
label: pr.stars,
tooltip: `${pr.stars} stars on the PR's repository`,
},
-
+
{
icon:
diff --git a/components/ui/alert.tsx b/components/ui/alert.tsx
index f99164e..63c1ebd 100644
--- a/components/ui/alert.tsx
+++ b/components/ui/alert.tsx
@@ -1,7 +1,7 @@
-import * as React from "react"
-import { cva, type VariantProps } from "class-variance-authority"
+import * as React from "react";
+import { cva, type VariantProps } from "class-variance-authority";
-import { cn } from "@/lib/utils"
+import { cn } from "@/lib/utils";
const alertVariants = cva(
"relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
@@ -17,7 +17,7 @@ const alertVariants = cva(
variant: "default",
},
}
-)
+);
function Alert({
className,
@@ -31,7 +31,7 @@ function Alert({
className={cn(alertVariants({ variant }), className)}
{...props}
/>
- )
+ );
}
function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
@@ -44,7 +44,7 @@ function AlertTitle({ className, ...props }: React.ComponentProps<"div">) {
)}
{...props}
/>
- )
+ );
}
function AlertDescription({
@@ -60,7 +60,7 @@ function AlertDescription({
)}
{...props}
/>
- )
+ );
}
-export { Alert, AlertTitle, AlertDescription }
+export { Alert, AlertTitle, AlertDescription };
diff --git a/components/ui/card.tsx b/components/ui/card.tsx
index a733720..403f2a7 100644
--- a/components/ui/card.tsx
+++ b/components/ui/card.tsx
@@ -1,6 +1,6 @@
-import * as React from "react"
+import * as React from "react";
-import { cn } from "@/lib/utils"
+import { cn } from "@/lib/utils";
function Card({
className,
@@ -17,7 +17,7 @@ function Card({
)}
{...props}
/>
- )
+ );
}
function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
@@ -30,7 +30,7 @@ function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
)}
{...props}
/>
- )
+ );
}
function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
@@ -43,7 +43,7 @@ function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
)}
{...props}
/>
- )
+ );
}
function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
@@ -53,7 +53,7 @@ function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
className={cn("text-sm text-muted-foreground", className)}
{...props}
/>
- )
+ );
}
function CardAction({ className, ...props }: React.ComponentProps<"div">) {
@@ -66,7 +66,7 @@ function CardAction({ className, ...props }: React.ComponentProps<"div">) {
)}
{...props}
/>
- )
+ );
}
function CardContent({ className, ...props }: React.ComponentProps<"div">) {
@@ -76,7 +76,7 @@ function CardContent({ className, ...props }: React.ComponentProps<"div">) {
className={cn("px-4 group-data-[size=sm]/card:px-3", className)}
{...props}
/>
- )
+ );
}
function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
@@ -89,7 +89,7 @@ function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
)}
{...props}
/>
- )
+ );
}
export {
@@ -100,4 +100,4 @@ export {
CardAction,
CardDescription,
CardContent,
-}
+};
diff --git a/components/ui/progress.tsx b/components/ui/progress.tsx
index 584011b..f4bec04 100644
--- a/components/ui/progress.tsx
+++ b/components/ui/progress.tsx
@@ -1,9 +1,9 @@
-"use client"
+"use client";
-import * as React from "react"
-import { Progress as ProgressPrimitive } from "radix-ui"
+import * as React from "react";
+import { Progress as ProgressPrimitive } from "radix-ui";
-import { cn } from "@/lib/utils"
+import { cn } from "@/lib/utils";
function Progress({
className,
@@ -25,7 +25,7 @@ function Progress({
style={{ transform: `translateX(-${100 - (value || 0)}%)` }}
/>
- )
+ );
}
-export { Progress }
+export { Progress };
diff --git a/components/ui/tooltip.tsx b/components/ui/tooltip.tsx
index bb1ea52..733073f 100644
--- a/components/ui/tooltip.tsx
+++ b/components/ui/tooltip.tsx
@@ -1,9 +1,9 @@
-"use client"
+"use client";
-import * as React from "react"
-import { Tooltip as TooltipPrimitive } from "radix-ui"
+import * as React from "react";
+import { Tooltip as TooltipPrimitive } from "radix-ui";
-import { cn } from "@/lib/utils"
+import { cn } from "@/lib/utils";
function TooltipProvider({
delayDuration = 0,
@@ -15,19 +15,19 @@ function TooltipProvider({
delayDuration={delayDuration}
{...props}
/>
- )
+ );
}
function Tooltip({
...props
}: React.ComponentProps