A React Native social media app built with Expo and Supabase backend.
- User authentication (sign up/sign in)
- Create and view posts
- Share posts
- User profiles
- Real-time data with Supabase
npm install- Create a new project at supabase.com
- Go to Settings > API to get your project URL and anon key
- Update
lib/supabase.tswith your credentials:
const supabaseUrl = 'YOUR_SUPABASE_URL';
const supabaseAnonKey = 'YOUR_SUPABASE_ANON_KEY';- Go to your Supabase dashboard
- Navigate to SQL Editor
- Copy and paste the contents of
supabase-schema.sql - Run the SQL to create tables and policies
- In Supabase dashboard, go to Authentication > Settings
- Enable email authentication
- Optionally configure email templates
npm start├── components/ # Reusable UI components
│ ├── button.tsx # Custom button component
│ └── TextInput.tsx # Custom text input component
├── lib/ # Utilities and configuration
│ ├── auth.tsx # Authentication context
│ ├── supabase.ts # Supabase client configuration
│ └── theme.ts # App theme and styling
├── screens/ # App screens
│ ├── AddPostScreen.tsx
│ ├── HomeScreen.tsx
│ ├── LoginScreen.tsx
│ └── ProfileScreen.tsx
├── types/ # TypeScript type definitions
│ └── index.ts
├── App.tsx # Main app component
└── supabase-schema.sql # Database schema
- users: User profiles (extends Supabase auth.users)
- posts: User posts/content
- comments: Comments on posts
- shares: Post shares/reposts
- Row Level Security (RLS) enabled
- Automatic user profile creation on signup
- Proper foreign key relationships
- Timestamp tracking with auto-update
- Sign Up/Sign In: Create an account or sign in with existing credentials
- View Feed: Browse posts from all users on the home screen
- Create Posts: Tap the + button to create new posts
- Share Posts: Tap the share button on any post
- Profile: View your profile, posts, and stats
Create a .env file (optional) or update lib/supabase.ts directly:
SUPABASE_URL=your_supabase_url
SUPABASE_ANON_KEY=your_supabase_anon_key
The app uses:
- Expo for React Native development
- Supabase for backend and authentication
- React Navigation for navigation
- TypeScript for type safety
- Authentication Issues: Ensure your Supabase URL and keys are correct
- Database Errors: Make sure you've run the schema SQL in Supabase
- Navigation Issues: Ensure all navigation dependencies are installed
Potential enhancements:
- Image upload for posts
- Real-time comments
- Push notifications
- User following/followers
- Post likes/reactions
- Search functionality