Guides
Use and adapt start-expo-kit
Use and adapt start-expo-kit: An Expo starter connected to the start-kit backend, with Better Auth sign-in and protected routes.
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
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
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 formCommands in the root manifest
The captured 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 for troubleshooting guide.
Source and help
The catalog identifies the license as MIT. Read the repository license before redistributing source or assets.
Source captured: 2026-10-11
