Skip to content

feat: establish UI foundation with Tailwind CSS, shadcn/ui and Recharts#11

Open
Sarthakkad05 wants to merge 3 commits intoAOSSIE-Org:mainfrom
Sarthakkad05:feat/ui-foundation-clean
Open

feat: establish UI foundation with Tailwind CSS, shadcn/ui and Recharts#11
Sarthakkad05 wants to merge 3 commits intoAOSSIE-Org:mainfrom
Sarthakkad05:feat/ui-foundation-clean

Conversation

@Sarthakkad05
Copy link

@Sarthakkad05 Sarthakkad05 commented Feb 12, 2026

UI Foundation Setup for Org Explorer

This PR establishes the foundational UI stack for Org Explorer, enabling consistent, scalable, and maintainable frontend development moving forward.

Preview

Screenshot 2026-02-12 at 2 49 41 PM

What This PR Introduces

1. Tailwind CSS Setup

  • Utility-first styling for rapid and consistent UI development
  • Centralized theme tokens in index.css
  • Basic design tokens aligned with AOSSIE branding (green + yellow)

2. shadcn/ui Integration

  • Added core reusable components:
    • Button
    • Card
    • Badge
  • We can add this components with just one command now

3. Recharts Integration

  • Installed and configured for data visualization
  • Added a small TestChart component to validate chart rendering
  • Confirms compatibility with Tailwind and layout system

Why This Matters

Org Explorer is a UI-driven platform (dashboards, charts, repo cards, governance views).
This PR creates a scalable design system foundation before introducing business logic.

Checklist

  • [x ] My code follows the project's code style and conventions
  • I have made corresponding changes to the documentation
  • [ x] My changes generate no new warnings or errors
  • [x ] I have joined the Discord server and I will share a link to this PR with the project maintainers there
  • [ x] I have read the Contributing Guidelines

⚠️ AI Notice - Important!

We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact.

Summary by CodeRabbit

  • New Features

    • Added a reusable UI kit (buttons, badges, cards) and a chart component; App shows a styled dashboard with title, CTA, and activity overview.
  • Style

    • Moved to Tailwind-driven theming with CSS tokens and dark mode support; global styles updated for full-viewport layout and refined visual hierarchy.
  • Chores

    • Project configured for Tailwind/PostCSS tooling and path-based imports; icon and chart support added.

@coderabbitai
Copy link

coderabbitai bot commented Feb 12, 2026

📝 Walkthrough

Walkthrough

Adds Tailwind/PostCSS configuration and ShadCN UI settings, introduces path aliases and Vite resolve alias, updates dependencies, and adds reusable UI components (Button, Badge, Card), a chart component, a class-name utility, and global Tailwind-based styles.

Changes

Cohort / File(s) Summary
Config & Styling
components.json, postcss.config.js, tailwind.config.js, src/index.css
Adds ShadCN UI config, PostCSS pipeline (tailwindcss + autoprefixer), Tailwind config (dark mode, CSS variables, extended theme, animation plugin) and rewrites global CSS to use Tailwind layers and design tokens.
Package & Tooling
package.json
Adds runtime deps (@radix-ui/react-slot, class-variance-authority, clsx, lucide-react, recharts, tailwind-merge, tailwindcss-animate) and devDeps (autoprefixer, postcss, tailwindcss); bumps @types/node.
TypeScript & Vite Aliases
tsconfig.json, tsconfig.app.json, vite.config.ts
Introduces baseUrl and @/*src/* TypeScript path alias and mirrors alias in Vite resolve.alias.
UI Components
src/components/ui/button.tsx, src/components/ui/badge.tsx, src/components/ui/card.tsx
Adds Button (variants, sizes, asChild with Radix Slot), Badge (CVA variants), and Card family (Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter) using CVA and the cn utility.
App & Styles
src/App.tsx, src/App.css
Replaces minimal app UI with a centered layout using Button and TestChart; adjusts root/container CSS to full-viewport layout.
Chart & Utilities
src/components/charts/TestChart.tsx, src/lib/utils.ts
Adds a TestChart using recharts and a cn helper that combines clsx + twMerge for Tailwind class merging.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • Zahnentferner

Poem

🐰 I stitched new styles and tiny charts,
buttons that hop and badge-filled hearts.
Aliases tunneled through the code,
Tailwind breezes down the road —
a carrot-sweet UI in parts. 🥕✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely summarizes the main changes: establishing a UI foundation by integrating Tailwind CSS, shadcn/ui, and Recharts for data visualization.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

No actionable comments were generated in the recent review. 🎉


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added size/XL and removed size/XL labels Feb 12, 2026
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Fix all issues with AI agents
In `@src/App.tsx`:
- Line 20: In App.tsx update the hardcoded utility classes inside the JSX (the
inner container div and the element using text-green-500) to use semantic tokens
so theming works: replace the bg-zinc-900 on the inner <div className="w-full
bg-zinc-900 rounded-2xl p-6 shadow-lg"> with a semantic background token such as
bg-card or bg-muted, and replace the text-green-500 usage with text-primary;
ensure these changes are made inside the App component’s JSX so the container
and its text follow the CSS-variable theme tokens.

In `@tailwind.config.js`:
- Around line 15-55: Tailwind config uses many CSS variables that are not
defined in your global CSS; add missing :root variable definitions in your main
stylesheet (e.g., the file that currently defines --radius, --primary, --accent,
--background, --foreground, --border) so all references in tailwind.config.js
resolve; specifically define --card, --card-foreground, --popover,
--popover-foreground, --primary-foreground, --accent-foreground, --secondary,
--secondary-foreground, --muted, --muted-foreground, --destructive,
--destructive-foreground, --input, --ring, and --chart-1 through --chart-5 (with
sensible HSL values or CSS variables pointing to theme values) to prevent
invalid hsl() outputs for classes like bg-card, text-muted-foreground, and
border-input.
- Line 59: The tailwind config is using CommonJS require in an ESM file: replace
the require("tailwindcss-animate") usage with an ESM import and use that
identifier in the plugins array; specifically add an import like import animate
from "tailwindcss-animate" at the top of the file (the file uses export default)
and change plugins: [require("tailwindcss-animate")] to plugins: [animate] so
the module works under "type":"module".

In `@tsconfig.json`:
- Around line 2-7: Add the same path mapping defined in the root tsconfig to
tsconfig.app.json by adding compilerOptions.baseUrl set to "." and
compilerOptions.paths with the "@/*" -> ["src/*"] mapping inside
tsconfig.app.json so referenced builds and tsc --build/type-checking in CI pick
up the alias; update the tsconfig.app.json's "compilerOptions" section (the file
name to edit is tsconfig.app.json and keys to add are baseUrl and paths with
"@/*") accordingly.
🧹 Nitpick comments (9)
src/components/charts/TestChart.tsx (2)

34-34: Consider using the theme's primary color variable instead of a hardcoded hex.

The stroke color #2e8b57 duplicates the primary brand color defined as a CSS variable (--primary) in index.css. If the brand color changes, this will fall out of sync.

Since Recharts accepts any CSS color string, you can reference the variable:

Suggested change
-            <Line type="monotone" dataKey="value" stroke="#2e8b57" />
+            <Line type="monotone" dataKey="value" stroke="hsl(var(--primary))" />

9-39: Inconsistent indentation throughout the file.

The import block (lines 9–16) uses 4-space indentation for its members, while the component body and module-level data (lines 18–39) are indented by an extra 2 spaces relative to the top level. This suggests the code was pasted with a stray indent. Consider normalizing to a consistent style.

src/index.css (2)

1-3: Static analysis false positives — configure linters for Tailwind.

The Biome and Stylelint errors about unknown @tailwind and @apply at-rules are false positives. These are standard Tailwind CSS directives processed by PostCSS before reaching the browser. To suppress these:

  • Biome: Enable tailwindDirectives in the CSS parser options.
  • Stylelint: If using scss/at-rule-no-unknown, add tailwind, apply, and layer to the ignoreAtRules list, or switch to stylelint-config-tailwindcss.

20-38: Dark mode token set is incomplete.

The .dark block only defines --background, --foreground, and --border, but the light theme also defines --primary, --accent, and --radius. When dark mode is eventually enabled, --primary and --accent will fall through to the :root values, which may or may not be appropriate for dark backgrounds. Consider adding dark-mode overrides for these as well — even if just re-stating the same values to make the intent explicit.

src/components/ui/badge.tsx (1)

4-4: Prefer the @/ path alias over relative imports with .ts extension.

The project configures @./src in both Vite and TypeScript, and components.json declares "utils": "@/lib/utils". Using the alias is more consistent and avoids brittle relative paths. The explicit .ts extension in imports is also unconventional with bundlers like Vite. Same applies to button.tsx (line 5) and card.tsx (line 3).

Suggested fix
-import { cn } from "../../lib/utils.ts"
+import { cn } from "@/lib/utils"
src/components/ui/button.tsx (1)

43-55: forwardRef is unnecessary with React 19.

Since the project uses React 19, ref is a regular prop and forwardRef is no longer needed. This applies to all the Card sub-components in card.tsx as well. Not urgent since forwardRef still works, but worth cleaning up when convenient.

Example simplification
-const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
-  ({ className, variant, size, asChild = false, ...props }, ref) => {
-    const Comp = asChild ? Slot : "button"
-    return (
-      <Comp
-        className={cn(buttonVariants({ variant, size, className }))}
-        ref={ref}
-        {...props}
-      />
-    )
-  }
-)
-Button.displayName = "Button"
+function Button({ className, variant, size, asChild = false, ref, ...props }: ButtonProps & { ref?: React.Ref<HTMLButtonElement> }) {
+  const Comp = asChild ? Slot : "button"
+  return (
+    <Comp
+      className={cn(buttonVariants({ variant, size, className }))}
+      ref={ref}
+      {...props}
+    />
+  )
+}
src/App.tsx (1)

14-16: Demo button has no interaction.

The "Ready to Explore" button has no onClick handler or link behavior. Fine for a demo, but consider adding a brief comment or disabled state to signal it's a placeholder.

src/components/ui/card.tsx (1)

32-42: Consider using a heading element for CardTitle.

CardTitle renders a <div>, which hurts accessibility since screen readers won't announce it as a heading. Rendering as an <h3> (or accepting an as prop) would improve semantics at no cost.

package.json (1)

21-21: tailwindcss-animate should be a devDependency.

It's a Tailwind CSS plugin consumed only at build time (referenced in tailwind.config.js), similar to tailwindcss and postcss which are correctly placed in devDependencies.

Suggested fix

Move from dependencies to devDependencies:

 "dependencies": {
     ...
-    "tailwindcss-animate": "^1.0.7"
 },
 "devDependencies": {
     ...
+    "tailwindcss-animate": "^1.0.7",
     "typescript": "~5.9.3",

Comment on lines 15 to 55
colors: {
background: 'hsl(var(--background))',
foreground: 'hsl(var(--foreground))',
card: {
DEFAULT: 'hsl(var(--card))',
foreground: 'hsl(var(--card-foreground))'
},
popover: {
DEFAULT: 'hsl(var(--popover))',
foreground: 'hsl(var(--popover-foreground))'
},
primary: {
DEFAULT: 'hsl(var(--primary))',
foreground: 'hsl(var(--primary-foreground))'
},
secondary: {
DEFAULT: 'hsl(var(--secondary))',
foreground: 'hsl(var(--secondary-foreground))'
},
muted: {
DEFAULT: 'hsl(var(--muted))',
foreground: 'hsl(var(--muted-foreground))'
},
accent: {
DEFAULT: 'hsl(var(--accent))',
foreground: 'hsl(var(--accent-foreground))'
},
destructive: {
DEFAULT: 'hsl(var(--destructive))',
foreground: 'hsl(var(--destructive-foreground))'
},
border: 'hsl(var(--border))',
input: 'hsl(var(--input))',
ring: 'hsl(var(--ring))',
chart: {
'1': 'hsl(var(--chart-1))',
'2': 'hsl(var(--chart-2))',
'3': 'hsl(var(--chart-3))',
'4': 'hsl(var(--chart-4))',
'5': 'hsl(var(--chart-5))'
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Compare CSS variables referenced in tailwind.config.js vs defined in index.css
echo "=== Variables referenced in tailwind.config.js ==="
rg -oP 'var\(--([a-z0-9-]+)\)' tailwind.config.js | sort -u

echo ""
echo "=== Variables defined in src/index.css ==="
rg -oP '--([a-z0-9-]+):' src/index.css | sort -u

Repository: AOSSIE-Org/OrgExplorer

Length of output: 1046


🏁 Script executed:

# Read the full tailwind.config.js to understand context
echo "=== Full tailwind.config.js ==="
cat -n tailwind.config.js

echo ""
echo "=== Full src/index.css ==="
cat -n src/index.css

Repository: AOSSIE-Org/OrgExplorer

Length of output: 3567


🏁 Script executed:

# Check if there are other CSS files that might define these variables
echo "=== Searching for CSS files ==="
fd -e css

echo ""
echo "=== Checking for global styles or CSS variable definitions elsewhere ==="
rg 'var\(--' --type=css | head -50

Repository: AOSSIE-Org/OrgExplorer

Length of output: 197


🏁 Script executed:

# Check App.css for variable definitions
echo "=== Content of src/App.css ==="
cat -n src/App.css

Repository: AOSSIE-Org/OrgExplorer

Length of output: 148


🏁 Script executed:

# Double-check by searching for all CSS variable definitions in the entire codebase
echo "=== All CSS variable definitions in codebase ==="
rg --type=css '\-\-[a-z0-9\-]+:' | head -100

Repository: AOSSIE-Org/OrgExplorer

Length of output: 523


Add missing CSS variable definitions to src/index.css.

The Tailwind config references 26 CSS variables, but src/index.css only defines 6 (--radius, --primary, --accent, --background, --foreground, --border). Missing definitions include: --card, --card-foreground, --popover, --popover-foreground, --secondary, --secondary-foreground, --muted, --muted-foreground, --destructive, --destructive-foreground, --input, --ring, --chart-1 through --chart-5, and the -foreground variants of --primary and --accent.

Any utility class referencing an undefined variable (e.g., bg-card, text-muted-foreground, border-input) will result in invalid hsl() values and broken styling.

🤖 Prompt for AI Agents
In `@tailwind.config.js` around lines 15 - 55, Tailwind config uses many CSS
variables that are not defined in your global CSS; add missing :root variable
definitions in your main stylesheet (e.g., the file that currently defines
--radius, --primary, --accent, --background, --foreground, --border) so all
references in tailwind.config.js resolve; specifically define --card,
--card-foreground, --popover, --popover-foreground, --primary-foreground,
--accent-foreground, --secondary, --secondary-foreground, --muted,
--muted-foreground, --destructive, --destructive-foreground, --input, --ring,
and --chart-1 through --chart-5 (with sensible HSL values or CSS variables
pointing to theme values) to prevent invalid hsl() outputs for classes like
bg-card, text-muted-foreground, and border-input.

@github-actions github-actions bot added size/XL and removed size/XL labels Feb 12, 2026
@github-actions github-actions bot added size/XL and removed size/XL labels Feb 12, 2026
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@src/index.css`:
- Around line 20-55: Add the missing CSS variables referenced by Badge, Button
and Card and mirror them for dark mode: define --ring, --input, --secondary,
--secondary-foreground, --destructive, --destructive-foreground, --card,
--card-foreground, and --muted-foreground inside :root and .dark (alias sensible
HSL values to existing primary/accent/background/foreground palettes so values
like hsl(var(--secondary)) and hsl(var(--destructive)) resolve correctly); then
extend theme.extend.colors in tailwind.config.ts to include matching color
tokens (secondary, secondary-foreground, destructive, destructive-foreground,
input, ring, card, card-foreground, muted-foreground) pointing to the
corresponding CSS variable HSL usage so utilities like bg-secondary,
text-destructive-foreground, border-input and focus:ring-ring resolve to valid
hsl() colors used by badge.tsx, button.tsx and card.tsx.
🧹 Nitpick comments (1)
src/index.css (1)

1-3: Configure linters to recognize Tailwind directives.

Biome and Stylelint both flag @tailwind and @apply as unknown at-rules. These are false positives for a Tailwind project. To silence them:

  • Biome: enable tailwindDirectives in the CSS parser options.
  • Stylelint: use stylelint-config-tailwindcss or add @tailwind / @apply / @layer to ignoreAtRules in scss/at-rule-no-unknown.

Comment on lines +20 to +55
@layer base {
:root {
--radius: 12px;

/* Brand Colors (HSL format) */
--primary: 146 50% 36%; /* #2e8b57 */
--primary-foreground: 0 0% 100%;
--accent: 47 89% 60%; /* #f4c430 */
--accent-foreground: 222 47% 11%;

--background: 0 0% 100%;
--foreground: 222 47% 11%;

--border: 214 32% 91%;

--chart-1: 142 71% 45%;
--chart-2: 48 96% 53%;
--chart-3: 222 47% 11%;
}

.dark {
--background: 222 47% 11%;
--foreground: 210 40% 98%;

--primary: 142 71% 45%;
--primary-foreground: 0 0% 100%;

--accent: 48 96% 53%;
--accent-foreground: 222 47% 11%;

--border: 217 33% 17%;

--chart-1: 142 71% 45%;
--chart-2: 48 96% 53%;
--chart-3: 210 40% 98%;
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

find . -type f -name "*.tsx" -o -name "*.ts" -o -name "*.jsx" -o -name "*.js" | grep -E "(component|src)" | head -20

Repository: AOSSIE-Org/OrgExplorer

Length of output: 241


🏁 Script executed:

# Find UI components directory
find . -type d -name "ui" | head -5

Repository: AOSSIE-Org/OrgExplorer

Length of output: 85


🏁 Script executed:

# Check if components/ui directory exists and list files
ls -la src/components/ui/ 2>/dev/null || echo "Directory not found, searching for component files..."
fd -t f '\.tsx?$' src/components/ 2>/dev/null || fd -t f '\.tsx?$' components/

Repository: AOSSIE-Org/OrgExplorer

Length of output: 474


🏁 Script executed:

cat -n src/components/ui/badge.tsx

Repository: AOSSIE-Org/OrgExplorer

Length of output: 1464


🏁 Script executed:

cat -n src/components/ui/button.tsx

Repository: AOSSIE-Org/OrgExplorer

Length of output: 2373


🏁 Script executed:

cat -n src/components/ui/card.tsx

Repository: AOSSIE-Org/OrgExplorer

Length of output: 2432


🏁 Script executed:

# Check for tailwind config
cat -n tailwind.config.* 2>/dev/null || echo "No tailwind config found"

Repository: AOSSIE-Org/OrgExplorer

Length of output: 1309


🏁 Script executed:

# Check src/index.css for all variable definitions
cat -n src/index.css

Repository: AOSSIE-Org/OrgExplorer

Length of output: 2028


Add missing CSS variables and Tailwind color definitions.

The Card, Badge, and Button components reference CSS variables that are not defined in src/index.css and not configured in tailwind.config.ts. Specifically:

  • badge.tsx uses --ring, --secondary, --secondary-foreground, --destructive, --destructive-foreground
  • button.tsx uses --ring, --input, --secondary, --secondary-foreground, --destructive, --destructive-foreground
  • card.tsx uses --card, --card-foreground, --muted-foreground

Without these variables and corresponding Tailwind color definitions, utility classes like bg-secondary, text-destructive-foreground, border-input, and focus:ring-ring will resolve to invalid hsl() values, resulting in broken styling at runtime.

Update both src/index.css (add CSS variables to :root and .dark) and tailwind.config.ts (add color entries to theme.extend.colors). Start with reasonable defaults: alias secondary/muted to accent-adjacent colors, destructive to a red palette, input/ring to primary-related values, and card to the background/foreground pair.

🧰 Tools
🪛 Stylelint (17.2.0)

[error] 30-30: Unexpected empty line before custom property (custom-property-empty-line-before)

(custom-property-empty-line-before)


[error] 33-33: Unexpected empty line before custom property (custom-property-empty-line-before)

(custom-property-empty-line-before)


[error] 35-35: Unexpected empty line before custom property (custom-property-empty-line-before)

(custom-property-empty-line-before)


[error] 44-44: Unexpected empty line before custom property (custom-property-empty-line-before)

(custom-property-empty-line-before)


[error] 47-47: Unexpected empty line before custom property (custom-property-empty-line-before)

(custom-property-empty-line-before)


[error] 50-50: Unexpected empty line before custom property (custom-property-empty-line-before)

(custom-property-empty-line-before)


[error] 52-52: Unexpected empty line before custom property (custom-property-empty-line-before)

(custom-property-empty-line-before)

🤖 Prompt for AI Agents
In `@src/index.css` around lines 20 - 55, Add the missing CSS variables referenced
by Badge, Button and Card and mirror them for dark mode: define --ring, --input,
--secondary, --secondary-foreground, --destructive, --destructive-foreground,
--card, --card-foreground, and --muted-foreground inside :root and .dark (alias
sensible HSL values to existing primary/accent/background/foreground palettes so
values like hsl(var(--secondary)) and hsl(var(--destructive)) resolve
correctly); then extend theme.extend.colors in tailwind.config.ts to include
matching color tokens (secondary, secondary-foreground, destructive,
destructive-foreground, input, ring, card, card-foreground, muted-foreground)
pointing to the corresponding CSS variable HSL usage so utilities like
bg-secondary, text-destructive-foreground, border-input and focus:ring-ring
resolve to valid hsl() colors used by badge.tsx, button.tsx and card.tsx.

@github-actions github-actions bot added size/XL and removed size/XL labels Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant