Skip to content

Commit f2aa67a

Browse files
🎨 Enhance Copilot configuration with comprehensive design principles research
Co-authored-by: rezwana-karim <126201034+rezwana-karim@users.noreply.github.com>
1 parent 79704bd commit f2aa67a

5 files changed

Lines changed: 389 additions & 38 deletions

File tree

‎.copilot/dev-environment.yml‎

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,21 @@ preinstall:
1212
# Development dependencies that should be available
1313
dev_tools:
1414
- name: "typescript"
15-
purpose: "TypeScript language support"
15+
purpose: "TypeScript language support with strict type checking"
1616
- name: "eslint"
17-
purpose: "Code linting and style checking"
17+
purpose: "Code linting with accessibility and React best practices"
1818
- name: "@types/node"
19-
purpose: "Node.js type definitions"
19+
purpose: "Node.js type definitions for server-side functionality"
2020
- name: "@types/react"
21-
purpose: "React type definitions"
21+
purpose: "React type definitions with latest features"
22+
- name: "storybook"
23+
purpose: "Component documentation and design system showcase"
24+
- name: "framer-motion"
25+
purpose: "Animation library for smooth micro-interactions"
26+
- name: "radix-ui/react-*"
27+
purpose: "Accessible primitive components for UI foundation"
28+
- name: "lucide-react"
29+
purpose: "Consistent icon system with proper sizing"
2230

2331
# Browser support for testing UI changes
2432
browser:
@@ -33,6 +41,12 @@ recommended_extensions:
3341
- "ms-vscode.vscode-json"
3442
- "github.copilot"
3543
- "github.copilot-chat"
44+
- "formulahendry.auto-rename-tag"
45+
- "christian-kohler.path-intellisense"
46+
- "ms-vscode.vscode-eslint"
47+
- "bradlc.vscode-tailwindcss"
48+
- "storybook.storybook-vscode"
49+
- "radix-ui.radix-ui-vscode"
3650

3751
# Environment variables commonly used in development
3852
env_vars:

‎.copilot/instructions.md‎

Lines changed: 69 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
11
# GitHub Copilot Custom Instructions
22

33
## Project Context
4-
You are working on CodeStorm Hub's portfolio website - a modern Next.js 15 application showcasing open source community projects. The codebase emphasizes clean architecture, accessibility, and performance.
4+
You are working on CodeStorm Hub's portfolio website - a modern Next.js 15 application showcasing open source community projects. The codebase emphasizes clean architecture, accessibility, and performance following Vercel's design engineering principles and Radix UI's design system philosophy.
5+
6+
## Design Engineering Principles
7+
8+
### Vercel-Inspired Design Engineering
9+
- **Systems Thinking**: Every component is part of a larger design system
10+
- **Performance-First Design**: Visual excellence never compromises performance
11+
- **Progressive Enhancement**: Build accessible foundations, enhance with advanced features
12+
- **Content-First Approach**: Design serves content and user goals
13+
- **Atomic Design**: Build from atoms → molecules → organisms → templates → pages
14+
15+
### Radix UI Philosophy
16+
- **Unstyled Primitives**: Use Radix UI primitives as accessible foundations
17+
- **Composition over Configuration**: Build complex components by composing simpler ones
18+
- **Polymorphic Design**: Components adapt to different contexts and use cases
19+
- **Accessible by Default**: Every component meets WCAG 2.1 AA standards
20+
- **Compound Components**: Related components work together seamlessly
521

622
## Key Development Principles
723

@@ -13,11 +29,16 @@ You are working on CodeStorm Hub's portfolio website - a modern Next.js 15 appli
1329
- **Utility-First CSS**: Use Tailwind CSS classes, avoid custom CSS when possible
1430

1531
### Technology Preferences
16-
- **UI Components**: Use Radix UI primitives for accessibility and consistency
17-
- **Icons**: Use Lucide React icons following existing patterns
18-
- **State Management**: Use React hooks and context when needed
19-
- **Styling**: Tailwind CSS 4 with design tokens and Radix Colors
20-
- **Performance**: Leverage Next.js optimizations (Image, Link, etc.)
32+
- **UI Foundation**: Radix UI primitives for accessible, unstyled components
33+
- **Styling System**: Tailwind CSS 4 with design tokens and utility-first approach
34+
- **Typography**: Geist Sans and Geist Mono font families for optimal readability
35+
- **Color System**: Radix Colors for semantic, accessible color palettes
36+
- **Icons**: Lucide React icons with consistent sizing and styling
37+
- **State Management**: React hooks, Context API, and Zustand for complex state
38+
- **Animation**: Framer Motion for smooth, purposeful animations
39+
- **Layout**: CSS Grid and Flexbox with container queries for responsive design
40+
- **Performance**: Next.js optimizations (Image, Link, dynamic imports)
41+
- **Testing**: Component testing with accessibility validation
2142

2243
### File and Folder Conventions
2344
- **Components**: Place in `src/components/[category]/component-name.tsx`
@@ -27,11 +48,16 @@ You are working on CodeStorm Hub's portfolio website - a modern Next.js 15 appli
2748
- **Naming**: kebab-case for files, PascalCase for components, camelCase for variables
2849

2950
### Quality Standards
30-
- **Accessibility**: Always consider ARIA attributes and semantic HTML
31-
- **Performance**: Optimize images, use proper loading strategies
32-
- **SEO**: Include proper metadata and OpenGraph tags
33-
- **Mobile-First**: Design responsive components from mobile up
34-
- **Error Handling**: Include proper error boundaries and loading states
51+
- **Accessibility**: WCAG 2.1 AA compliance with proper ARIA attributes and semantic HTML
52+
- **Performance**: Core Web Vitals optimization (LCP < 2.5s, FID < 100ms, CLS < 0.1)
53+
- **SEO**: Comprehensive metadata, OpenGraph tags, and structured data
54+
- **Mobile-First**: Responsive design starting from 320px viewport width
55+
- **Cross-Browser**: Support for modern browsers with graceful degradation
56+
- **Error Handling**: Comprehensive error boundaries and loading states
57+
- **Type Safety**: Strict TypeScript with proper interface definitions
58+
- **Code Quality**: ESLint, Prettier, and Husky for consistent code standards
59+
- **Documentation**: Storybook stories for components with usage examples
60+
- **Testing**: Unit tests for utilities, integration tests for user flows
3561

3662
### Common Patterns to Follow
3763

@@ -72,10 +98,38 @@ export default function Page() {
7298
4. **Documentation**: Update relevant docs if adding new patterns
7399

74100
### Specific to This Project
75-
- **Design System**: Follow Radix UI and Vercel design principles
76-
- **Brand**: Maintain CodeStorm Hub's visual identity and tone
77-
- **Community Focus**: Remember this showcases open source community work
78-
- **Performance**: Optimize for fast loading and great UX
101+
- **Design System**: Follow Radix UI and Vercel design engineering principles
102+
- **Brand Identity**: CodeStorm Hub's technical, modern, and community-focused aesthetic
103+
- **Content Strategy**: Showcase open source projects and community achievements
104+
- **Performance Goals**: Fast loading, smooth interactions, excellent Core Web Vitals
105+
- **Accessibility Priority**: Ensure all users can access and navigate the content
106+
- **Developer Experience**: Clean, maintainable code that's easy to contribute to
107+
108+
## UI Patterns & Design Guidelines
109+
110+
### Layout Patterns
111+
- **Hero Sections**: Full-width with compelling visuals and clear CTAs
112+
- **Card Grids**: Consistent spacing, hover effects, and responsive layouts
113+
- **Navigation**: Clean, accessible navigation with proper focus management
114+
- **Footer**: Organized links, social media, and legal information
115+
- **Content Sections**: Proper spacing, typography hierarchy, and readability
116+
117+
### Component Design Patterns
118+
- **Button Variants**: Primary, secondary, ghost, and destructive styles
119+
- **Form Components**: Accessible inputs with proper validation states
120+
- **Modal Dialogs**: Radix Dialog with proper focus trapping and escape handling
121+
- **Dropdown Menus**: Radix DropdownMenu with keyboard navigation
122+
- **Toast Notifications**: Non-intrusive feedback with appropriate timing
123+
- **Loading States**: Skeleton loaders and progress indicators
124+
- **Empty States**: Helpful messaging with clear next steps
125+
126+
### Animation & Interaction
127+
- **Micro-interactions**: Subtle feedback for user actions
128+
- **Page Transitions**: Smooth navigation between routes
129+
- **Hover Effects**: Consistent hover states across interactive elements
130+
- **Loading Animations**: Non-distracting progress indicators
131+
- **Scroll Animations**: Progressive disclosure and parallax effects
132+
- **Gesture Support**: Touch-friendly interactions for mobile devices
79133

80134
## Avoid These Common Mistakes
81135
- Don't use `any` type in TypeScript
Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,208 @@
1+
# Design Principles for CodeStorm Hub
2+
3+
## Research Summary
4+
5+
This document summarizes key design, UI/UX, and component principles for the CodeStorm Hub website based on comprehensive research from industry leaders and best practices.
6+
7+
## Core Design Engineering Principles
8+
9+
### 1. Vercel Design Engineering Philosophy
10+
11+
Based on [Vercel's Design Engineering approach](https://vercel.com/solutions/design-engineering):
12+
13+
- **Systems Thinking**: Every component is part of a larger, cohesive design system
14+
- **Performance-First Design**: Visual excellence should never compromise performance metrics
15+
- **Developer Experience**: Tools and components should enhance, not hinder, development workflow
16+
- **Content-First Approach**: Design serves content and user goals, not aesthetic preferences
17+
- **Progressive Enhancement**: Build accessible foundations first, then enhance with advanced features
18+
19+
### 2. Typography System (Geist Font Family)
20+
21+
Following [Vercel's Geist Typography](https://vercel.com/font):
22+
23+
- **Geist Sans**: Primary font for interfaces, optimized for readability across devices
24+
- **Geist Mono**: Monospace font for code blocks and technical content
25+
- **Scale Consistency**: Use consistent type scales (1.125, 1.25, 1.5 ratios)
26+
- **Line Height**: Optimal readability with 1.5-1.6 line height for body text
27+
- **Font Weights**: Strategic use of weights to create hierarchy without overwhelming
28+
29+
**Implementation Guidelines:**
30+
```css
31+
/* Primary text */
32+
font-family: 'Geist Sans', sans-serif;
33+
34+
/* Code and technical content */
35+
font-family: 'Geist Mono', monospace;
36+
37+
/* Type scale */
38+
--text-xs: 0.75rem; /* 12px */
39+
--text-sm: 0.875rem; /* 14px */
40+
--text-base: 1rem; /* 16px */
41+
--text-lg: 1.125rem; /* 18px */
42+
--text-xl: 1.25rem; /* 20px */
43+
```
44+
45+
### 3. Color System (Radix Colors)
46+
47+
Based on [Radix UI Colors](https://www.radix-ui.com/colors):
48+
49+
- **Semantic Colors**: Colors convey meaning and application state
50+
- **Accessibility First**: All combinations meet WCAG 2.1 AA contrast requirements
51+
- **Automatic Dark Mode**: Seamless switching between light and dark themes
52+
- **Functional Palette**: Error, success, warning, and info states clearly differentiated
53+
54+
**Color Categories:**
55+
- **Gray Scales**: Neutral colors for backgrounds and text
56+
- **Brand Colors**: CodeStorm Hub identity colors
57+
- **Semantic Colors**: Red (error), Green (success), Yellow (warning), Blue (info)
58+
- **Interactive Colors**: Hover, active, and focus states
59+
60+
### 4. Component Architecture (Radix UI)
61+
62+
Following [Radix UI Primitives](https://www.radix-ui.com/primitives):
63+
64+
- **Unstyled Primitives**: Accessible foundation without visual styling
65+
- **Composition Pattern**: Build complex components by combining simpler ones
66+
- **Polymorphic Design**: Components adapt to different HTML elements
67+
- **Compound Components**: Related components work together seamlessly
68+
- **Keyboard Navigation**: Full keyboard accessibility out of the box
69+
70+
**Key Patterns:**
71+
```tsx
72+
// Compound component pattern
73+
<Dialog.Root>
74+
<Dialog.Trigger />
75+
<Dialog.Portal>
76+
<Dialog.Overlay />
77+
<Dialog.Content>
78+
<Dialog.Title />
79+
<Dialog.Description />
80+
<Dialog.Close />
81+
</Dialog.Content>
82+
</Dialog.Portal>
83+
</Dialog.Root>
84+
85+
// Polymorphic component pattern
86+
<Button as="a" href="/projects">View Projects</Button>
87+
<Button as="button" onClick={handleClick}>Submit</Button>
88+
```
89+
90+
### 5. Layout & Responsive Strategy
91+
92+
Modern layout techniques for optimal user experience:
93+
94+
- **CSS Grid**: Complex layouts with precise control
95+
- **Flexbox**: Component-level alignment and distribution
96+
- **Container Queries**: Component-based responsive design
97+
- **Mobile-First**: Progressive enhancement from 320px viewport
98+
- **Fluid Typography**: Responsive text sizing using clamp()
99+
100+
**Responsive Breakpoints:**
101+
```css
102+
/* Mobile First Approach */
103+
--breakpoint-sm: 640px; /* Small tablets */
104+
--breakpoint-md: 768px; /* Tablets */
105+
--breakpoint-lg: 1024px; /* Small laptops */
106+
--breakpoint-xl: 1280px; /* Desktops */
107+
--breakpoint-2xl: 1536px; /* Large displays */
108+
```
109+
110+
### 6. Accessibility Standards
111+
112+
Comprehensive accessibility following WCAG 2.1 AA:
113+
114+
- **Semantic HTML**: Proper element usage for screen readers
115+
- **ARIA Attributes**: Enhanced accessibility information
116+
- **Keyboard Navigation**: Complete keyboard-only navigation
117+
- **Focus Management**: Clear focus indicators and logical flow
118+
- **Color Independence**: Information not conveyed by color alone
119+
- **Alternative Text**: Descriptive alt text for images
120+
- **Form Accessibility**: Proper labels and error messaging
121+
122+
### 7. Performance Optimization
123+
124+
Core Web Vitals and performance best practices:
125+
126+
- **Largest Contentful Paint (LCP)**: < 2.5 seconds
127+
- **First Input Delay (FID)**: < 100 milliseconds
128+
- **Cumulative Layout Shift (CLS)**: < 0.1
129+
- **Bundle Splitting**: Code splitting at route and component levels
130+
- **Image Optimization**: Next.js Image component with proper sizing
131+
- **Progressive Loading**: Critical content loads first
132+
133+
### 8. Animation & Micro-interactions
134+
135+
Purposeful motion design:
136+
137+
- **Subtle Feedback**: Micro-interactions for user actions
138+
- **Smooth Transitions**: Consistent easing curves and durations
139+
- **Progressive Disclosure**: Content reveals based on user interaction
140+
- **Performance Conscious**: Animations use transform and opacity
141+
- **Accessibility Respect**: Honor user's reduced motion preferences
142+
143+
**Animation Principles:**
144+
```css
145+
/* Consistent easing */
146+
--ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
147+
--ease-out: cubic-bezier(0, 0, 0.2, 1);
148+
--ease-in: cubic-bezier(0.4, 0, 1, 1);
149+
150+
/* Duration scale */
151+
--duration-75: 75ms; /* Quick feedback */
152+
--duration-150: 150ms; /* Standard transitions */
153+
--duration-300: 300ms; /* Slower transitions */
154+
--duration-500: 500ms; /* Page transitions */
155+
```
156+
157+
## Implementation Strategy
158+
159+
### Phase 1: Foundation
160+
1. Set up Geist font family integration
161+
2. Configure Radix Colors with dark/light mode
162+
3. Establish base component architecture with Radix UI
163+
4. Implement responsive grid system
164+
165+
### Phase 2: Component Library
166+
1. Build core components (Button, Input, Card, Modal)
167+
2. Create compound components (Navigation, Footer)
168+
3. Develop content components (Hero, Features, Team)
169+
4. Document components in Storybook
170+
171+
### Phase 3: Pages & Content
172+
1. Build homepage with hero and feature sections
173+
2. Create project showcase pages
174+
3. Develop team and about pages
175+
4. Implement contact and blog functionality
176+
177+
### Phase 4: Optimization
178+
1. Performance audit and optimization
179+
2. Accessibility testing and improvements
180+
3. SEO optimization and meta tags
181+
4. Analytics and monitoring setup
182+
183+
## Quality Assurance
184+
185+
### Testing Strategy
186+
- **Unit Tests**: Component logic and utilities
187+
- **Integration Tests**: User interaction flows
188+
- **Visual Tests**: Component appearance across browsers
189+
- **Accessibility Tests**: Automated a11y validation
190+
- **Performance Tests**: Core Web Vitals monitoring
191+
192+
### Code Quality
193+
- **TypeScript**: Strict typing for all components
194+
- **ESLint**: Code quality and accessibility rules
195+
- **Prettier**: Consistent code formatting
196+
- **Husky**: Pre-commit hooks for quality gates
197+
198+
### Documentation
199+
- **Storybook**: Component documentation and usage examples
200+
- **README**: Setup and contribution guidelines
201+
- **Design System**: Comprehensive design token documentation
202+
- **API Documentation**: Component props and interfaces
203+
204+
## Conclusion
205+
206+
This design system provides a solid foundation for building a modern, accessible, and performant portfolio website that showcases CodeStorm Hub's commitment to quality and user experience. By following these principles, we ensure consistency, maintainability, and scalability across the entire application.
207+
208+
The combination of Vercel's design engineering approach, Radix UI's accessibility-first components, and modern web standards creates a robust framework for building exceptional user interfaces that perform well across all devices and user contexts.

0 commit comments

Comments
 (0)