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
18 changes: 18 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Development Environment Variables
# Copy this file to .env.local and update values as needed

# Next.js Configuration
NEXT_TELEMETRY_DISABLED=1

# GitHub Configuration (for development)
# GITHUB_TOKEN=your_github_token_here

# API URLs (for future integrations)
# API_BASE_URL=http://localhost:3000/api

# Feature Flags (for future use)
# ENABLE_ANALYTICS=false
# ENABLE_ERROR_REPORTING=false

# Database Configuration (for future use)
# DATABASE_URL=postgresql://username:password@localhost:5432/codestorm_hub
158 changes: 158 additions & 0 deletions .github/workflows/copilot-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
name: Copilot Configuration Validation

on:
push:
branches: [ "main", "develop" ]
paths:
- '.github/copilot-instructions.md'
- '.copilot/**'
- '.github/copilot-mcp.json'
pull_request:
branches: [ "main" ]
paths:
- '.github/copilot-instructions.md'
- '.copilot/**'
- '.github/copilot-mcp.json'

jobs:
validate-copilot-config:
runs-on: ubuntu-latest
name: Validate Copilot Configuration

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Validate configuration files exist
run: |
echo "Checking for required Copilot configuration files..."

# Check for repository instructions
if [ ! -f ".github/copilot-instructions.md" ]; then
echo "❌ Missing .github/copilot-instructions.md"
exit 1
else
echo "✅ Found .github/copilot-instructions.md"
fi

# Check for custom instructions
if [ ! -f ".copilot/instructions.md" ]; then
echo "❌ Missing .copilot/instructions.md"
exit 1
else
echo "✅ Found .copilot/instructions.md"
fi

# Check for development environment config
if [ ! -f ".copilot/dev-environment.yml" ]; then
echo "❌ Missing .copilot/dev-environment.yml"
exit 1
else
echo "✅ Found .copilot/dev-environment.yml"
fi

# Check for MCP configuration
if [ ! -f ".github/copilot-mcp.json" ]; then
echo "❌ Missing .github/copilot-mcp.json"
exit 1
else
echo "✅ Found .github/copilot-mcp.json"
fi

- name: Validate JSON configuration files
run: |
echo "Validating JSON configuration files..."

# Validate MCP configuration JSON
if ! jq . .github/copilot-mcp.json > /dev/null; then
echo "❌ Invalid JSON in .github/copilot-mcp.json"
exit 1
else
echo "✅ Valid JSON in .github/copilot-mcp.json"
fi

- name: Validate YAML configuration files
run: |
echo "Validating YAML configuration files..."

# Install yq for YAML validation (Python version via pip)
sudo apt-get update
Copy link

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

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

Running apt-get update is unnecessary since the GitHub runner already has up-to-date package lists, and this adds significant execution time to the workflow.

Suggested change
sudo apt-get update

Copilot uses AI. Check for mistakes.
sudo apt-get install -y python3-pip
pip3 install --user yq
export PATH="$HOME/.local/bin:$PATH"

Comment on lines +83 to +92
Copy link

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

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

Installing yq via pip during workflow execution is inefficient and slow. Consider using a pre-built action like mikefarah/yq@master or the Go version available via GitHub runner, which would be much faster and more reliable.

Suggested change
- name: Validate YAML configuration files
run: |
echo "Validating YAML configuration files..."
# Install yq for YAML validation (Python version via pip)
sudo apt-get update
sudo apt-get install -y python3-pip
pip3 install --user yq
export PATH="$HOME/.local/bin:$PATH"
- name: Setup yq
uses: mikefarah/yq@master
- name: Validate YAML configuration files
run: |
echo "Validating YAML configuration files..."

Copilot uses AI. Check for mistakes.
# Validate development environment YAML
if ! yq eval . .copilot/dev-environment.yml > /dev/null; then
echo "❌ Invalid YAML in .copilot/dev-environment.yml"
exit 1
else
echo "✅ Valid YAML in .copilot/dev-environment.yml"
fi

- name: Validate project still builds
run: |
echo "Ensuring project builds successfully with current configuration..."
npm run build
Copy link

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

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

The build step lacks error context. Consider adding error handling to provide clearer feedback when the build fails, such as npm run build || { echo '❌ Build failed'; exit 1; }

Suggested change
npm run build
npm run build || { echo '❌ Build failed'; exit 1; }

Copilot uses AI. Check for mistakes.

- name: Validate linting passes
run: |
echo "Ensuring linting passes with current configuration..."
npm run lint
Copy link

Copilot AI Sep 29, 2025

Choose a reason for hiding this comment

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

The lint step lacks error context. Consider adding error handling to provide clearer feedback when linting fails, such as npm run lint || { echo '❌ Linting failed'; exit 1; }

Suggested change
npm run lint
npm run lint || { echo '❌ Linting failed'; exit 1; }

Copilot uses AI. Check for mistakes.

- name: Check configuration completeness
run: |
echo "Checking configuration completeness..."

# Check if copilot-instructions.md contains required sections
if ! grep -q "## Project Overview" .github/copilot-instructions.md; then
echo "❌ Missing Project Overview section in copilot-instructions.md"
exit 1
fi

if ! grep -q "Technology Stack" .github/copilot-instructions.md; then
echo "❌ Missing Technology Stack section in copilot-instructions.md"
exit 1
fi

if ! grep -q "Development Guidelines" .github/copilot-instructions.md; then
echo "❌ Missing Development Guidelines section in copilot-instructions.md"
exit 1
fi

# Check if custom instructions contain key principles
if ! grep -q "Design Engineering Principles" .copilot/instructions.md; then
echo "❌ Missing Design Engineering Principles in .copilot/instructions.md"
exit 1
fi

if ! grep -q "Technology Preferences" .copilot/instructions.md; then
echo "❌ Missing Technology Preferences in .copilot/instructions.md"
exit 1
fi

# Check if MCP config has required structure
if ! jq -e '.mcp.servers' .github/copilot-mcp.json > /dev/null; then
echo "❌ Missing MCP servers configuration"
exit 1
fi

if ! jq -e '.context' .github/copilot-mcp.json > /dev/null; then
echo "❌ Missing context configuration in MCP"
exit 1
fi

echo "✅ All configuration completeness checks passed"

- name: Report validation success
run: |
echo "🎉 All Copilot configuration validation checks passed!"
echo "The repository is properly configured for GitHub Copilot coding agent."
31 changes: 27 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,34 @@ This project implements a comprehensive design system based on:

## Development

- `npm run dev` - Start development server
- `npm run build` - Build for production
- `npm run build:github-pages` - Build for GitHub Pages deployment
### Environment Setup

1. Copy the environment example file:
```bash
cp .env.example .env.local
```

2. Install dependencies:
```bash
npm install
```

### Available Scripts

- `npm run dev` - Start development server with Turbopack
- `npm run build` - Build for production (GitHub Pages optimized)
- `npm run start` - Start production server
- `npm run lint` - Run ESLint
- `npm run lint` - Run ESLint with auto-fix
- `npm run type-check` - Run TypeScript type checking
- `npm run dev:clean` - Clean build cache and start dev server

### Code Quality

This project enforces strict code quality standards:
- TypeScript strict mode
- ESLint with Next.js recommended rules
- Accessibility compliance (WCAG 2.1 AA)
- Performance optimization (Core Web Vitals)

## Deployment

Expand Down
30 changes: 30 additions & 0 deletions next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,38 @@ const nextConfig: NextConfig = {
hostname: "github.com",
pathname: "/CodeStorm-Hub/**",
},
{
protocol: "https",
hostname: "images.unsplash.com",
pathname: "/**",
},
{
protocol: "https",
hostname: "avatars.githubusercontent.com",
pathname: "/**",
},
{
protocol: "https",
hostname: "ui-avatars.com",
pathname: "/**",
},
],
},

// Performance optimizations
poweredByHeader: false,

// TypeScript configuration
typescript: {
// Type checking is handled by the CI pipeline
ignoreBuildErrors: false,
},

// ESLint configuration
eslint: {
// Linting is handled by the CI pipeline
ignoreDuringBuilds: false,
},
};

export default nextConfig;
Loading