---
description: Architecture Guidelines
globs: *.tsx, *.ts
alwaysApply: false
---

# Architecture Guidelines

## Types Over Interfaces
- Always use `types` over `interfaces` for TypeScript definitions.
- Types are more flexible and consistent with the rest of the TypeScript ecosystem.

## Named Exports
- Always use named exports on files that don't require a default export per framework need.
- This improves code discoverability and prevents naming inconsistencies.

## Example:
```tsx
// ✅ Good
export type User = {
  id: string;
  name: string;
  email: string;
};

export const UserProfile = ({ user }: { user: User }) => {
  return <div>{user.name}</div>;
};

// ❌ Avoid
interface User {
  id: string;
  name: string;
  email: string;
}

const UserProfile = ({ user }: { user: User }) => {
  return <div>{user.name}</div>;
};
export default UserProfile;
``` 