You are an expert in TypeScript, Node.js, Next.js App Router, React, Shadcn UI, Radix UI and Tailwind.
Code Style and Structure
- Write concise, technical TypeScript code with accurate examples.
- Use functional and declarative programming patterns; avoid classes.
- Prefer iteration and modularization over code duplication.
- Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError).
- Structure files: exported component, subcomponents, helpers, static content, types.
Naming Conventions
- Use lowercase with dashes for directories (e.g., components/auth-wizard).
- Favor named exports for components.
TypeScript Usage
- Use TypeScript for all code; prefer interfaces over types.
- Avoid enums; use maps instead.
- Use functional components with TypeScript interfaces.
Syntax and Formatting
- Use the "function" keyword for pure functions.
- Avoid unnecessary curly braces in conditionals; use concise syntax for simple statements.
- Use declarative JSX.
UI and Styling
- Use Shadcn UI, Radix, and Tailwind for components and styling.
- Implement responsive design with Tailwind CSS; use a mobile-first approach.
Performance Optimization
- Minimize 'use client', 'useEffect', and 'setState'; favor React Server Components (RSC).
- Wrap client components in Suspense with fallback.
- Use dynamic loading for non-critical components.
- Optimize images: use WebP format, include size data, implement lazy loading.
Key Conventions
- Use 'nuqs' for URL search parameter state management.
- Make types are a custom types within a separate file within the types folder, because types.ts gets overriden with type generation from Supabase.
- Optimize Web Vitals (LCP, CLS, FID).
- Always use the .getUser() over .getSession()
- Use the existing supabase client and server in @/utils/supabase/client.ts and @/utils/supabase/server.ts
- Limit 'use client':
- Favor server components and Next.js SSR.
- Use only for Web API access in small components.
- Avoid for data fetching or state management.
Follow Next.js docs for Data Fetching, Rendering, and Routing.
1. Can you make it so that each component is created with both light mode and dark mode variants using Tailwind CSS and next-themes.
2. You can find the client for Supabase in @/libs/supabase/client.ts and @/libs/supabase/server.ts
Always favour using the server component for data fetching and rendering.
You must use superbase/ssr npm package instead of the auth-helpers package.
You can find the types in @/types/types.ts, but the database client's already have these.
Always use server actions for API requests, make the full CRUD in server actions for all of the types.
My job depends on this task being done well,
I am a start up founder and I need to ship fast, and well.
Please never be lazy, and always try to do your best.
It's critical that I succeed in this project. Be awesome.
css
jupyter notebook
python
shadcn/ui
typescript
javascript
shell
supabase
+7 more
First Time Repository
A Github repository for the AI Coding with Cursor Course
TypeScript
Languages:
CSS: 14.9KB
HTML: 4.6KB
JavaScript: 1.6KB
Jupyter Notebook: 11.8KB
PLpgSQL: 21.0KB
Python: 18.5KB
Shell: 6.0KB
TypeScript: 1103.6KB
Created: 9/24/2024
Updated: 1/19/2025
All Repositories (1)
A Github repository for the AI Coding with Cursor Course