# GitHub Profile Generator - Developer Cheatsheet ## 🚀 Quick Start ```bash npm install && npm run dev ``` Visit: http://localhost:3000 --- ## 📁 File Structure (Where to Edit) | Task | File Location | |------|--------------| | Add form field | `src/components/sections/[section]-section.tsx` | | Add validation | `src/lib/validations.ts` | | Modify markdown output | `src/lib/markdown-generator.ts` | | Add new section | Create in `src/components/sections/` + add to `src/app/page.tsx` | | Create form component | `src/components/forms/` | | Add skill | `src/constants/skills.ts` | | Storage logic | `src/lib/storage.ts` | | Theme colors | `src/styles/globals.css` | | Header/Footer | `src/components/layout/` | --- ## 🎨 Theme Colors (Always Use These) ```typescript // Backgrounds bg-background // Main background bg-card // Card background bg-accent // Accent background bg-muted // Muted background bg-primary // Primary action background // Text text-foreground // Main text text-muted-foreground // Secondary text text-primary-foreground // Text on primary bg text-destructive // Error text // Borders & Effects border-border // Border color border-input // Input border ring-ring // Focus ring ``` **❌ Never hardcode:** `bg-white`, `text-black`, `border-gray-300` --- ## 📝 Component Templates ### Form Component ```typescript 'use client'; import { forwardRef } from 'react'; import type { InputHTMLAttributes } from 'react'; export interface MyInputProps extends Omit, 'type'> { label?: string; error?: string; } export const MyInput = forwardRef( ({ label, error, className = '', ...props }, ref) => { return (
{label && } {error &&

{error}

}
); } ); MyInput.displayName = 'MyInput'; ``` ### Section Component ```typescript 'use client'; import { UseFormRegister, FieldErrors } from 'react-hook-form'; import { FormInput } from '@/components/forms/form-input'; import type { MyFormData } from '@/lib/validations'; interface MySectionProps { register: UseFormRegister; errors: FieldErrors; } export function MySection({ register, errors }: MySectionProps) { return (

Section Title

Description

); } ``` --- ## 🔒 TypeScript Patterns ```typescript // Component Props interface ComponentProps { title: string; // Required count?: number; // Optional onAction: () => void; // Required function onChange?: (val: string) => void; // Optional function } // Zod Schema const schema = z.object({ email: z.string().email(), age: z.number().min(0).max(120), url: z.string().url().optional(), isActive: z.boolean().default(false), }); type FormData = z.infer; // Form Hook const { register, watch, setValue, formState: { errors } } = useForm({ resolver: zodResolver(schema), defaultValues: { isActive: false } }); ``` --- ## ♿ Accessibility Checklist ```typescript // ✅ Keyboard Navigation