# Use and adapt start-expo-kit

Use the documented interfaces and source layout for **start-expo-kit**. The sections below retain the README’s examples and configuration details.

## Authentication

### Using the Auth Hook

```typescript
import { useAuth } from "@/hooks/use-auth";

function MyComponent() {
  const { user, isAuthenticated, signIn, signOut } = useAuth();

  if (!isAuthenticated) {
    return <Text>Please sign in</Text>;
  }

  return <Text>Welcome, {user?.name}!</Text>;
}
```

### Using the Session Hook

```typescript
import { useSession } from "@/hooks/use-session";

function MyComponent() {
  const { session, user, isPending } = useSession();

  if (isPending) return <Text>Loading...</Text>;

  return <Text>Email: {user?.email}</Text>;
}
```

### Protected Routes

Routes in `(home)` are automatically protected. The `AuthWrapper` component handles redirects based on authentication status.

## Project Structure

```
app/
├── (auth)/              # Authentication screens
│   ├── sign-in.tsx
│   ├── sign-up.tsx
│   └── social-sign-in.tsx
├── (home)/              # Protected screens
│   ├── index.tsx
│   └── profile.tsx
└── _layout.tsx

lib/
├── auth/
│   └── client.ts        # Auth client config
└── utils.ts

hooks/
├── use-auth.ts          # Auth operations
└── use-session.ts       # Session management

components/
└── auth/
    ├── auth-wrapper.tsx  # Route protection
    └── auth-form.tsx     # Reusable form
```

## Commands in the root manifest

The captured [package.json](https://github.com/qentrah/start-expo-kit/blob/HEAD/package.json) declares the following scripts. Run them from the directory containing that manifest.

| Command | Script |
| --- | --- |
| `npm run start` | `expo start` |
| `npm run android` | `expo start --android` |
| `npm run ios` | `expo start --ios` |
| `npm run web` | `expo start --web` |
| `npm run lint` | `expo lint` |

## Troubleshooting

See [SETUP.md](https://github.com/qentrah/start-expo-kit/blob/master/SETUP.md) for troubleshooting guide.

## Source and help

- [GitHub repository](https://github.com/qentrah/start-expo-kit)
- [Original README](https://github.com/qentrah/start-expo-kit/blob/master/README.md)
- [Issues and existing reports](https://github.com/qentrah/start-expo-kit/issues)

The catalog identifies the license as **MIT**. Read the repository license before redistributing source or assets.