> ## Documentation Index
> Fetch the complete documentation index at: https://docs.viral-app.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Main App

> Building your main app experience

# Main App Screen

After subscription, users land on your main app.

## File

`app/(main)/index.tsx`

## Subscription Guard

The layout checks subscription status:

```typescript theme={null}
// app/(main)/_layout.tsx
const { isSubscribed } = useSubscription();

if (!isSubscribed) {
  return <Redirect href="/paywall" />;
}
```

## Adding Screens

Create files in `app/(main)/`:

```
app/(main)/
├── index.tsx       # Home
├── profile.tsx     # Profile
├── settings.tsx    # Settings
```

## Navigation

```typescript theme={null}
import { useRouter } from 'expo-router';

const router = useRouter();
router.push('/(main)/profile');
```

## Tab Navigation

For bottom tabs, update the layout:

```typescript theme={null}
import { Tabs } from 'expo-router';

export default function MainLayout() {
  return (
    <Tabs>
      <Tabs.Screen name="index" options={{ title: 'Home' }} />
      <Tabs.Screen name="profile" options={{ title: 'Profile' }} />
    </Tabs>
  );
}
```
