{"filename":"typescript-react-nextui-supabase-cursorrules-promp.mdc","content":"---\ndescription: \"Cursor rules for TypeScript development with React, NextUI, and Supabase integration.\"\nglobs: **/*\nalwaysApply: false\n---\n# Codebase Overview\n\nThis codebase appears to be part of a web application built using TypeScript, React, and various NextUI components. It is structured to support a landing page, authentication flows, and a dashboard for logged-in users. The application integrates with Supabase for backend services, including authentication and database interactions.\n\n# Stack and Key Technologies\n\nFrontend Framework: React\nTypeScript: Used for type-safe code across the frontend.\nNextUI: A React UI library used for building the UI components like buttons, modals, inputs, etc.\nSupabase: An open-source Firebase alternative used for backend services like authentication, database, and storage.\nNext.js: Likely used as the React framework, indicated by the usage of next/navigation and server utilities.\nIconify: For icons across the application.\n\nPurpose and Functionality\n\n## Authentication\n\nThe application includes a comprehensive authentication flow:\nLogin: Users can log in using email/password or GitHub OAuth. The login logic is handled in frontend/app/(landing-page)/login/action.ts.\nSignup: New users can sign up with an email and password. The signup logic is also in frontend/app/(landing-page)/login/action.ts.\nLogout: Users can log out, with the logic located in frontend/app/(landing-page)/logout/action.ts.\nEmail Confirmation: The application handles email confirmation through a callback route in frontend/app/auth/callback/confirm/route.ts.\n\n## User Interface\n\nLanding Page: Contains components like SubmitButton, LoginPage, and LogoutModal to facilitate user interactions.\nDashboard: For logged-in users, showing personalized content and a sidebar for navigation within the dashboard.\nError Handling: A generic error component is used to display errors and provide a retry mechanism.\n\n## Navigation and Layout\n\nNavbar: A responsive navbar for the landing page and possibly other public pages.\nSidebar: A collapsible sidebar for the dashboard, indicating a more complex, multi-page application structure for authenticated users.\n"}