Before you begin, ensure you have the following installed on your system:
- Node.js (v18 or higher) - Download here
- npm or yarn package manager
- Git - Download here
- Expo CLI - Install globally:
npm install -g expo-cli - Android Studio (for Android development) or Xcode (for iOS development)
- Expo Go App on your mobile device - Android | iOS
git clone <your-repository-url>
cd CommUnitynpm install
# or
yarn installThis will install all required packages including:
- React Native
- Expo SDK 54
- Supabase Client
- NativeWind (Tailwind CSS for React Native)
- Expo AV (for video playback)
- Expo Image Picker
- And more...
- Go to Supabase and sign up/login
- Click "New Project"
- Fill in project details:
- Project Name:
CommUnity - Database Password: (create a strong password)
- Region: (choose closest to your location)
- Project Name:
- Wait for project to be created (~2 minutes)
- In your Supabase dashboard, go to SQL Editor
- Click "New Query"
- Open
database-setup.sqlfrom the project root - Copy the entire file contents
- Paste into the SQL Editor
- Click "Run" to execute
- You should see: β Success. No rows returned
- In Supabase dashboard, go to Settings β API
- Copy the following:
- Project URL (under "Project URL")
- Anon/Public Key (under "Project API keys")
- Create a
.envfile in the project root (if not exists):
# Windows
copy .env.example .env
# Mac/Linux
cp .env.example .env- Open
.envand add your Supabase credentials:
EXPO_PUBLIC_SUPABASE_URL=https://your-project-id.supabase.co
EXPO_PUBLIC_SUPABASE_ANON_KEY=your-anon-key-hereNote: Replace with your actual Supabase URL and key from step 3C.
Open utils/supabase.ts and verify the configuration:
const supabaseUrl = process.env.EXPO_PUBLIC_SUPABASE_URL!;
const supabaseAnonKey = process.env.EXPO_PUBLIC_SUPABASE_ANON_KEY!;npm start
# or
yarn start
# or
npx expo startThis will start the Expo development server and show a QR code.
Option 1: Physical Device
- Install Expo Go from Play Store
- Scan the QR code with Expo Go app
- App will load on your phone
Option 2: Android Emulator
npm run android
# or
yarn androidOption 1: Physical Device
- Install Expo Go from App Store
- Scan the QR code with Camera app
- Open with Expo Go
Option 2: iOS Simulator
npm run ios
# or
yarn iosnpm run web
# or
yarn webNote: Some features (camera, video playback) may not work properly on web.
Solution:
# Clear cache and reinstall
rm -rf node_modules
npm install
npx expo start -cSolution:
- Check your
.envfile has correct credentials - Verify Supabase project is active
- Check internet connection
- Restart the development server
Solution:
- Ensure you're testing on a real device (not web browser)
- Check video file size (must be < 10MB)
- Verify video format is supported (MP4 recommended)
Solution:
- Grant camera and storage permissions on your device
- Restart the app
- Check device settings β Apps β CommUnity β Permissions
Solution:
- Run the rebuild script:
rebuild-app.bat(Windows) or followBUILD_INSTRUCTIONS.md - Uninstall old app from device
- Reinstall from Expo
- For production build:
eas build --platform android
To test the app, you'll need to create at least 2 user accounts:
-
First User:
- Sign up with email/password
- Set up profile (bio, avatar)
- Create some posts
-
Second User:
- Sign up with different email
- Follow first user
- Like and comment on posts
- Send direct messages
When you make changes to the code:
# Development mode - changes reload automatically
npx expo start
# Clear cache if changes don't appear
npx expo start -c# Install EAS CLI
npm install -g eas-cli
# Login to Expo account
eas login
# Configure EAS
eas build:configure
# Build APK
eas build --platform android --profile preview
# Build for Play Store
eas build --platform android --profile production# Build for TestFlight
eas build --platform ios --profile preview
# Build for App Store
eas build --platform ios --profile productionCommUnity/
βββ app/ # App screens and navigation
β βββ (tabs)/ # Tab-based screens (feed, reels, profile)
β βββ _layout.tsx # Root layout
β βββ index.tsx # Entry point
β βββ welcome.tsx # Welcome screen
β βββ create-post.tsx # Create post screen
β βββ video-editor.tsx # Video trimming screen
β βββ ...
βββ assets/ # Images, fonts, logo
βββ components/ # Reusable components
βββ utils/ # Utility functions
β βββ supabase.ts # Supabase configuration
βββ database-setup.sql # Database schema
βββ package.json # Dependencies
βββ tailwind.config.js # Tailwind CSS config
βββ tsconfig.json # TypeScript config
- Expo Documentation: https://docs.expo.dev/
- Supabase Documentation: https://supabase.com/docs
- React Native Documentation: https://reactnative.dev/docs/getting-started
After setup, verify everything works:
- App starts without errors
- Can sign up new user
- Can login with existing user
- Profile page loads correctly
- Can upload image post
- Can upload video post (< 15 seconds)
- Can like posts
- Can follow other users
- Can send direct messages
- Feed shows posts from all users
- Reels show videos vertically
- Custom logo appears in app
Your CommUnity app is now ready to use. Start by signing up and creating your first post!
For more information about app features, see README-FEATURES.md.
For technical details, see README-ABOUT.md.