From b36c377bfc9d8b6a5bc25601ea15e8b2e9f838fc Mon Sep 17 00:00:00 2001
From: Vehbi Emiroglu
Date: Wed, 4 Mar 2026 14:57:45 +0300
Subject: [PATCH] Add tagging system for starred repositories
- Add RepoTag type to types
- Add tags table to IndexedDB schema
- Create TagManager component for managing tags
- Add tag display on repo cards with color coding
- Add tag filtering in dashboard
- Add tag management in repo detail modal
- Add i18n translations (EN/TR)
Features:
- Create custom tags with different colors
- Assign multiple tags to repositories
- Filter repos by tags
- Tags stored locally in browser
---
src/components/repo/RepoCard.tsx | 15 +++
src/components/repo/RepoDetail.tsx | 8 ++
src/components/repo/RepoGrid.tsx | 5 +-
src/components/repo/RepoList.tsx | 5 +-
src/components/repo/TagManager.tsx | 152 +++++++++++++++++++++++++++++
src/i18n/locales/en.json | 10 ++
src/i18n/locales/tr.json | 10 ++
src/pages/Dashboard.tsx | 46 ++++++++-
src/services/db.ts | 54 +++++++++-
src/types/index.ts | 7 ++
src/utils/tagColors.ts | 31 ++++++
11 files changed, 333 insertions(+), 10 deletions(-)
create mode 100644 src/components/repo/TagManager.tsx
create mode 100644 src/utils/tagColors.ts
diff --git a/src/components/repo/RepoCard.tsx b/src/components/repo/RepoCard.tsx
index 27f890f..85bd38f 100644
--- a/src/components/repo/RepoCard.tsx
+++ b/src/components/repo/RepoCard.tsx
@@ -1,6 +1,7 @@
import type { Repo } from '../../types';
import { formatDistanceToNow } from 'date-fns';
import clsx from 'clsx';
+import { getTailwindColorClasses } from '../../utils/tagColors';
interface RepoCardProps {
repo: Repo & {
@@ -9,6 +10,7 @@ interface RepoCardProps {
percentage: number;
direction: 'up' | 'down' | 'stable';
};
+ tags?: Array<{ id: string; name: string; color: string }>;
};
viewMode?: 'grid' | 'list';
onClick: () => void;
@@ -109,6 +111,19 @@ export function RepoCard({ repo, viewMode = 'grid', onClick }: RepoCardProps) {
{repo.description || 'No description provided'}
+ {repo.tags && repo.tags.length > 0 && (
+
+ {repo.tags.map((tag) => (
+
+ {tag.name}
+
+ ))}
+
+ )}
+
{repo.language && (
diff --git a/src/components/repo/RepoDetail.tsx b/src/components/repo/RepoDetail.tsx
index 07c5125..3ccd507 100644
--- a/src/components/repo/RepoDetail.tsx
+++ b/src/components/repo/RepoDetail.tsx
@@ -4,6 +4,7 @@ import ReactMarkdown from 'react-markdown';
import type { Repo } from '../../types';
import { SimilarRepos } from './SimilarRepos';
import { StarHistoryChart } from './StarHistoryChart';
+import { TagManager } from './TagManager';
import { formatDistanceToNow } from 'date-fns';
import { githubApi } from '../../services/github';
import { Loader } from '../common/Loader';
@@ -118,6 +119,13 @@ export function RepoDetail({ repo, isOpen, onClose }: RepoDetailProps) {
)}
+
+
+ Tags
+
+
+
+