A modern React Native mobile application built with Expo CLI, featuring TypeScript, Tailwind CSS (NativeWind), Redux Toolkit, React Navigation, and social authentication.
- React Native with Expo CLI - Cross-platform mobile development
- TypeScript - Type safety and better developer experience
- Tailwind CSS (NativeWind) - Utility-first CSS framework for React Native
- Redux Toolkit - Modern Redux for state management
- RTK Query - Data fetching and caching
- React Navigation - Navigation library with tab and stack navigators
- Social Authentication - Clerk
- Modern UI - Beautiful, responsive design with Tailwind CSS
The app includes:
- Login Screen - Social authentication with Google and Instagram
- Home Screen - Welcome dashboard with feature overview
- Profile Screen - User profile with account details and logout
-
Clone the repository
git clone <your-repo-url> cd ploter
-
Install dependencies
npm install
-
Configure OAuth (Important!)
Environment Configuration: Create a
.envfile in your project root with:EXPO_PUBLIC_API_BASE_URL=http://169.254.79.255:4001 EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY=your_instagram_client_id_here
Alternatively, you can directly modify the
defaultAuthConfiginsrc/services/authService.ts -
Start the development server
npm start
-
Run on device/simulator
# iOS npm run ios # Android npm run android # Web npm run web
src/
├── components/ # Reusable UI components
├── features/ # Redux slices and feature logic
│ └── auth/ # Authentication slice
├── navigation/ # React Navigation setup
├── screens/ # App screens
│ ├── LoginScreen.tsx
│ ├── HomeScreen.tsx
│ └── ProfileScreen.tsx
├── services/ # API services and utilities
│ ├── authApi.ts # RTK Query API
│ └── authService.ts # Authentication service
├── store/ # Redux store configuration
│ ├── index.ts # Store setup
│ └── hooks.ts # Typed Redux hooks
└── types/ # TypeScript type definitions
└── auth.ts # Authentication types
- React Native - Mobile app framework
- Expo CLI - Development platform
- TypeScript - Static type checking
- NativeWind - Tailwind CSS for React Native
- Redux Toolkit - State management
- RTK Query - Data fetching and caching
- React Redux - React bindings for Redux
- React Navigation - Navigation library
- Stack Navigator - Screen navigation
- Tab Navigator - Bottom tab navigation
- Expo Auth Session - OAuth authentication
- Expo Web Browser - In-app browser for auth
- Google OAuth - Google Sign-In
- Instagram OAuth - Instagram authentication
- Functional Auth Service - Clean, testable authentication functions
- User opens the app and sees the login screen
- User taps "Continue with Google" or "Continue with Instagram"
- App calls the appropriate auth service function (
loginWithGoogleorloginWithInstagram) - Auth service opens OAuth flow in browser using Expo WebBrowser
- User authenticates with the provider
- App receives authorization code
- Code is exchanged for access token (backend - currently mocked)
- User data is fetched and stored in Redux
- User is navigated to the main app
The authentication is now handled by clean, functional services:
loginWithGoogle(config?)- Handles Google OAuth flowloginWithInstagram(config?)- Handles Instagram OAuth flowextractAuthCode(url)- Utility to extract auth codes from callback URLshandleOAuthError(url)- Utility to handle OAuth errorsdefaultAuthConfig- Default configuration with environment variable support
The app uses NativeWind (Tailwind CSS for React Native) for styling. Key features:
- Utility Classes - Rapid UI development
- Responsive Design - Mobile-first approach
- Custom Colors - Brand-specific color palette
- Modern Components - Cards, buttons, and layouts
Redux Toolkit is used for state management with the following structure:
- Auth Slice - User authentication state
- RTK Query - API calls and caching
- Typed Hooks - TypeScript-safe Redux hooks
npm start- Start Expo development servernpm run android- Run on Android device/emulatornpm run ios- Run on iOS device/simulatornpm run web- Run in web browsernpm run eject- Eject from Expo (not recommended)
- OAuth Configuration - Replace placeholder client IDs with real ones
- Backend Integration - The app currently uses mock data; integrate with your backend API
- Environment Variables - Store sensitive data in environment variables
- Production Build - Configure app signing and deployment settings
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License.
If you encounter any issues or have questions:
- Check the Expo documentation
- Review React Navigation docs
- Check Redux Toolkit docs
- Open an issue in this repository
Built with ❤️ using React Native, Expo, and modern web technologies.