Automatic ExpoGPT Template
A modern AI-powered mobile and web application built with Expo, featuring authentication, conversation management, analytics, and sharing capabilities.
🚀 Quick Start
This app was created using the Automatic ExpoGPT Template.
Prerequisites
- Node.js 18+
- npm or yarn
- Expo CLI (
npm install -g @expo/cli
)
- iOS Simulator (Mac) or Android Emulator
Installation
# Install dependencies
npm install
# Start the development server
npm run start
# Run on specific platforms
npm run ios # iOS Simulator
npm run android # Android Emulator
npm run web # Web Browser
✅ Features Included
🔐 Authentication & User Management
- Email/Password Authentication - Secure user registration and login
- User Profiles - Comprehensive profile management with editing capabilities
- Session Management - Persistent authentication state across app launches
- Password Reset - Email-based password recovery
💬 AI Chat Interface
- OpenAI GPT-4o Integration - Advanced AI conversations
- Streaming Responses - Real-time message streaming
- Message History - Persistent chat history with virtualized scrolling
- Tool Support - AI can use tools and display structured responses
🗂️ Conversation Management
- CRUD Operations - Create, read, update, delete conversations
- Archive/Restore - Archive conversations without deletion
- Rich Metadata - Search and organize conversations
- User Isolation - Secure conversation separation per user
📊 Analytics Dashboard
- Token Usage Tracking - Monitor AI API costs and consumption
- Response Time Metrics - Track AI performance and response times
- Model Usage Statistics - Monitor which AI models are being used
- Data Export - Export analytics in JSON and CSV formats
- Interactive Visualizations - Charts and graphs for insights
🔗 Conversation Sharing
- Public/Private Sharing - Share conversations with custom permissions
- Link Generation - Create shareable links with expiration dates
- Email Invitations - Share with specific users via email
- Permission Management - Control read/write access levels
🧭 Navigation & Layout
- Onboarding Flow - Guided user introduction
- Sidebar Navigation - Collapsible navigation menu
- Theme Support - Light/dark mode with system preference detection
- Responsive Design - Optimized for mobile, tablet, and web
🎨 UI & Styling
- NativeWind - Tailwind CSS for React Native
- Theme Customization - User-controllable color schemes
- Smooth Animations - Reanimated v3 transitions
- Consistent Design - Unified design system
🔧 Configuration
Environment Variables
Copy .env.example
to .env.local
and configure:
# Required - OpenAI API Key
OPENAI_API_KEY="your_openai_api_key"
# Required - Supabase Configuration
EXPO_PUBLIC_SUPABASE_URL="your_supabase_url"
EXPO_PUBLIC_SUPABASE_ANON_KEY="your_supabase_anon_key"
SUPABASE_SERVICE_ROLE_KEY="your_service_role_key"
# App Configuration
EXPO_PUBLIC_APP_NAME="Automatic ExpoGPT Template"
EXPO_PUBLIC_APP_SLUG="automatic-expogpt-template"
# Feature Flags (all implemented features default to true)
EXPO_PUBLIC_ENABLE_AUTH=true
EXPO_PUBLIC_ENABLE_CONVERSATION_MANAGEMENT=true
EXPO_PUBLIC_ENABLE_CONVERSATION_ANALYTICS=true
EXPO_PUBLIC_ENABLE_CONVERSATION_SHARING=true
EXPO_PUBLIC_ENABLE_ONBOARDING=true
EXPO_PUBLIC_ENABLE_SIDEBAR=true
EXPO_PUBLIC_ENABLE_THEME_CUSTOMIZATION=true
Database Setup
- Create a new Supabase project
- Run the SQL migration in
supabase/migrations/001_create_conversations_system.sql
- Update your environment variables with Supabase credentials
API Keys
- OpenAI: Get your API key from OpenAI Platform
- Supabase: Get your credentials from your Supabase project settings
📁 Project Structure
src/
├── app/ # Expo Router routes & API endpoints
│ ├── (auth)/ # Authentication screens
│ ├── (app)/ # Main app screens
│ └── api/ # API routes
├── features/ # Feature-based organization
│ ├── auth/ # Authentication system
│ ├── chat/ # AI chat functionality
│ ├── onboarding/ # User onboarding
│ └── shared/ # Shared components
├── config/ # App configuration
├── lib/ # Utilities and integrations
└── types/ # TypeScript definitions
🛠️ Development
Available Scripts
npm run start # Start Expo development server
npm run ios # Run on iOS simulator
npm run android # Run on Android emulator
npm run web # Run in web browser
npm run lint # Run ESLint
npm run lint:fix # Fix ESLint issues
npm run typecheck # Run TypeScript checks
npm run test # Run tests
npm run format # Format code with Prettier
Code Quality
- ESLint - Code linting with Expo preset
- Prettier - Code formatting
- TypeScript - 100% type coverage
- Husky - Pre-commit hooks for quality checks
🚀 Deployment
Web Deployment
npm run deploy
Mobile App Deployment
- Configure EAS Build:
npx eas build:configure
- Build for app stores:
npx eas build
- Submit to stores:
npx eas submit
📖 Documentation
🤝 Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
📞 Support
Happy coding! 🚀