|
| 1 | +# GitHub Copilot Instructions for "Run Until You See" |
| 2 | + |
| 3 | +You are working on a Next.js 15 application called "Run Until You See" with the following technology stack and preferences: |
| 4 | + |
| 5 | +## Technology Stack |
| 6 | +- **Next.js 15.4.1** with App Router architecture |
| 7 | +- **TypeScript** for type safety |
| 8 | +- **Tailwind CSS v4** for styling with dark mode support |
| 9 | +- **React 19** with modern patterns |
| 10 | +- **ESLint** with Next.js strict configuration |
| 11 | + |
| 12 | +## Code Style Preferences |
| 13 | +- Use TypeScript with strict type checking |
| 14 | +- Prefer functional components with hooks |
| 15 | +- Use Tailwind CSS for all styling (avoid CSS modules or styled-components) |
| 16 | +- Follow Next.js App Router conventions |
| 17 | +- Use meaningful variable and function names |
| 18 | +- Implement responsive design by default |
| 19 | +- Prefer modern JavaScript features (ES2022+) |
| 20 | + |
| 21 | +## File Organization |
| 22 | +- Place components in appropriate directories |
| 23 | +- Use proper import/export conventions |
| 24 | +- Follow Next.js file-based routing in the `app/` directory |
| 25 | +- Keep components small and focused |
| 26 | +- Use TypeScript interfaces for props and data structures |
| 27 | + |
| 28 | +## Best Practices to Follow |
| 29 | +- Always include proper TypeScript types |
| 30 | +- Use Next.js built-in optimization features (Image, Link, etc.) |
| 31 | +- Implement proper error handling and loading states |
| 32 | +- Follow accessibility guidelines (semantic HTML, ARIA labels) |
| 33 | +- Use proper SEO practices with Next.js metadata API |
| 34 | +- Implement proper form validation when needed |
| 35 | +- Use React best practices (keys for lists, proper useEffect dependencies) |
| 36 | + |
| 37 | +## Tailwind CSS Guidelines |
| 38 | +- Use Tailwind utility classes instead of custom CSS |
| 39 | +- Implement dark mode support using Tailwind's dark: prefix |
| 40 | +- Use responsive design with Tailwind's responsive prefixes (sm:, md:, lg:, xl:) |
| 41 | +- Prefer Tailwind's color palette and spacing system |
| 42 | +- Use Tailwind's component patterns for reusable styles |
| 43 | + |
| 44 | +## Next.js Specific Practices |
| 45 | +- Use the App Router architecture |
| 46 | +- Implement proper metadata for SEO |
| 47 | +- Use Server Components by default, Client Components when needed |
| 48 | +- Follow Next.js data fetching patterns |
| 49 | +- Use proper error boundaries and not-found pages |
| 50 | +- Implement proper loading UI patterns |
| 51 | + |
| 52 | +## Common Patterns to Use |
| 53 | +- Server Components for static content and data fetching |
| 54 | +- Client Components for interactive elements (use "use client" directive) |
| 55 | +- Proper form handling with Server Actions when appropriate |
| 56 | +- Consistent error handling across the application |
| 57 | +- Proper TypeScript interfaces for API responses and component props |
| 58 | + |
| 59 | +When suggesting code, always consider: |
| 60 | +1. Type safety with TypeScript |
| 61 | +2. Performance optimization |
| 62 | +3. Accessibility |
| 63 | +4. Mobile-first responsive design |
| 64 | +5. SEO implications |
| 65 | +6. Code maintainability and readability |
| 66 | + |
| 67 | +Feel free to suggest modern React patterns, Next.js optimizations, and Tailwind CSS utilities that improve the development experience and application performance. |
0 commit comments