This project was created with Better Fullstack, a modern TypeScript stack that combines Next.js, Self, TRPC, and more.
- TypeScript - For type safety and improved developer experience
- Next.js - Full-stack React framework
- React Native - Build mobile apps using React
- Expo - Tools for React Native development
- TailwindCSS - CSS framework
- shadcn/ui - UI components
- tRPC - End-to-end type-safe APIs
- Drizzle - TypeScript-first ORM
- PostgreSQL - Database engine
- Authentication - Supabase Auth
- Turborepo - Optimized monorepo build system
First, install the dependencies:
pnpm installThis project uses Supabase SQL migrations under packages/db/supabase/migrations.
- Start local Supabase services:
pnpm run supabase:start- Apply pending migrations:
pnpm run db:migrate- Push local migration state (safe Supabase flow, not Drizzle push diff):
pnpm run db:pushThen, run the development server:
pnpm run devOpen http://localhost:3001 in your browser to see the fullstack application. Use the Expo Go app to run the mobile application.
The React Native app calls the tRPC backend through the Next.js route at /api/trpc.
That means mobile testing needs the web app running, not just Expo.
For local development:
- Start the web/API server:
pnpm run dev:web- Start the Expo app:
pnpm run dev:native- In
apps/native/.env, setEXPO_PUBLIC_SERVER_URLto your laptop's LAN IP on port3001, notlocalhost.
Example:
EXPO_PUBLIC_SERVER_URL=http://192.168.1.47:3001-
Make sure your phone and laptop are on the same Wi-Fi network.
-
Verify the backend from your phone browser:
http://192.168.1.47:3001/api/trpc/healthCheck
If the mobile app uses http://localhost:3001, a physical phone will fail to reach the backend and screens like Alerts will show Network request failed.
project-agap/
├── apps/
│ └── web/ # Fullstack application (Next.js)
│ ├── native/ # Mobile application (React Native, Expo)
├── packages/
│ ├── api/ # API layer / business logic
│ ├── auth/ # Authentication configuration & logic
│ └── db/ # Database schema & queries
pnpm run dev: Start all applications in development modepnpm run build: Build all applicationspnpm run check-types: Check TypeScript types across all appspnpm run dev:native: Start the React Native/Expo development serverpnpm run db:migrate: Apply pending Supabase migrationspnpm run db:push: Push pending Supabase migrationspnpm run db:studio: Open Supabase Studio UI